2 %global _libdir
/%{_lib}
4 # Set the default udev directory based on distribution.
5 %if %{undefined _udevdir}
6 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
7 %global _udevdir
%{_prefix}/lib
/udev
9 %global _udevdir
/lib
/udev
13 # Set the default udevrule directory based on distribution.
14 %if %{undefined _udevruledir}
15 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
16 %global _udevruledir
%{_prefix}/lib
/udev
/rules.d
18 %global _udevruledir
/lib
/udev
/rules.d
22 # Set the default dracut directory based on distribution.
23 %if %{undefined _dracutdir}
24 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
25 %global _dracutdir
%{_prefix}/lib
/dracut
27 %global _dracutdir
%{_prefix}/share
/dracut
35 # Generic enable switch for systemd
40 # RHEL >= 7 comes with systemd
45 # Fedora >= 15 comes with systemd, but only >= 18 has
51 # opensuse >= 12.1 comes with systemd, but only >= 13.1
52 # has the proper macros
53 %if 0%{?suse_version} >= 1310
59 Release: @RELEASE@
%{?dist}
60 Summary: Commands to control the kernel modules and libraries
62 Group: System Environment
/Kernel
63 License: @ZFS_META_LICENSE@
64 URL: http
://zfsonlinux.org
/
65 Source0: %{name}-%{version}.tar.gz
66 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
67 ExclusiveArch: i386 i686 x86_64
69 # May build but untested on ppc/ppc64
70 ExcludeArch: ppc ppc64
72 Requires: spl
= %{version}
73 Requires: libzpool2
= %{version}
74 Requires: libnvpair1
= %{version}
75 Requires: libuutil1
= %{version}
76 Requires: libzfs2
= %{version}
77 Requires: %{name}-kmod = %{version}
78 Provides: %{name}-kmod-common = %{version}
80 # zfs-fuse provides the same commands and man pages that ZoL does. Renaming
81 # those on either side would conflict with all available documentation.
84 %if 0%{?rhel}%{?fedora}%{?suse_version}
85 BuildRequires
: zlib
-devel
86 BuildRequires
: libuuid
-devel
88 BuildRequires
: libblkid
-devel
92 Requires(post
): systemd
93 Requires(preun
): systemd
94 Requires(postun
): systemd
95 BuildRequires
: systemd
99 This package contains the ZFS
command line utilities.
101 %package -n libzpool2
102 Summary: Native ZFS pool library
for Linux
103 Group: System Environment
/Kernel
105 %description -n libzpool2
106 This package contains the zpool library
, which provides support
109 %post-n libzpool2
-p
/sbin
/ldconfig
110 %postun -n libzpool2
-p
/sbin
/ldconfig
112 %package -n libnvpair1
113 Summary: Solaris name
-value library
for Linux
114 Group: System Environment
/Kernel
116 %description -n libnvpair1
117 This package contains routines
for packing and unpacking name
-value
118 pairs. This functionality is used to portably transport data across
119 process boundaries
, between kernel and user space
, and can be used
120 to write self describing data structures on disk.
122 %post-n libnvpair1
-p
/sbin
/ldconfig
123 %postun -n libnvpair1
-p
/sbin
/ldconfig
125 %package -n libuutil1
126 Summary: Solaris userland utility library
for Linux
127 Group: System Environment
/Kernel
129 %description -n libuutil1
130 This library provides a variety of compatibility functions
for ZFS on Linux
:
131 * libspl
: The Solaris Porting Layer userland library
, which provides APIs
132 that
make it possible to run Solaris user code
in a Linux environment
133 with relatively minimal modification.
134 * libavl
: The Adelson
-Velskii Landis balanced binary tree manipulation
136 * libefi
: The Extensible Firmware Interface library
for GUID disk
138 * libshare
: NFS
, SMB
, and iSCSI service integration
for ZFS.
140 %post-n libuutil1
-p
/sbin
/ldconfig
141 %postun -n libuutil1
-p
/sbin
/ldconfig
144 Summary: Native ZFS filesystem library
for Linux
145 Group: System Environment
/Kernel
147 %description -n libzfs2
148 This package provides support
for managing ZFS filesystems
150 %post-n libzfs2
-p
/sbin
/ldconfig
151 %postun -n libzfs2
-p
/sbin
/ldconfig
153 %package -n libzfs2
-devel
154 Summary: Development headers
155 Group: System Environment
/Kernel
156 Requires: libzfs2
= %{version}
157 Requires: libzpool2
= %{version}
158 Requires: libnvpair1
= %{version}
159 Requires: libuutil1
= %{version}
160 Provides: libzpool2
-devel
161 Provides: libnvpair1
-devel
162 Provides: libuutil1
-devel
165 %description -n libzfs2
-devel
166 This package contains the header files needed
for building additional
167 applications against the ZFS libraries.
170 Summary: Test infrastructure
171 Group: System Environment
/Kernel
172 Requires: %{name}%{?_isa} = %{version}-%{release}
179 This package contains
test infrastructure and support scripts
for
180 validating the file system.
183 Summary: Dracut module
184 Group: System Environment
/Kernel
185 Requires: %{name}%{?_isa} = %{version}-%{release}
189 This package contains a dracut module used to construct an initramfs
190 image which is ZFS aware.
194 %define debug
--enable-debug
196 %define debug
--disable
-debug
199 %define blkid
--with
-blkid
201 %define blkid
--without
-blkid
204 %define systemd
--enable-systemd
--with
-systemdunitdir
=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable
-sysvinit
206 %define systemd
--enable-sysvinit
--disable
-systemd
214 --with
-udevdir
=%{_udevdir} \
215 --with
-udevruledir
=%{_udevruledir} \
216 --with
-dracutdir
=%{_dracutdir} \
224 %{__rm} -rf $RPM_BUILD_ROOT
225 make install DESTDIR
=%{?buildroot}
226 find
%{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \
;
230 %systemd_post zfs.target
232 [ -x
/sbin
/chkconfig
] && /sbin
/chkconfig
--add zfs
238 %systemd_preun zfs.target
240 if [ $
1 -eq
0 ] ; then
241 [ -x
/sbin
/chkconfig
] && /sbin
/chkconfig
--del zfs
248 %systemd_postun zfs.target
254 %{_libexecdir}/%{name}
260 %{_udevdir}/rules.d
/*
261 %config(noreplace
) %{_sysconfdir}/%{name}
263 /usr
/lib
/modules
-load.d
/*
267 %{_sysconfdir}/init.d
/*
271 %{_libdir}/libzpool.so.
*
274 %{_libdir}/libnvpair.so.
*
277 %{_libdir}/libuutil.so.
*
280 %{_libdir}/libzfs
*.so.
*
282 %files -n libzfs2
-devel
285 %doc AUTHORS COPYRIGHT DISCLAIMER
286 %doc OPENSOLARIS.LICENSE README.markdown
292 %doc dracut
/README.dracut.markdown
293 %{_dracutdir}/modules.d
/*
296 * Thu Jun
12 2014 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.3-1
298 * Wed Aug
21 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.2-1
300 * Fri Mar
22 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.1-1
301 - First official stable release.