04149baadc9d49d1828093e7a54beb84a0d2ed79
[nbdkit-plugin-vddk.git] / nbdkit-plugin-vddk.spec
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
5
6 # The minimum version of nbdkit that we can build/install with.
7 %global minimum_version 1.1.2
8
9
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).
14 Version:        1.1.16
15 Release:        1%{?dist}
16
17 Summary:        VDDK plugin for nbdkit
18 License:        BSD
19
20 Source0:        nbdkit-%{version}.tar.gz
21
22 BuildRequires:  nbdkit-devel >= %{minimum_version}
23
24 Requires:       nbdkit >= %{minimum_version}
25
26 # Make sure the final package doesn't actually depend on the
27 # VDDK library.
28 %global __requires_exclude .*libvixDiskLib\\.so.*
29
30
31 %description
32 This package contains the VDDK plugin for nbdkit.
33 NB: it does not contain VDDK itself.  You have to download that
34 separately yourself.
35
36
37 %prep
38 %setup -q -n nbdkit-%{version}
39 %configure \
40     --disable-perl \
41     --disable-python \
42     --disable-ocaml \
43     --disable-ruby \
44     --without-curl \
45     --without-libvirt \
46     --without-zlib \
47     --without-liblzma \
48     --without-libguestfs \
49     --with-vddk=%{vddkdir}
50
51
52 %build
53 # Note we're only building the plugin, and we want to build it
54 # against the installed nbdkit.
55 pushd plugins/vddk
56 make %{_smp_mflags}
57 popd
58
59
60 %install
61 mkdir -p $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins
62 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
63 pushd plugins/vddk
64 %make_install
65 popd
66
67 # Kill libtool files with fire.
68 find $RPM_BUILD_ROOT -name '*.la' -delete
69
70
71 %files
72 %{_libdir}/nbdkit/plugins/nbdkit-vddk-plugin.so
73 %{_mandir}/man1/nbdkit-vddk-plugin.1*
74
75
76 %changelog