mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 02:20:59 +03:00
7865606a6a
Because the zfs-dkms package also provides zfs-kmod for the zfs user package yum flags this as a conflict. To avoid the problem remove the Conflicts tag from zfs-dkms and just rely on the one in zfs-kmod. zfs-dkms-0.6.0-rc14.fc18.noarch has installed conflicts zfs-kmod: zfs-dkms-0.6.0-rc14.fc18.noarch Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
68 lines
1.6 KiB
RPMSpec
68 lines
1.6 KiB
RPMSpec
%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: @ZFS_META_LICENSE@
|
|
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
|
|
Requires: spl-dkms = %{version}
|
|
Provides: %{module}-kmod = %{version}
|
|
|
|
%description
|
|
This package contains the dkms ZFS kernel modules.
|
|
|
|
%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.
|
|
|