Commit 7f0bbbe0 authored by David Johnson's avatar David Johnson

DKMS deb/rpm packages for i40e{vf} and ixgbe{vf} drivers.

parents
*~
*.orig
*.rej
tarballs
drivers/*/build
PKGTYPE ?= $(shell scripts/osstuff.sh -p)
DRIVERS =
ifeq ($(PKGTYPE),deb)
DRIVERS = i40e i40evf ixgbe ixgbevf
endif
ifeq ($(PKGTYPE),rpm)
DRIVERS = i40e i40evf ixgbe ixgbevf
endif
INSTALL_DRIVERS := $(addsuffix -install,$(DRIVERS))
CLEAN_DRIVERS := $(addsuffix -clean,$(DRIVERS))
CLEAN_ALL_DRIVERS := $(addsuffix -cleanall,$(DRIVERS))
.PHONY: all install clean
all: $(DRIVERS)
install: $(INSTALL_DRIVERS)
clean: $(CLEAN_DRIVERS)
cleanall: $(CLEAN_ALL_DRIVERS)
$(DRIVERS):
@$(MAKE) -C drivers/$@ $(PKGTYPE)
$(INSTALL_DRIVERS):
@$(MAKE) -C drivers/$(subst -install,,$@) $(PKGTYPE)-install
$(CLEAN_DRIVERS):
@$(MAKE) -C drivers/$(subst -clean,,$@) $(PKGTYPE)-clean
$(CLEAN_ALL_DRIVERS):
@$(MAKE) -C drivers/$(subst -cleanall,,$@) clean
Emulab `linux-dkms` packaging
-----------------------------
This repository contains deb/rpm DKMS package wrappers for Linux kernel
drivers necessary for some Linux distributions whose kernels contain
drivers too old to support new hardware. This is a problem often
encountered by Emulab admins, now that both Ubuntu and CentOS run
long-term stable kernels by default -- we often find that during the
5-year lifetime of a given image, the stable/release kernel lacks
support for new NIC and disk/controller hardware.
To build, just type
make && make install
This will build all driver DKMS packages for either the rpm or deb
packaging formats, depending on the format supported by your system, and
install them. Installation triggers the dkms build/install subsystem to
build the modules from the package-installed source and rebuild the
initramfs/initrd, if applicable.
If you only want a specific module built and installed, and are on a
Debian-based system, you can run
make -C drivers/i40e deb deb-install
or on an rpm-based system:
make -C drivers/i40e rpm rpm-install
To remove all build products for the entire tree, you can run
make cleanall
To remove the debian build products for a particular module (for
instance, the i40e module), you can run
make -C drivers/i40e deb-clean
or on an rpm-based system:
make -C drivers/i40e rpm-clean
Simply running `make clean` in the top-level source directory will
remove the build products for the autodetected system packaging format
(deb or rpm).
NAME = i40e
PKGNAME = $(NAME)-dkms
VERSION ?= 2.4.10
PKGVERSION ?= $(VERSION)-0
BUILDDIR = build
SOURCEDIR = $(BUILDDIR)/$(NAME)-$(VERSION)
FILENAME = $(NAME)-$(VERSION).tar.gz
TARBALLDIR = ../../tarballs
TARBALL = $(TARBALLDIR)/$(FILENAME)
FETCH = ../../scripts/fetch.sh
DEBPKGDIR = ..
DEBPKGNAME = $(PKGNAME)_$(PKGVERSION)_all.deb
DEBPKGPATH = $(DEBPKGDIR)/$(DEBPKGNAME)
RPMPKGPATH = $(BUILDDIR)/RPMS/noarch/$(PKGNAME)-$(PKGVERSION).noarch.rpm
all:
clean: deb-clean rpm-clean
$(TARBALL):
$(FETCH) $(TARBALLDIR) $(FILENAME)
$(SOURCEDIR): $(TARBALL)
if [ -d $(SOURCEDIR) ]; then rm -rf $(SOURCEDIR); fi
mkdir -p $(BUILDDIR)
tar -xzf $(TARBALL) -C $(BUILDDIR)
touch $(SOURCEDIR)
$(DEBPKGPATH): | $(SOURCEDIR)
dpkg-buildpackage -us -uc
deb: $(DEBPKGPATH)
deb-install: deb
dpkg -i $(DEBPKGPATH)
deb-clean:
rm -rf $(SOURCEDIR) $(DEBPKGPATH) $(DEBPKGDIR)/$(PKGNAME)_*
$(BUILDDIR)/SOURCES/$(FILENAME): $(TARBALL)
mkdir -p $(BUILDDIR)/SOURCES
cp -p $(TARBALL) $(BUILDDIR)/SOURCES/$(FILENAME)
cp -p dkms.conf $(BUILDDIR)/SOURCES
$(RPMPKGPATH): rpm/$(PKGNAME).spec $(BUILDDIR)/SOURCES/$(FILENAME)
mkdir -p $(BUILDDIR)/{BUILD,RPMS/noarch}
rpmbuild --define "_topdir "$(shell readlink -f $(BUILDDIR)) -ba rpm/$(PKGNAME).spec
rpm: $(RPMPKGPATH)
rpm-clean:
rm -rf $(RPMPKGPATH) $(BUILDDIR)/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpm-install: rpm
rpm -iv $(RPMPKGPATH)
.PHONY: all clean deb deb-install deb-clean
i40e-dkms (2.4.10-0) unstable; urgency=medium
* i40e 2.4.10 DKMS package.
-- David M. Johnson <johnsond@flux.utah.edu> Thu, 06 Sep 2018 08:40:28 -0600
i40e-dkms (2.4.6-0) unstable; urgency=medium
* i40e 2.4.6 DKMS package.
-- David M. Johnson <johnsond@flux.utah.edu> Wed, 05 Sep 2018 14:17:02 -0600
Source: i40e-dkms
Maintainer: Testbed Operations <testbed-ops@flux.utah.edu>
Build-Depends: debhelper (>= 9), dkms
Package: i40e-dkms
Architecture: all
Depends: ${misc:Depends}
Description: DKMS source for the i40e driver
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
%:
dh $@ --with dkms
override_dh_install:
dh_install \
build/i40e-$(DEB_VERSION_UPSTREAM)/* \
usr/src/i40e-dkms-$(DEB_VERSION_UPSTREAM)
override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM) -- dkms.conf
override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
PACKAGE_NAME="i40e-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
MAKE="'make' -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="'make' -C src/ KERNELDIR=/lib/modules/${kernelver}/build clean"
BUILT_MODULE_LOCATION=src/
BUILT_MODULE_NAME[0]="i40e"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"
%define module i40e
%define name %{module}-dkms
%define version 2.4.10
%define release 0
%define srcdirname %{module}-%{version}
Source: http://www.emulab.net/downloads/linux-dkms/%{module}-%{version}.tar.gz
Summary: DKMS version of the i40e kernel module
Name: %{name}
Version: %{version}
License: GPLv2
Release: 0
BuildArch: noarch
Requires: dkms gcc kernel-devel
%description
DKMS version of the i40e kernel module.
%prep
%setup -n %{srcdirname}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/src/%{module}-%{version}/
cp -pR %{_builddir}/%{srcdirname}/* %{buildroot}/usr/src/%{module}-%{version}/
cp -p %{_sourcedir}/dkms.conf %{buildroot}/usr/src/%{module}-%{version}/
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root)
%attr(0755,root,root) /usr/src/%{module}-%{version}/
%post
occurrences=`/usr/sbin/dkms status | grep "%{module}" | grep "%{version}" | wc -l`
if [ $occurrences -eq 0 ]; then
/usr/sbin/dkms add -m %{module} -v %{version}
fi
/usr/sbin/dkms build -m %{module} -v %{version}
/usr/sbin/dkms install -m %{module} -v %{version}
exit 0
%preun
/usr/sbin/dkms remove -m %{module} -v %{version} --all
exit 0
%changelog
* Thu Sep 06 2018 David M. Johnson <johnsond@flux.utah.edu> 2.4.10-0
- Initial release of DKMS version of the i40e kernel module.
NAME = i40evf
PKGNAME = $(NAME)-dkms
VERSION ?= 3.5.13
PKGVERSION ?= $(VERSION)-0
BUILDDIR = build
SOURCEDIR = $(BUILDDIR)/$(NAME)-$(VERSION)
FILENAME = $(NAME)-$(VERSION).tar.gz
TARBALLDIR = ../../tarballs
TARBALL = $(TARBALLDIR)/$(FILENAME)
FETCH = ../../scripts/fetch.sh
DEBPKGDIR = ..
DEBPKGNAME = $(PKGNAME)_$(PKGVERSION)_all.deb
DEBPKGPATH = $(DEBPKGDIR)/$(DEBPKGNAME)
RPMPKGPATH = $(BUILDDIR)/RPMS/noarch/$(PKGNAME)-$(PKGVERSION).noarch.rpm
all:
clean: deb-clean rpm-clean
$(TARBALL):
$(FETCH) $(TARBALLDIR) $(FILENAME)
$(SOURCEDIR): $(TARBALL)
if [ -d $(SOURCEDIR) ]; then rm -rf $(SOURCEDIR); fi
mkdir -p $(BUILDDIR)
tar -xzf $(TARBALL) -C $(BUILDDIR)
touch $(SOURCEDIR)
$(DEBPKGPATH): | $(SOURCEDIR)
dpkg-buildpackage -us -uc
deb: $(DEBPKGPATH)
deb-install: deb
dpkg -i $(DEBPKGPATH)
deb-clean:
rm -rf $(SOURCEDIR) $(DEBPKGPATH) $(DEBPKGDIR)/$(PKGNAME)_*
$(BUILDDIR)/SOURCES/$(FILENAME): $(TARBALL)
mkdir -p $(BUILDDIR)/SOURCES
cp -p $(TARBALL) $(BUILDDIR)/SOURCES/$(FILENAME)
cp -p dkms.conf $(BUILDDIR)/SOURCES
$(RPMPKGPATH): rpm/$(PKGNAME).spec $(BUILDDIR)/SOURCES/$(FILENAME)
mkdir -p $(BUILDDIR)/{BUILD,RPMS/noarch}
rpmbuild --define "_topdir "$(shell readlink -f $(BUILDDIR)) -ba rpm/$(PKGNAME).spec
rpm: $(RPMPKGPATH)
rpm-clean:
rm -rf $(RPMPKGPATH) $(BUILDDIR)/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpm-install: rpm
rpm -iv $(RPMPKGPATH)
.PHONY: all clean deb deb-install deb-clean
i40evf-dkms (3.5.13-0) unstable; urgency=medium
* i40evf 3.5.13 DKMS package.
-- David M. Johnson <johnsond@flux.utah.edu> Thu, 06 Sep 2018 08:40:28 -0600
Source: i40evf-dkms
Maintainer: Testbed Operations <testbed-ops@flux.utah.edu>
Build-Depends: debhelper (>= 9), dkms
Package: i40evf-dkms
Architecture: all
Depends: ${misc:Depends}
Description: DKMS source for the i40evf driver
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
%:
dh $@ --with dkms
override_dh_install:
dh_install \
build/i40evf-$(DEB_VERSION_UPSTREAM)/* \
usr/src/i40evf-dkms-$(DEB_VERSION_UPSTREAM)
override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM) -- dkms.conf
override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
PACKAGE_NAME="i40evf-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
MAKE="'make' -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="'make' -C src/ KERNELDIR=/lib/modules/${kernelver}/build clean"
BUILT_MODULE_LOCATION=src/
BUILT_MODULE_NAME[0]="i40evf"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"
%define module i40evf
%define name %{module}-dkms
%define version 3.5.13
%define release 0
%define srcdirname %{module}-%{version}
Source: http://www.emulab.net/downloads/linux-dkms/%{module}-%{version}.tar.gz
Summary: DKMS version of the i40evf kernel module
Name: %{name}
Version: %{version}
License: GPLv2
Release: 0
BuildArch: noarch
Requires: dkms gcc kernel-devel
%description
DKMS version of the i40evf kernel module.
%prep
%setup -n %{srcdirname}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/src/%{module}-%{version}/
cp -pR %{_builddir}/%{srcdirname}/* %{buildroot}/usr/src/%{module}-%{version}/
cp -p %{_sourcedir}/dkms.conf %{buildroot}/usr/src/%{module}-%{version}/
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root)
%attr(0755,root,root) /usr/src/%{module}-%{version}/
%post
occurrences=`/usr/sbin/dkms status | grep "%{module}" | grep "%{version}" | wc -l`
if [ $occurrences -eq 0 ]; then
/usr/sbin/dkms add -m %{module} -v %{version}
fi
/usr/sbin/dkms build -m %{module} -v %{version}
/usr/sbin/dkms install -m %{module} -v %{version}
exit 0
%preun
/usr/sbin/dkms remove -m %{module} -v %{version} --all
exit 0
%changelog
* Thu Sep 06 2018 David M. Johnson <johnsond@flux.utah.edu> 3.5.13-0
- Initial release of DKMS version of the i40evf kernel module.
NAME = ixgbe
PKGNAME = $(NAME)-dkms
VERSION ?= 5.3.7
PKGVERSION ?= $(VERSION)-0
BUILDDIR = build
SOURCEDIR = $(BUILDDIR)/$(NAME)-$(VERSION)
FILENAME = $(NAME)-$(VERSION).tar.gz
TARBALLDIR = ../../tarballs
TARBALL = $(TARBALLDIR)/$(FILENAME)
FETCH = ../../scripts/fetch.sh
DEBPKGDIR = ..
DEBPKGNAME = $(PKGNAME)_$(PKGVERSION)_all.deb
DEBPKGPATH = $(DEBPKGDIR)/$(DEBPKGNAME)
RPMPKGPATH = $(BUILDDIR)/RPMS/noarch/$(PKGNAME)-$(PKGVERSION).noarch.rpm
all:
clean: deb-clean rpm-clean
$(TARBALL):
$(FETCH) $(TARBALLDIR) $(FILENAME)
$(SOURCEDIR): $(TARBALL)
if [ -d $(SOURCEDIR) ]; then rm -rf $(SOURCEDIR); fi
mkdir -p $(BUILDDIR)
tar -xzf $(TARBALL) -C $(BUILDDIR)
touch $(SOURCEDIR)
$(DEBPKGPATH): | $(SOURCEDIR)
dpkg-buildpackage -us -uc
deb: $(DEBPKGPATH)
deb-install: deb
dpkg -i $(DEBPKGPATH)
deb-clean:
rm -rf $(SOURCEDIR) $(DEBPKGPATH) $(DEBPKGDIR)/$(PKGNAME)_*
$(BUILDDIR)/SOURCES/$(FILENAME): $(TARBALL)
mkdir -p $(BUILDDIR)/SOURCES
cp -p $(TARBALL) $(BUILDDIR)/SOURCES/$(FILENAME)
cp -p dkms.conf $(BUILDDIR)/SOURCES
$(RPMPKGPATH): rpm/$(PKGNAME).spec $(BUILDDIR)/SOURCES/$(FILENAME)
mkdir -p $(BUILDDIR)/{BUILD,RPMS/noarch}
rpmbuild --define "_topdir "$(shell readlink -f $(BUILDDIR)) -ba rpm/$(PKGNAME).spec
rpm: $(RPMPKGPATH)
rpm-clean:
rm -rf $(RPMPKGPATH) $(BUILDDIR)/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpm-install: rpm
rpm -iv $(RPMPKGPATH)
.PHONY: all clean deb deb-install deb-clean
ixgbe-dkms (5.3.7-0) unstable; urgency=medium
* ixgbe 5.3.7 DKMS package.
-- David M. Johnson <johnsond@flux.utah.edu> Thu, 06 Sep 2018 08:40:28 -0600
Source: ixgbe-dkms
Maintainer: Testbed Operations <testbed-ops@flux.utah.edu>
Build-Depends: debhelper (>= 9), dkms
Package: ixgbe-dkms
Architecture: all
Depends: ${misc:Depends}
Description: DKMS source for the ixgbe driver
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
%:
dh $@ --with dkms
override_dh_install:
dh_install \
build/ixgbe-$(DEB_VERSION_UPSTREAM)/* \
usr/src/ixgbe-dkms-$(DEB_VERSION_UPSTREAM)
override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM) -- dkms.conf
override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
PACKAGE_NAME="ixgbe-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
MAKE="'make' -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="'make' -C src/ KERNELDIR=/lib/modules/${kernelver}/build clean"
BUILT_MODULE_LOCATION=src/
BUILT_MODULE_NAME[0]="ixgbe"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"
%define module ixgbe
%define name %{module}-dkms
%define version 5.3.7
%define release 0
%define srcdirname %{module}-%{version}
Source: http://www.emulab.net/downloads/linux-dkms/%{module}-%{version}.tar.gz
Summary: DKMS version of the ixgbe kernel module
Name: %{name}
Version: %{version}
License: GPLv2
Release: 0
BuildArch: noarch
Requires: dkms gcc kernel-devel
%description
DKMS version of the ixgbe kernel module.
%prep
%setup -n %{srcdirname}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/src/%{module}-%{version}/
cp -pR %{_builddir}/%{srcdirname}/* %{buildroot}/usr/src/%{module}-%{version}/
cp -p %{_sourcedir}/dkms.conf %{buildroot}/usr/src/%{module}-%{version}/
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root)
%attr(0755,root,root) /usr/src/%{module}-%{version}/
%post
occurrences=`/usr/sbin/dkms status | grep "%{module}" | grep "%{version}" | wc -l`
if [ $occurrences -eq 0 ]; then
/usr/sbin/dkms add -m %{module} -v %{version}
fi
/usr/sbin/dkms build -m %{module} -v %{version}
/usr/sbin/dkms install -m %{module} -v %{version}
exit 0
%preun
/usr/sbin/dkms remove -m %{module} -v %{version} --all
exit 0
%changelog
* Thu Sep 06 2018 David M. Johnson <johnsond@flux.utah.edu> 5.3.7-0
- Initial release of DKMS version of the ixgbe kernel module.
NAME = ixgbevf
PKGNAME = $(NAME)-dkms
VERSION ?= 4.3.5
PKGVERSION ?= $(VERSION)-0
BUILDDIR = build
SOURCEDIR = $(BUILDDIR)/$(NAME)-$(VERSION)
FILENAME = $(NAME)-$(VERSION).tar.gz
TARBALLDIR = ../../tarballs
TARBALL = $(TARBALLDIR)/$(FILENAME)
FETCH = ../../scripts/fetch.sh
DEBPKGDIR = ..
DEBPKGNAME = $(PKGNAME)_$(PKGVERSION)_all.deb
DEBPKGPATH = $(DEBPKGDIR)/$(DEBPKGNAME)
RPMPKGPATH = $(BUILDDIR)/RPMS/noarch/$(PKGNAME)-$(PKGVERSION).noarch.rpm
all:
clean: deb-clean rpm-clean
$(TARBALL):
$(FETCH) $(TARBALLDIR) $(FILENAME)
$(SOURCEDIR): $(TARBALL)
if [ -d $(SOURCEDIR) ]; then rm -rf $(SOURCEDIR); fi
mkdir -p $(BUILDDIR)
tar -xzf $(TARBALL) -C $(BUILDDIR)
touch $(SOURCEDIR)
$(DEBPKGPATH): | $(SOURCEDIR)
dpkg-buildpackage -us -uc
deb: $(DEBPKGPATH)
deb-install: deb
dpkg -i $(DEBPKGPATH)
deb-clean:
rm -rf $(SOURCEDIR) $(DEBPKGPATH) $(DEBPKGDIR)/$(PKGNAME)_*
$(BUILDDIR)/SOURCES/$(FILENAME): $(TARBALL)
mkdir -p $(BUILDDIR)/SOURCES
cp -p $(TARBALL) $(BUILDDIR)/SOURCES/$(FILENAME)
cp -p dkms.conf $(BUILDDIR)/SOURCES
$(RPMPKGPATH): rpm/$(PKGNAME).spec $(BUILDDIR)/SOURCES/$(FILENAME)
mkdir -p $(BUILDDIR)/{BUILD,RPMS/noarch}
rpmbuild --define "_topdir "$(shell readlink -f $(BUILDDIR)) -ba rpm/$(PKGNAME).spec
rpm: $(RPMPKGPATH)
rpm-clean:
rm -rf $(RPMPKGPATH) $(BUILDDIR)/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpm-install: rpm
rpm -iv $(RPMPKGPATH)
.PHONY: all clean deb deb-install deb-clean
ixgbevf-dkms (4.3.5-0) unstable; urgency=medium
* ixgbevf 4.3.5 DKMS package.
-- David M. Johnson <johnsond@flux.utah.edu> Thu, 06 Sep 2018 08:40:28 -0600
Source: ixgbevf-dkms
Maintainer: Testbed Operations <testbed-ops@flux.utah.edu>
Build-Depends: debhelper (>= 9), dkms
Package: ixgbevf-dkms
Architecture: all
Depends: ${misc:Depends}
Description: DKMS source for the ixgbevf driver
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
%:
dh $@ --with dkms
override_dh_install:
dh_install \
build/ixgbevf-$(DEB_VERSION_UPSTREAM)/* \
usr/src/ixgbevf-dkms-$(DEB_VERSION_UPSTREAM)
override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM) -- dkms.conf
override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
PACKAGE_NAME="ixgbevf-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
MAKE="'make' -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="'make' -C src/ KERNELDIR=/lib/modules/${kernelver}/build clean"
BUILT_MODULE_LOCATION=src/
BUILT_MODULE_NAME[0]="ixgbevf"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"
%define module ixgbevf
%define name %{module}-dkms
%define version 4.3.5
%define release 0
%define srcdirname %{module}-%{version}
Source: http://www.emulab.net/downloads/linux-dkms/%{module}-%{version}.tar.gz
Summary: DKMS version of the ixgbevf kernel module
Name: %{name}
Version: %{version}
License: GPLv2
Release: 0
BuildArch: noarch
Requires: dkms gcc kernel-devel
%description
DKMS version of the ixgbevf kernel module.
%prep
%setup -n %{srcdirname}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/src/%{module}-%{version}/
cp -pR %{_builddir}/%{srcdirname}/* %{buildroot}/usr/src/%{module}-%{version}/
cp -p %{_sourcedir}/dkms.conf %{buildroot}/usr/src/%{module}-%{version}/
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root)
%attr(0755,root,root) /usr/src/%{module}-%{version}/
%post
occurrences=`/usr/sbin/dkms status | grep "%{module}" | grep "%{version}" | wc -l`
if [ $occurrences -eq 0 ]; then
/usr/sbin/dkms add -m %{module} -v %{version}
fi
/usr/sbin/dkms build -m %{module} -v %{version}
/usr/sbin/dkms install -m %{module} -v %{version}
exit 0
%preun
/usr/sbin/dkms remove -m %{module} -v %{version} --all
exit 0
%changelog
* Thu Sep 06 2018 David M. Johnson <johnsond@flux.utah.edu> 4.3.5-0
- Initial release of DKMS version of the ixgbevf kernel module.
#! /bin/sh
URLBASE=http://www.emulab.net/downloads/linux-dkms
TARBALLDIR="$1"
shift
mkdir -p $TARBALLDIR
for file in $@; do
outfile="$TARBALLDIR/$file"
tmpfile="$outfile.tmp"
[ -f "$outfile" ] && continue
rm -f "$tmpfile"
wget -O "$tmpfile" "$URLBASE/$file"
if [ $? -ne 0 ]; then
rm -f "$tmpfile"
break
fi
mv -f "$TARBALLDIR/$file.tmp" "$TARBALLDIR/$file"
done