Constify structures containing function pointers
[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 _sbindir         /sbin
6 %define _libdir          /%{_lib}
7 %define _udevdir         /lib/udev
8
9 Summary:         ZFS Library and Utils
10 Group:           Utilities/System
11 Name:            %{name}
12 Version:         %{version}
13 Release:         %{release}%{?dist}
14 License:         @ZFS_META_LICENSE@
15 URL:             git://github.com/zfsonlinux/zfs.git
16 BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un)
17 Source:          %{name}-%{version}.tar.gz
18 Requires:        zfs-modules spl zlib e2fsprogs
19 BuildRequires:   zlib-devel e2fsprogs-devel
20
21 %description
22 The %{name} package contains the libzfs library and support utilities
23 for the zfs file system.
24
25 %package devel
26 Summary:         ZFS File System User Headers
27 Group:           Development/Libraries
28 %if %{defined ch5} || %{defined el6} || %{defined fc12}
29 Requires:        zfs zlib libuuid libblkid
30 BuildRequires:   zlib-devel libuuid-devel libblkid-devel
31 %else
32 Requires:        zfs zlib e2fsprogs
33 BuildRequires:   zlib-devel e2fsprogs-devel
34 %endif
35
36 %description devel
37 The %{name}-devel package contains the header files needed for building
38 additional applications against the %{name} libraries.
39
40 %package test
41 Summary:         ZFS File System Test Infrastructure
42 Group:           Utilities/System
43 Requires:        zfs parted lsscsi mdadm bc
44
45 %description test
46 The %{name}-test package contains a test infrastructure for zpios which
47 can be used to simplfy the benchmarking of various hardware and software
48 configurations.  The test infrastructure additionally integrates with
49 various system profiling tools to facilitate an in depth analysis.
50
51 %package dracut
52 Summary:         ZFS Dracut Module
53 Group:           System Environment/Base
54 Requires:        zfs dracut
55
56 %description dracut
57 The %{name}-dracut package allows dracut to construct initramfs images
58 which are ZFS aware.
59
60 %prep
61 %setup
62 %build
63 %configure --with-config=user --without-blkid --with-udevdir=%{_udevdir}
64 make
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 make DESTDIR=$RPM_BUILD_ROOT install
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %files
74 %defattr(-, root, root)
75 %{_sbindir}/*
76 %{_libdir}/*
77 %{_mandir}/man5/*
78 %{_mandir}/man8/*
79 %{_udevdir}/*
80
81 %config %{_sysconfdir}/init.d/*
82 %config %{_sysconfdir}/zfs/*
83
84 %doc AUTHORS COPYING COPYRIGHT DISCLAIMER
85 %doc OPENSOLARIS.LICENSE README.markdown ZFS.RELEASE
86
87 %files devel
88 %defattr(-,root,root)
89 %{_includedir}/*
90
91 %files test
92 %defattr(-,root,root)
93 %{_libexecdir}/@PACKAGE@/*
94
95 %files dracut
96 %defattr(-,root,root)
97 %{_datadir}/dracut/*
98
99 %post
100 [ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs
101 exit 0
102
103 %preun
104 [ "$1" = 0 ] && [ -x /sbin/chkconfig ] && /sbin/chkconfig --del zfs
105 exit 0