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