]> git.proxmox.com Git - mirror_zfs.git/blob - rpm/generic/zfs.spec.in
05d55d975ce6277c6115b60b1d401b754d54c0ae
[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: %{name}-kmod >= %{version}
32 Provides: %{name}-kmod-common = %{version}
33
34 %if 0%{?rhel}%{?fedora}%{?suse_version}
35 BuildRequires: zlib-devel
36 BuildRequires: libuuid-devel
37 %if %{with blkid}
38 BuildRequires: libblkid-devel
39 %endif
40 %if %{with selinux}
41 BuildRequires: libselinux-devel
42 %endif
43 %endif
44
45 %description
46 This package contains the ZFS command line utilities and libraries.
47
48 %package devel
49 Summary: Development headers
50 Group: System Environment/Kernel
51 Requires: %{name}%{?_isa} = %{version}-%{release}
52
53 %description devel
54 This package contains the header files needed for building additional
55 applications against the ZFS libraries.
56
57 %package test
58 Summary: Test infrastructure
59 Group: System Environment/Kernel
60 Requires: %{name}%{?_isa} = %{version}-%{release}
61 Requires: parted
62 Requires: lsscsi
63 Requires: mdadm
64 Requires: bc
65
66 %description test
67 This package contains test infrastructure and support scripts for
68 validating the file system.
69
70 %package dracut
71 Summary: Dracut module
72 Group: System Environment/Kernel
73 Requires: %{name}%{?_isa} = %{version}-%{release}
74 Requires: dracut
75
76 %description dracut
77 This package contains a dracut module used to construct an initramfs
78 image which is ZFS aware.
79
80 %prep
81 %if %{with debug}
82 %define debug --enable-debug
83 %else
84 %define debug --disable-debug
85 %endif
86 %if %{with blkid}
87 %define blkid --with-blkid
88 %else
89 %define blkid --without-blkid
90 %endif
91 %if %{with selinux}
92 %define selinux --with-selinux
93 %else
94 %define selinux --without-selinux
95 %endif
96
97 %setup -q
98
99 %build
100 %configure \
101 --with-config=user \
102 --with-udevdir=%{_udevdir} \
103 --with-dracutdir=%{_dracutdir} \
104 --disable-static \
105 %{debug} \
106 %{blkid} \
107 %{selinux}
108 make %{?_smp_mflags}
109
110 %install
111 %{__rm} -rf $RPM_BUILD_ROOT
112 make install DESTDIR=%{?buildroot}
113 find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \;
114
115 %post -p /sbin/ldconfig
116
117 %postun -p /sbin/ldconfig
118
119 %files
120 %doc AUTHORS COPYRIGHT DISCLAIMER
121 %doc OPENSOLARIS.LICENSE README.markdown
122 %{_sbindir}/*
123 %{_libdir}/*.so.1*
124 %{_mandir}/man1/*
125 %{_mandir}/man5/*
126 %{_mandir}/man8/*
127 %{_udevdir}/vdev_id
128 %{_udevdir}/zvol_id
129 %{_udevdir}/rules.d/*
130 %config(noreplace) %{_sysconfdir}/%{name}
131 # Systemd integration is still required.
132 %exclude %{_sysconfdir}/init.d/*
133
134 %files devel
135 %{_libdir}/*.so
136 %{_includedir}/*
137
138 %files test
139 %{_datadir}/%{name}
140
141 %files dracut
142 %doc dracut/README.dracut.markdown
143 %{_dracutdir}/modules.d/*
144
145 %changelog
146 * Tue Mar 12 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.0-1
147 - Refreshed RPM packaging.