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