/dev/hd* is also a block device on RHEL 5.
[libguestfs.git] / libguestfs.spec.in
index 87dbcd2..aac7b2b 100644 (file)
@@ -26,6 +26,10 @@ BuildRequires: readline-devel
 BuildRequires: qemu >= 0.10-7
 BuildRequires: createrepo
 
+# This is only needed for RHEL 5 because readline-devel doesn't
+# properly depend on it, but doesn't do any harm on other platforms:
+BuildRequires: ncurses-devel
+
 # Build requirements for the appliance:
 # (see 'make-initramfs.sh.in' in the source)
 BuildRequires: kernel, bash, coreutils, lvm2, ntfs-3g, util-linux-ng
@@ -238,10 +242,8 @@ Requires:    jpackage-utils
 %build
 %if %{buildnonet}
 mkdir repo
-pushd repo
-cp $(find /var/cache/yum/build -name '*.rpm') .
-createrepo .
-popd
+find /var/cache/yum/build -type f -name '*.rpm' -print0 | xargs -0 cp -t repo
+createrepo repo
 %define extra --with-mirror=file://$(pwd)/repo --with-repo=fedora-12
 %else
 %define extra %nil
@@ -256,8 +258,7 @@ popd
 
 # 'INSTALLDIRS' ensures that perl libs are installed in the vendor dir
 # not the site dir.
-# Uses javac which is incompatible with parallel make.
-make INSTALLDIRS=vendor
+make INSTALLDIRS=vendor %{?_smp_mflags}
 
 
 %check