Support custom build directories and move includes
[zfs.git] / zfs.spec.in
1 %define name             @PACKAGE@
2 %define version          @VERSION@
3 %define release          @ZFS_META_RELEASE@
4 %define debug_package    %{nil}
5
6 Summary:         ZFS Library and Utils
7 Group:           Utilities/System
8 Name:            %{name}
9 Version:         %{version}
10 Release:         %{release}
11 License:         CDDL
12 URL:             git://eris.llnl.gov/zfs.git
13 BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un)
14 Source:          %{name}-%{version}.tar.gz
15 Requires:        zlib e2fsprogs
16 BuildRequires:   zlib-devel e2fsprogs-devel
17
18 %description
19 The %{name} package contains the libzfs library and support utilities
20 for the zfs file system.
21
22 %package devel
23 Summary:         ZFS File System User Headers
24 Group:           Development/Libraries
25 %if %{defined ch5} || %{defined el6} || %{defined fc12}
26 Requires:        zlib libuuid libblkid
27 BuildRequires:   zlib-devel libuuid-devel libblkid-devel
28 %else
29 Requires:        zlib e2fsprogs
30 BuildRequires:   zlib-devel e2fsprogs-devel
31 %endif
32
33 %description devel
34 The %{name}-devel package contains the header files needed for building
35 additional applications against the %{name} libraries.
36
37 %package test
38 Summary:         ZFS File System Test Infrastructure
39 Group:           Utilities/System
40
41 %description test
42 The %{name}-test package contains a test infrastructure for zpios which
43 can be used to simplfy the benchmarking of various hardware and software
44 configurations.  The test infrastructure additionally integrates with
45 various system profiling tools to facilitate an in depth analysis.
46
47 %prep
48 %setup
49 %build
50 %configure --with-config=user --without-blkid
51 make
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 make DESTDIR=$RPM_BUILD_ROOT install
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %files
61 %defattr(-, root, root)
62 %doc AUTHORS ChangeLog COPYING COPYRIGHT DISCLAIMER
63 %doc OPENSOLARIS.LICENSE README.markdown ZFS.RELEASE
64 %{_sbindir}/*
65 %{_bindir}/*
66 %{_libdir}/*
67 %{_mandir}/man8/*
68 /etc/*
69
70 %files devel
71 %defattr(-,root,root)
72 %{_includedir}/*
73
74 %files test
75 %defattr(-,root,root)
76 %{_libexecdir}/@PACKAGE@/*
77
78 %post
79 %postun