1 # You must set this to the directory where you downloaded VDDK.
2 # NB. DO NOT PUT A TRAILING ‘/’ or you will get the error
3 # ‘canonicalization unexpectedly shrank by one character’ on RHEL 7.
4 %global vddkdir /home/rjones/tmp/vddk/vmware-vix-disklib-distrib
6 # The minimum version of nbdkit that we can build/install with.
7 %global minimum_version 1.1.2
10 Name: nbdkit-plugin-vddk
11 # NB: The Version field is parsed out of this file by Makefile, so it
12 # can only be a simple number. Also it must correspond to an nbdkit
13 # released version (ideally the latest version).
17 Summary: VDDK plugin for nbdkit
20 Source0: nbdkit-%{version}.tar.gz
22 BuildRequires: nbdkit-devel >= %{minimum_version}
24 Requires: nbdkit >= %{minimum_version}
26 # Make sure the final package doesn't actually depend on the
28 %global __requires_exclude .*libvixDiskLib\\.so.*
32 This package contains the VDDK plugin for nbdkit.
33 NB: it does not contain VDDK itself. You have to download that
38 %setup -q -n nbdkit-%{version}
48 --without-libguestfs \
49 --with-vddk=%{vddkdir}
53 # Note we're only building the plugin, and we want to build it
54 # against the installed nbdkit.
61 mkdir -p $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins
62 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
67 # Kill libtool files with fire.
68 find $RPM_BUILD_ROOT -name '*.la' -delete
72 %{_libdir}/nbdkit/plugins/nbdkit-vddk-plugin.so
73 %{_mandir}/man1/nbdkit-vddk-plugin.1*