]> git.proxmox.com Git - mirror_zfs.git/blob - rpm/generic/zfs.spec.in
Tag zfs-0.6.2
[mirror_zfs.git] / rpm / generic / zfs.spec.in
1 %global _sbindir /sbin
2 %global _libdir /%{_lib}
3 %if 0%{?fedora} >= 17
4 %global _udevdir %{_prefix}/lib/udev
5 %global _dracutdir %{_prefix}/lib/dracut
6 %else
7 %global _udevdir /lib/udev
8 %global _dracutdir /lib/dracut
9 %endif
10
11 %bcond_with debug
12 %bcond_with blkid
13 %bcond_with selinux
14
15
16 Name: @PACKAGE@
17 Version: @VERSION@
18 Release: @RELEASE@%{?dist}
19 Summary: Commands to control the kernel modules and libraries
20
21 Group: System Environment/Kernel
22 License: @ZFS_META_LICENSE@
23 URL: http://zfsonlinux.org/
24 Source0: %{name}-%{version}.tar.gz
25 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
26 ExclusiveArch: i386 i686 x86_64
27
28 # May build but untested on ppc/ppc64
29 ExcludeArch: ppc ppc64
30
31 Requires: spl = %{version}
32 Requires: %{name}-kmod >= %{version}
33 Provides: %{name}-kmod-common = %{version}
34
35 %if 0%{?rhel}%{?fedora}%{?suse_version}
36 BuildRequires: zlib-devel
37 BuildRequires: libuuid-devel
38 %if %{with blkid}
39 BuildRequires: libblkid-devel
40 %endif
41 %if %{with selinux}
42 BuildRequires: libselinux-devel
43 %endif
44 %endif
45
46 %description
47 This package contains the ZFS command line utilities and libraries.
48
49 %package devel
50 Summary: Development headers
51 Group: System Environment/Kernel
52 Requires: %{name}%{?_isa} = %{version}-%{release}
53
54 %description devel
55 This package contains the header files needed for building additional
56 applications against the ZFS libraries.
57
58 %package test
59 Summary: Test infrastructure
60 Group: System Environment/Kernel
61 Requires: %{name}%{?_isa} = %{version}-%{release}
62 Requires: parted
63 Requires: lsscsi
64 Requires: mdadm
65 Requires: bc
66
67 %description test
68 This package contains test infrastructure and support scripts for
69 validating the file system.
70
71 %package dracut
72 Summary: Dracut module
73 Group: System Environment/Kernel
74 Requires: %{name}%{?_isa} = %{version}-%{release}
75 Requires: dracut
76
77 %description dracut
78 This package contains a dracut module used to construct an initramfs
79 image which is ZFS aware.
80
81 %prep
82 %if %{with debug}
83 %define debug --enable-debug
84 %else
85 %define debug --disable-debug
86 %endif
87 %if %{with blkid}
88 %define blkid --with-blkid
89 %else
90 %define blkid --without-blkid
91 %endif
92 %if %{with selinux}
93 %define selinux --with-selinux
94 %else
95 %define selinux --without-selinux
96 %endif
97
98 %setup -q
99
100 %build
101 %configure \
102 --with-config=user \
103 --with-udevdir=%{_udevdir} \
104 --with-dracutdir=%{_dracutdir} \
105 --disable-static \
106 %{debug} \
107 %{blkid} \
108 %{selinux}
109 make %{?_smp_mflags}
110
111 %install
112 %{__rm} -rf $RPM_BUILD_ROOT
113 make install DESTDIR=%{?buildroot}
114 find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \;
115
116 %post
117 /sbin/ldconfig
118 [ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs
119 exit 0
120
121 %preun
122 if [ $1 -eq 0 ] ; then
123 [ -x /sbin/chkconfig ] && /sbin/chkconfig --del zfs
124 fi
125 exit 0
126
127 %postun -p /sbin/ldconfig
128
129 %files
130 %doc AUTHORS COPYRIGHT DISCLAIMER
131 %doc OPENSOLARIS.LICENSE README.markdown
132 %{_sbindir}/*
133 %{_bindir}/*
134 %{_libdir}/*.so.1*
135 %{_mandir}/man1/*
136 %{_mandir}/man5/*
137 %{_mandir}/man8/*
138 %{_udevdir}/vdev_id
139 %{_udevdir}/zvol_id
140 %{_udevdir}/rules.d/*
141 %config(noreplace) %{_sysconfdir}/%{name}
142 %{_sysconfdir}/init.d/*
143
144 %files devel
145 %{_libdir}/*.so
146 %{_includedir}/*
147
148 %files test
149 %{_datadir}/%{name}
150
151 %files dracut
152 %doc dracut/README.dracut.markdown
153 %{_dracutdir}/modules.d/*
154
155 %changelog
156 * Wed Aug 21 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.2-1
157 - Released 0.6.2-1
158 * Fri Mar 22 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.1-1
159 - First official stable release.