]> git.proxmox.com Git - mirror_zfs-debian.git/blob - zfs.spec.in
29f6f83e9b634781cccfbce210521d2d93b4f735
[mirror_zfs-debian.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 _sbindir /sbin
6 %define _libdir /%{_lib}
7 %define _udevdir /lib/udev
8 %define _dracutdir %{_datadir}/dracut
9
10 Summary: ZFS Library and Utils
11 Group: Utilities/System
12 Name: %{name}
13 Version: %{version}
14 Release: %{release}%{?dist}
15 License: @ZFS_META_LICENSE@
16 URL: git://github.com/zfsonlinux/zfs.git
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un)
18 Source: %{name}-%{version}.tar.gz
19 Requires: zfs-modules spl 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: zfs zlib libuuid libblkid
31 BuildRequires: zlib-devel libuuid-devel libblkid-devel
32 %else
33 Requires: zfs 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: zfs parted lsscsi mdadm bc
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: zfs 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 \
65 --without-blkid \
66 --with-udevdir=%{_udevdir} \
67 --with-dracutdir=%{_dracutdir}
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)
79 %{_sbindir}/*
80 %{_libdir}/*
81 %{_mandir}/man1/*
82 %{_mandir}/man5/*
83 %{_mandir}/man8/*
84 %{_udevdir}/*
85
86 %config %{_sysconfdir}/init.d/*
87 %config %{_sysconfdir}/zfs/*
88
89 %doc AUTHORS COPYING COPYRIGHT DISCLAIMER
90 %doc OPENSOLARIS.LICENSE README.markdown
91
92 %files devel
93 %defattr(-,root,root)
94 %{_includedir}/*
95
96 %files test
97 %defattr(-,root,root)
98 %{_datadir}/@PACKAGE@/*
99
100 %files dracut
101 %defattr(-,root,root)
102 %{_dracutdir}/*
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