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