Linux 3.4 compat, d_make_root() replaces d_alloc_root()
[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 %define _prefix          /
6 %define _libexecdir      /usr/libexec
7 %define _datadir         /usr/share
8 %define _includedir      /usr/include
9 %define _udevdir         /lib/udev
10
11 Summary:         ZFS Library and Utils
12 Group:           Utilities/System
13 Name:            %{name}
14 Version:         %{version}
15 Release:         %{release}%{?dist}
16 License:         @ZFS_META_LICENSE@
17 URL:             git://github.com/zfsonlinux/zfs.git
18 BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un)
19 Source:          %{name}-%{version}.tar.gz
20 Requires:        zfs-modules spl zlib e2fsprogs
21 BuildRequires:   zlib-devel e2fsprogs-devel
22
23 %description
24 The %{name} package contains the libzfs library and support utilities
25 for the zfs file system.
26
27 %package devel
28 Summary:         ZFS File System User Headers
29 Group:           Development/Libraries
30 %if %{defined ch5} || %{defined el6} || %{defined fc12}
31 Requires:        zfs zlib libuuid libblkid
32 BuildRequires:   zlib-devel libuuid-devel libblkid-devel
33 %else
34 Requires:        zfs zlib e2fsprogs
35 BuildRequires:   zlib-devel e2fsprogs-devel
36 %endif
37
38 %description devel
39 The %{name}-devel package contains the header files needed for building
40 additional applications against the %{name} libraries.
41
42 %package test
43 Summary:         ZFS File System Test Infrastructure
44 Group:           Utilities/System
45 Requires:        zfs parted lsscsi mdadm bc
46
47 %description test
48 The %{name}-test package contains a test infrastructure for zpios which
49 can be used to simplfy the benchmarking of various hardware and software
50 configurations.  The test infrastructure additionally integrates with
51 various system profiling tools to facilitate an in depth analysis.
52
53 %package dracut
54 Summary:         ZFS Dracut Module
55 Group:           System Environment/Base
56 Requires:        zfs dracut
57
58 %description dracut
59 The %{name}-dracut package allows dracut to construct initramfs images
60 which are ZFS aware.
61
62 %prep
63 %setup
64 %build
65 %configure --with-config=user --without-blkid --with-udevdir=%{_udevdir}
66 make
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 make DESTDIR=$RPM_BUILD_ROOT install
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
76 %defattr(-, root, root)
77 %doc AUTHORS ChangeLog COPYING COPYRIGHT DISCLAIMER
78 %doc OPENSOLARIS.LICENSE README.markdown ZFS.RELEASE
79 %{_sbindir}/*
80 %{_bindir}/*
81 %{_libdir}/*
82 %{_mandir}/man5/*
83 %{_mandir}/man8/*
84 %{_sysconfdir}/init.d/*
85 %{_sysconfdir}/zfs/*
86 %{_udevdir}/*
87
88 %files devel
89 %defattr(-,root,root)
90 %{_includedir}/*
91
92 %files test
93 %defattr(-,root,root)
94 %{_libexecdir}/@PACKAGE@/*
95
96 %files dracut
97 %defattr(-,root,root)
98 %{_datadir}/dracut/*
99
100 %post
101 [ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs
102 exit 0
103
104 %preun
105 [ "$1" = 0 ] && [ -x /sbin/chkconfig ] && /sbin/chkconfig --del zfs
106 exit 0