Illumos #3100: zvol rename fails with EBUSY when dirty.
[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 _mandir          %{_datadir}/man
9 %define _includedir      /usr/include
10 %define _udevdir         /lib/udev
11
12 Summary:         ZFS Library and Utils
13 Group:           Utilities/System
14 Name:            %{name}
15 Version:         %{version}
16 Release:         %{release}%{?dist}
17 License:         @ZFS_META_LICENSE@
18 URL:             git://github.com/zfsonlinux/zfs.git
19 BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un)
20 Source:          %{name}-%{version}.tar.gz
21 Requires:        zfs-modules spl zlib e2fsprogs
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}
32 Requires:        zfs zlib libuuid libblkid
33 BuildRequires:   zlib-devel libuuid-devel libblkid-devel
34 %else
35 Requires:        zfs zlib e2fsprogs
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
46 Requires:        zfs parted lsscsi mdadm bc
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
54 %package dracut
55 Summary:         ZFS Dracut Module
56 Group:           System Environment/Base
57 Requires:        zfs dracut
58
59 %description dracut
60 The %{name}-dracut package allows dracut to construct initramfs images
61 which are ZFS aware.
62
63 %prep
64 %setup
65 %build
66 %configure --with-config=user --without-blkid --with-udevdir=%{_udevdir}
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)
78 %{_sbindir}/*
79 %{_bindir}/*
80 %{_libdir}/*
81 %{_mandir}/man5/*
82 %{_mandir}/man8/*
83 %{_udevdir}/*
84
85 %config %{_sysconfdir}/init.d/*
86 %config %{_sysconfdir}/zfs/*
87 %config(noreplace) %{_sysconfdir}/zfs/zdev.conf
88
89 %doc AUTHORS ChangeLog COPYING COPYRIGHT DISCLAIMER
90 %doc OPENSOLARIS.LICENSE README.markdown ZFS.RELEASE
91
92 %files devel
93 %defattr(-,root,root)
94 %{_includedir}/*
95
96 %files test
97 %defattr(-,root,root)
98 %{_libexecdir}/@PACKAGE@/*
99
100 %files dracut
101 %defattr(-,root,root)
102 %{_datadir}/dracut/*
103
104 %post
105 [ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs
106 exit 0
107
108 %preun
109 [ "$1" = 0 ] && [ -x /sbin/chkconfig ] && /sbin/chkconfig --del zfs
110 exit 0