diff options
author | Brian Behlendorf <[email protected]> | 2009-07-01 10:53:05 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-07-01 10:53:05 -0700 |
commit | ef0a7128580dd22e3a4a9cabb4683d8236264c93 (patch) | |
tree | ceb83f0af9952865c823f5773984bcce3aad3a7d /zfs.spec.in | |
parent | 4fbded409d8deec96d251122f5651a5714396342 (diff) |
Distro friendly build system / packaging improvements.
These changes bring the zfs-0.4.4 tree in to compliance with
the spl-0.4.4 packaging changes. The bottom line is 2 source
rpms and 4 binary rpms will now be generated when creating
packages there will be:
zfs-<version>.src.rpm
- Fully rebuildable source rpm for libzfs and utils.
zfs-modules-<version>.src.rpm
- Fully rebuildable source rpm for kernel modules.
zfs-<version>.<arch>.rpm
- Binary rpm for libzfs and utils. The utils in this package are
compatible with all zfs-module rpms of the same version.
zfs-devel-<version>.<arch>.rpm
- Binary rpm containing headers for building against libzfs libraries.
zfs-modules-<verion>-<kernel>.arch.rpm
- Binary rpm containing the kernel modules for a specific kernel build.
The package name contains the kernel version and you should have one
of these packages installed to match every kernel on your system.
zfs-modules-devel-<verion>-<kernel>.arch.rpm
- Binary rpm containing development header and module symbols needed
for building additional kernel modules which are dependent on the
zfs module stack.
Expect minor interations on these changes as I validate they work
properly on CHAOS, RHEL, Fedora, and SLES style distros.
Diffstat (limited to 'zfs.spec.in')
-rw-r--r-- | zfs.spec.in | 86 |
1 files changed, 15 insertions, 71 deletions
diff --git a/zfs.spec.in b/zfs.spec.in index 1a5565232..b63096cc9 100644 --- a/zfs.spec.in +++ b/zfs.spec.in @@ -1,83 +1,40 @@ -# The following block is used to allow the source RPM to be rebuilt -# against arbitrary kernels. It ensure the release name is correct -# and the proper build/install requires are set. -%if 0%{?require_kver:1} -%define kver %{require_kver} -%else -%define _kdir %((echo X; ls -1d /usr/src/kernels/* /usr/src/linux-* 2>/dev/null)|sed -e 's/linux-//' | tail -1) -%define kver %(basename %{_kdir}) -%endif +%define name @PACKAGE@ +%define version @VERSION@ +%define release @ZFS_META_RELEASE@ +%define debug_package %{nil} -# Each distro has its own kernel package naming convention. -%if 0%{?ch4} -%define kstr chaos-kernel -%define kdev chaos-kernel-devel -%define kdir /usr/src/kernels/%{kver} -%else -%define kstr kernel -%define kdev kernel-devel -%define kdir /usr/src/kernels/%{kver} -%endif - -%define debug_package %{nil} - -# The kernel version should only be appended to a binary RPM. -# When building a source RPM it must be kernel version agnostic. -%define name @PACKAGE@ -%define version @VERSION@ - -%if %{?build_src_rpm:1}0 -%define release @ZFS_META_RELEASE@ -%else -%define release @ZFS_META_RELEASE@_%(echo %{kver} | sed -e 's/-/_/g') -%endif - -%if 0%{?require_kver:1} -%define k_buildrequires %{kdev}=%{kver} -%define spl_buildrequires spl-devel>=@VERSION@ -%else -%define k_buildrequires %{kdev} -%define spl_buildrequires spl-devel -%endif - -Summary: ZFS File System +Summary: ZFS Library and Utils Group: Utilities/System Name: %{name} Version: %{version} Release: %{release} -License: @LICENSE@ +License: CDDL URL: git://eris.llnl.gov/zfs.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) Source: %{name}-%{version}.tar.gz -Requires: %{kstr} = %{kver} -Requires: spl >= @VERSION@ Requires: zlib -BuildRequires: %{k_buildrequires} -BuildRequires: %{spl_buildrequires} BuildRequires: zlib-devel %description -The %{name} package contains kernel modules and support utilities for -the %{name} file system. +The %{name} package contains the libzfs library and support utilities +for the zfs file system. %package devel -Summary: ZFS File System Headers and Symbols +Summary: ZFS File System User Headers Group: Development/Libraries -Requires: %{k_buildrequires} = %{kver} -Requires: %{spl_buildrequires} >= @VERSION@ -Requires: zlib-devel -BuildRequires: %{k_buildrequires} -BuildRequires: %{spl_buildrequires} +Requires: zlib BuildRequires: zlib-devel %description devel -The %{name}-devel package contains the header files and Module.symvers -symbols needed for building additional modules which use %{name}. +The %{name}-devel package contains the header files needed for building +additional applications against the %{name} libraries. %prep %setup %build -%configure --with-linux=%{kdir} --with-spl=%{kdir}/include/spl +%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} \ + --with-spl=%{spldir} --with-spl-obj=%{splobj} \ + --with-config=user make %install @@ -93,23 +50,10 @@ rm -rf $RPM_BUILD_ROOT %doc OPENSOLARIS.LICENSE README TODO ZFS.RELEASE %{_sbindir}/* %{_libdir}/* -/lib/modules/* %files devel %defattr(-,root,root) -%{kdir}/include/zfs/* %{_includedir}/* %post -if [ -f /boot/System.map-%{kver} ]; then - depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 -else - depmod -ae %{kver} || exit 0 -fi - %postun -if [ -f /boot/System.map-%{kver} ]; then - depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 -else - depmod -ae %{kver} || exit 0 -fi |