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: python-docutils
23 Requires: kernel-devel
24 Provides: %{module}-kmod = %{version}
25 Provides: %{module}-modules = %{version}
28 This package contains the dkms Lustre kernel modules.
31 %setup -q -n %{module}-%{version}
34 %{mkconf} -n %{module} -v %{version} -f dkms.conf
35 sed -i 's/BUILDID[[:print:]]*/BUILDID = %{buildid}/' META
36 sed -i 's/PRISTINE[[:print:]]*/PRISTINE = 1/' META
40 if [ "$RPM_BUILD_ROOT" != "/" ]; then
41 rm -rf $RPM_BUILD_ROOT
43 mkdir -p $RPM_BUILD_ROOT/usr/src/
44 cp -rfp ${RPM_BUILD_DIR}/%{module}-%{version} $RPM_BUILD_ROOT/usr/src/
47 if [ "$RPM_BUILD_ROOT" != "/" ]; then
48 rm -rf $RPM_BUILD_ROOT
53 /usr/src/%{module}-%{version}
56 for POSTINST in /usr/lib/dkms/common.postinst; do
57 if [ -f $POSTINST ]; then
58 $POSTINST %{module} %{version}
61 echo "WARNING: $POSTINST does not exist."
63 echo -e "ERROR: DKMS version is too old and %{module} was not"
64 echo -e "built with legacy DKMS support."
65 echo -e "You must either rebuild %{module} with legacy postinst"
66 echo -e "support or upgrade DKMS to a more current version."
70 dkms remove -m %{module} -v %{version} --all --rpm_safe_upgrade
74 * Fri Apr 8 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 2.3.63-1
75 - First DKMS packages.