]>
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 | |
a65666f6 | 8 | %define _includedir /usr/include |
12d06bac | 9 | %define _udevdir /lib/udev |
c9c0d073 BB |
10 | |
11 | Summary: ZFS Library and Utils | |
12 | Group: Utilities/System | |
13 | Name: %{name} | |
14 | Version: %{version} | |
3bb1ac69 | 15 | Release: %{release}%{?dist} |
b385d7da | 16 | License: @ZFS_META_LICENSE@ |
2e79a04a | 17 | URL: git://github.com/zfsonlinux/zfs.git |
c9c0d073 BB |
18 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un) |
19 | Source: %{name}-%{version}.tar.gz | |
b4b599d2 | 20 | Requires: zfs-modules spl zlib e2fsprogs |
c9c0d073 BB |
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} | |
b4b599d2 | 31 | Requires: zfs zlib libuuid libblkid |
c9c0d073 BB |
32 | BuildRequires: zlib-devel libuuid-devel libblkid-devel |
33 | %else | |
b4b599d2 | 34 | Requires: zfs zlib e2fsprogs |
c9c0d073 BB |
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 | |
b4b599d2 | 45 | Requires: zfs parted lsscsi |
c9c0d073 BB |
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 | ||
ae26d046 MAR |
53 | %package dracut |
54 | Summary: ZFS Dracut Module | |
55 | Group: System Environment/Base | |
b4b599d2 | 56 | Requires: zfs dracut |
ae26d046 MAR |
57 | |
58 | %description dracut | |
59 | The %{name}-dracut package allows dracut to construct initramfs images | |
60 | which are ZFS aware. | |
61 | ||
c9c0d073 BB |
62 | %prep |
63 | %setup | |
64 | %build | |
12d06bac | 65 | %configure --with-config=user --without-blkid --with-udevdir=%{_udevdir} |
c9c0d073 BB |
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 | |
1ae93745 | 78 | %doc OPENSOLARIS.LICENSE README.markdown ZFS.RELEASE |
c9c0d073 BB |
79 | %{_sbindir}/* |
80 | %{_bindir}/* | |
81 | %{_libdir}/* | |
82 | %{_mandir}/man8/* | |
01c0e61d | 83 | %{_sysconfdir}/init.d/* |
01c0e61d | 84 | %{_sysconfdir}/zfs/* |
12d06bac | 85 | %{_udevdir}/* |
c9c0d073 BB |
86 | |
87 | %files devel | |
88 | %defattr(-,root,root) | |
89 | %{_includedir}/* | |
90 | ||
91 | %files test | |
92 | %defattr(-,root,root) | |
93 | %{_libexecdir}/@PACKAGE@/* | |
94 | ||
ae26d046 MAR |
95 | %files dracut |
96 | %defattr(-,root,root) | |
1f5fd9d4 | 97 | %{_datadir}/dracut/* |
ae26d046 | 98 | |
c9c0d073 | 99 | %post |
01c0e61d BB |
100 | [ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs |
101 | exit 0 | |
102 | ||
103 | %preun | |
1fa3bb75 | 104 | [ "$1" = 0 ] && [ -x /sbin/chkconfig ] && /sbin/chkconfig --del zfs |
01c0e61d | 105 | exit 0 |