mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-30 10:44:09 +03:00
Refresh RPM packaging
Refresh the existing RPM packaging to conform to the 'Fedora Packaging Guidelines'. This includes adopting the kmods2 packaging standard which is used fod kmods distributed by rpmfusion for Fedora/RHEL. http://fedoraproject.org/wiki/Packaging:Guidelines http://rpmfusion.org/Packaging/KernelModules/Kmods2 While the spec files have been entirely rewritten from a user perspective the only major changes are: * The Fedora packages now have a build dependency on the rpmfusion repositories. The generic kmod packages also have a new dependency on kmodtool-1.22 but it is bundled with the source rpm so no additional packages are needed. * The kernel binary module packages have been renamed from spl-modules-* to kmod-spl-* as specificed by kmods2. * The is now a common kmod-spl-devel-* package in addition to the per-kernel devel packages. The common package contains the development headers while the per-kernel package contains kernel specific build products. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #222
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
%define module @PACKAGE@
|
||||
%define mkconf scripts/dkms.mkconf
|
||||
|
||||
Name: %{module}-dkms
|
||||
|
||||
Version: @VERSION@
|
||||
Release: @RELEASE@%{?dist}
|
||||
Summary: Kernel module(s) (dkms)
|
||||
|
||||
Group: System Environment/Kernel
|
||||
License: GPLv2+
|
||||
URL: http://zfsonlinux.org/
|
||||
Source0: %{module}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: dkms >= 2.2.0.2
|
||||
Provides: %{module}-kmod = %{version}
|
||||
Conflicts: %{module}-kmod
|
||||
|
||||
%description
|
||||
This package contains the dkms kernel modules required to emulate
|
||||
several interfaces provided by the Solaris kernel.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{module}-%{version}
|
||||
|
||||
%build
|
||||
%{mkconf} -n %{module} -v %{version} -f dkms.conf
|
||||
|
||||
%install
|
||||
if [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/src/
|
||||
cp -rf ${RPM_BUILD_DIR}/%{module}-%{version} $RPM_BUILD_ROOT/usr/src/
|
||||
|
||||
%clean
|
||||
if [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/usr/src/%{module}-%{version}
|
||||
|
||||
%post
|
||||
for POSTINST in /usr/lib/dkms/common.postinst; do
|
||||
if [ -f $POSTINST ]; then
|
||||
$POSTINST %{module} %{version}
|
||||
exit $?
|
||||
fi
|
||||
echo "WARNING: $POSTINST does not exist."
|
||||
done
|
||||
echo -e "ERROR: DKMS version is too old and %{module} was not"
|
||||
echo -e "built with legacy DKMS support."
|
||||
echo -e "You must either rebuild %{module} with legacy postinst"
|
||||
echo -e "support or upgrade DKMS to a more current version."
|
||||
exit 1
|
||||
|
||||
%preun
|
||||
dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Tue Mar 12 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.0-1
|
||||
- Initial dkms packaging.
|
||||
|
||||
Reference in New Issue
Block a user