diff options
author | Brian Behlendorf <[email protected]> | 2009-07-01 14:37:44 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-07-01 14:37:44 -0700 |
commit | 86933a6e510bb00edb097095ffe3deb7a4fbe533 (patch) | |
tree | 7dd7222aade1e316ca070476074683aa8ecba52b /spl.spec.in | |
parent | 5c3c70adece1ea8724cae0cf0c6cd164a4439f19 (diff) |
Simplify rpm build rules, added config/rpm.am.
Distro friendly changes such that the kernel modules are packaged seperately.
Diffstat (limited to 'spl.spec.in')
-rw-r--r-- | spl.spec.in | 144 |
1 files changed, 5 insertions, 139 deletions
diff --git a/spl.spec.in b/spl.spec.in index caba00dfc..34207f626 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -1,143 +1,25 @@ -# The following block is used to allow the source RPM to be rebuilt -# against specific kernels. It is preferable that rpmbuild define the -# require_kver, require_kdir, require_obj constants for us, but if it does not -# not we attempt to determine the correct values based on your distro. - -%{?require_kver: %define kver %{require_kver}} -%{?require_kdir: %define kdir %{require_kdir}} -%{?require_kobj: %define kobj %{require_kobj}} - -# kdir: Full path to the kernel source headers -# kobj: Full path to the kernel build objects -# kver: Kernel version -# kpkg: Kernel package name -# kdevpkg: Kernel devel package name -# kverpkg: Kernel package version - -# SLES*: -%if %{defined sles_version} - %if %{undefined kver} - %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} - %define kver %((echo X; %{__cat} %{klnk}/.kernelrelease - 2>/dev/null) | tail -1) - %endif - %define kpkg kernel-%{_target_cpu} - %define kdevpkg kernel-source kernel-syms - %define kverpkg %(echo %{kver} | cut -d'-' -f1-2) - %if %{undefined kdir} - %define kdir %{_usrsrc}/linux-%{kverpkg} - %endif - %if %{undefined kobj} - %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu} - %endif - -# CHAOS4: -%else -%if %{defined ch4} - %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo X; %{__cat} %{klnk}/kernel.release - 2>/dev/null) | tail -1) - %endif - %define kpkg chaos-kernel - %define kdevpkg chaos-kernel-devel - %define kverpkg %{kver} - %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} - %endif - %if %{undefined kobj} - %define kobj %{kdir} - %endif - -# RHEL*/Fedora: -%else -%if %{defined fedora} || %{defined rhel} - %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo X; %{__cat} %{klnk}/kernel.release - 2>/dev/null) | tail -1) - %endif - %define kpkg kernel - %define kdevpkg kernel-devel - %define kverpkg %(echo %{kver} | cut -d'.' -f1-7) - %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} - %endif - %if %{undefined kobj} - %define kobj %{kdir} - %endif - -%else - -# Unsupported distro: - %if %{undefined kver} - %define kver X - %endif - %define kpkg kernel - %define kdevpkg kernel-devel - %define kverpkg %{kver} - %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} - %endif - %if %{undefined kobj} - %define kobj %{kdir} - %endif - -%endif -%endif -%endif - -# Distro agnostic: %define name @PACKAGE@ %define version @VERSION@ -%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. This means -# the source RPM must never specify a required kernel version, but the -# final RPM should be keyed to the kernel version it was built against. -%if %{defined build_src_rpm} %define release @SPL_META_RELEASE@ -%define requires %{kpkg} -%else -%define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') -%define release @SPL_META_RELEASE@_%{relext} -%define requires %{kpkg} = %{kverpkg} -%endif +%define debug_package %{nil} -Summary: Solaris Porting Layer +Summary: SPL Utils Group: Utilities/System Name: %{name} Version: %{version} Release: %{release} -License: GPL +License: @LICENSE@ URL: git://eris.llnl.gov/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) Source: %{name}-%{version}.tar.gz -Requires: %{requires} -BuildRequires: %{kdevpkg} %description -The %{name} package contains kernel modules and support utilities for -emulating Solaris style primatives in the linux kernel. These include, -but are not limited too, atomic, condvar, debug, error, memory, kobject, -kstat, mutex, rwlock, taskq, thread, time, and vnode APIs. - -%package devel -Summary: Solaris Porting Layer Headers and Symbols -Group: Development/Libraries -Requires: %{requires} -BuildRequires: %{kdevpkg} - -%description devel -The %{name}-devel package contains the header files and Module{s}.symvers -symbols needed for building additional modules which use %{name}. +The %{name} package contains the support utilities for the spl. %prep %setup %build -%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} +%configure --with-config=user make %install @@ -151,22 +33,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %doc AUTHORS ChangeLog COPYING DISCLAIMER INSTALL %{_sbindir}/* -/lib/modules/* - -%files devel -%defattr(-,root,root) -%{_prefix}/src/* %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 |