diff options
author | Neal Gompa (ニール・ゴンパ) <[email protected]> | 2017-10-15 16:00:44 -0400 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2017-10-17 16:49:19 -0700 |
commit | abe30b7b4056e38dc990d26256d62478cdf7c05b (patch) | |
tree | 5a4f17af88dd3be2f68a6c28aa4b45e652509bf4 /rpm/generic/zfs-dkms.spec.in | |
parent | f90ee0ca3da3857d1eb024b553b26af930076237 (diff) |
Add DKMS package on Debian-based distributions
* config/deb.am: Enable building DKMS packages for Debian
* rpm/generic/zfs-dkms.spec.in: Adjust spec to be Debian-compatible
* Condition kernel-devel Req to RPM distros
* Adjust the DKMS Req to have a minimum of a version only
* Ensure that --rpm_safe_upgrade isn't used on non-RPM distros
* config/deb.am: Drop CONFIG_KERNEL and CONFIG_USER guards
* Makefile.am: Add pkg-dkms target
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Neal Gompa <[email protected]>
Closes #6044
Closes #6731
Diffstat (limited to 'rpm/generic/zfs-dkms.spec.in')
-rw-r--r-- | rpm/generic/zfs-dkms.spec.in | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rpm/generic/zfs-dkms.spec.in b/rpm/generic/zfs-dkms.spec.in index e432bc414..f6de49297 100644 --- a/rpm/generic/zfs-dkms.spec.in +++ b/rpm/generic/zfs-dkms.spec.in @@ -1,5 +1,9 @@ %{?!packager: %define packager Brian Behlendorf <[email protected]>} +%if ! 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version} +%define not_rpm 1 +%endif + %define module @PACKAGE@ %define mkconf scripts/dkms.mkconf @@ -16,10 +20,12 @@ Source0: %{module}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Requires: dkms >= 2.2.0.3-20 +Requires: dkms >= 2.2.0.3 Requires: spl-dkms = %{version} Requires: gcc, make, perl +%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version} Requires: kernel-devel +%endif Provides: %{module}-kmod = %{version} %description @@ -69,7 +75,7 @@ DKMS_META_ALIAS=`cat $CONFIG_H 2>/dev/null | if [ "$SPEC_META_ALIAS" = "$DKMS_META_ALIAS" ]; then echo -e echo -e "Uninstall of %{module} module ($SPEC_META_ALIAS) beginning:" - dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade + dkms remove -m %{module} -v %{version} --all %{!?not_rpm:--rpm_safe_upgrade} fi exit 0 |