Commit e30c9aa3 authored by David Johnson's avatar David Johnson

Add deb/rpm DKMS packaging options for linux ipod module.

(This would enable automatic ipod module rebuilds on kernel installation.)
parent 9f89a45f
emulab-ipod-dkms (3.0.0-0) unstable; urgency=medium
* Initial release of Emulab IPOD kernel module DKMS support.
-- David M. Johnson <johnsond@flux.utah.edu> Wed, 5 Sep 2018 13:42:44 -0600
Source: emulab-ipod-dkms
Maintainer: Testbed Operations <testbed-ops@flux.utah.edu>
Build-Depends: debhelper (>= 9), dkms
Package: emulab-ipod-dkms
Architecture: all
Depends: ${misc:Depends}
Description: DKMS source for the Emulab IPOD ping-of-death driver
PACKAGE_NAME="emulab-ipod-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
BUILT_MODULE_NAME[0]="ipod"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="NO"
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
%:
dh $@ --with dkms
override_dh_install:
dh_install --list-missing \
Makefile ipod.c usr/src/emulab-ipod-dkms-$(DEB_VERSION_UPSTREAM)
override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM)
override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
#include <linux/version.h> #include <linux/version.h>
#include <linux/limits.h> #include <linux/limits.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Flux Research Group");
MODULE_VERSION("3.0.0");
#define IPOD_ICMP_TYPE 6 #define IPOD_ICMP_TYPE 6
#define IPOD_ICMP_CODE 6 #define IPOD_ICMP_CODE 6
...@@ -299,4 +303,3 @@ static void __exit ipod_cleanup_module(void) { ...@@ -299,4 +303,3 @@ static void __exit ipod_cleanup_module(void) {
module_init(ipod_init_module); module_init(ipod_init_module);
module_exit(ipod_cleanup_module); module_exit(ipod_cleanup_module);
MODULE_LICENSE("GPL");
PACKAGE_NAME="emulab-ipod-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
BUILT_MODULE_NAME[0]="ipod"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="NO"
%define module emulab-ipod-dkms
Summary: Emulab IPOD ping-of-death DKMS kernel module
Name: %{module}
Version: 3.0.0
License: GPL
Release: 0
BuildArch: noarch
Requires: dkms gcc kernel-devel
%description
Emulab IPOD ping-of-death DKMS kernel module
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/src/%{module}-%{version}/
echo %{getenv:IPODSRCDIR}
cp %{getenv:IPODSRCDIR}/Makefile %{buildroot}/usr/src/%{module}-%{version}
cp %{getenv:IPODSRCDIR}/ipod.c %{buildroot}/usr/src/%{module}-%{version}
cp %{getenv:IPODSRCDIR}/rpm/emulab-ipod-dkms.conf %{buildroot}/usr/src/%{module}-%{version}/dkms.conf
%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
* Wed Sep 05 2018 David M. Johnson <johnsond@flux.utah.edu> 3.0.0-0
- Initial release of Emulab IPOD kernel module DKMS support.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment