1 %define module @PACKAGE@
3 %define mkconf lustre/scripts/dkms.mkconf
8 Release: %{buildid}%{?dist}
9 Summary: Kernel module(s) (dkms)
11 Group: System Environment/Kernel
13 URL: http://lustre.opensfs.org/
14 Source0: %{module}-%{version}.tar.gz
15 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18 Requires: dkms >= 2.2.0.3-28.git.7c3e7c5
19 Requires: spl-dkms >= 0.6.1
20 Requires: zfs-dkms >= 0.6.1
21 Requires: gcc, make, perl
22 Requires: kernel-devel
23 Provides: %{module}-kmod = %{version}
24 Provides: %{module}-modules = %{version}
27 This package contains the dkms Lustre kernel modules.
30 %setup -q -n %{module}-%{version}
33 %{mkconf} -n %{module} -v %{version} -f dkms.conf
34 sed -i 's/BUILDID[[:print:]]*/BUILDID = %{buildid}/' META
35 sed -i 's/PRISTINE[[:print:]]*/PRISTINE = 1/' META
39 if [ "$RPM_BUILD_ROOT" != "/" ]; then
40 rm -rf $RPM_BUILD_ROOT
42 mkdir -p $RPM_BUILD_ROOT/usr/src/
43 cp -rfp ${RPM_BUILD_DIR}/%{module}-%{version} $RPM_BUILD_ROOT/usr/src/
46 if [ "$RPM_BUILD_ROOT" != "/" ]; then
47 rm -rf $RPM_BUILD_ROOT
52 /usr/src/%{module}-%{version}
55 for POSTINST in /usr/lib/dkms/common.postinst; do
56 if [ -f $POSTINST ]; then
57 $POSTINST %{module} %{version}
60 echo "WARNING: $POSTINST does not exist."
62 echo -e "ERROR: DKMS version is too old and %{module} was not"
63 echo -e "built with legacy DKMS support."
64 echo -e "You must either rebuild %{module} with legacy postinst"
65 echo -e "support or upgrade DKMS to a more current version."
69 dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade
73 * Fri Apr 8 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 2.3.63-1
74 - First DKMS packages.