# You must set this to the directory where you downloaded VDDK. # NB. DO NOT PUT A TRAILING ‘/’ or you will get the error # ‘canonicalization unexpectedly shrank by one character’ on RHEL 7. %global vddkdir /home/rjones/tmp/vddk/vmware-vix-disklib-distrib # The minimum version of nbdkit that we can build/install with. %global minimum_version 1.1.2 Name: nbdkit-plugin-vddk # NB: The Version field is parsed out of this file by Makefile, so it # can only be a simple number. Also it must correspond to an nbdkit # released version (ideally the latest version). Version: 1.1.19 Release: 1%{?dist} Summary: VDDK plugin for nbdkit License: BSD Source0: nbdkit-%{version}.tar.gz BuildRequires: nbdkit-devel >= %{minimum_version} BuildRequires: perl-podlators BuildRequires: gnutls-devel Requires: nbdkit >= %{minimum_version} # Make sure the final package doesn't actually depend on the # VDDK library. %global __requires_exclude .*libvixDiskLib\\.so.* %description This package contains the VDDK plugin for nbdkit. NB: it does not contain VDDK itself. You have to download that separately yourself. %prep %setup -q -n nbdkit-%{version} %configure \ --disable-perl \ --disable-python \ --disable-ocaml \ --disable-ruby \ --without-curl \ --without-libvirt \ --without-zlib \ --without-liblzma \ --without-libguestfs \ --with-vddk=%{vddkdir} %build # Note we're only building the plugin, and we want to build it # against the installed nbdkit. pushd plugins/vddk make %{_smp_mflags} popd %install mkdir -p $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 pushd plugins/vddk %make_install popd # Kill libtool files with fire. find $RPM_BUILD_ROOT -name '*.la' -delete %files %{_libdir}/nbdkit/plugins/nbdkit-vddk-plugin.so %{_mandir}/man1/nbdkit-vddk-plugin.1* %changelog