Illumos #1051: zfs should handle imbalanced luns
[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 _bindir          /lib/udev
7 %define _libexecdir      /usr/libexec
8 %define _datadir         /usr/share
9
10 Summary:         ZFS Library and Utils
11 Group:           Utilities/System
12 Name:            %{name}
13 Version:         %{version}
14 Release:         %{release}
15 License:         CDDL
16 URL:             git://eris.llnl.gov/zfs.git
17 BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un)
18 Source:          %{name}-%{version}.tar.gz
19 Requires:        zlib e2fsprogs
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}
30 Requires:        zlib libuuid libblkid
31 BuildRequires:   zlib-devel libuuid-devel libblkid-devel
32 %else
33 Requires:        zlib e2fsprogs
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
44 Requires:        parted lsscsi
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
52 %package dracut
53 Summary:         ZFS Dracut Module
54 Group:           System Environment/Base
55 Requires:        dracut
56
57 %description dracut
58 The %{name}-dracut package allows dracut to construct initramfs images
59 which are ZFS aware.
60
61 %prep
62 %setup
63 %build
64 %configure --with-config=user --without-blkid
65 make
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 make DESTDIR=$RPM_BUILD_ROOT install
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %files
75 %defattr(-, root, root)
76 %doc AUTHORS ChangeLog COPYING COPYRIGHT DISCLAIMER
77 %doc OPENSOLARIS.LICENSE README.markdown ZFS.RELEASE
78 %{_sbindir}/*
79 %{_bindir}/*
80 %{_libdir}/*
81 %{_mandir}/man8/*
82 %{_sysconfdir}/init.d/*
83 %{_sysconfdir}/udev/rules.d/*
84 %{_sysconfdir}/zfs/*
85
86 %files devel
87 %defattr(-,root,root)
88 %{_includedir}/*
89
90 %files test
91 %defattr(-,root,root)
92 %{_libexecdir}/@PACKAGE@/*
93
94 %files dracut
95 %defattr(-,root,root)
96 %{_datadir}/dracut/*
97
98 %post
99 [ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs
100 exit 0
101
102 %preun
103 [ "$1" = 0 ] && [ -x /sbin/chkconfig ] && /sbin/chkconfig --del zfs
104 exit 0