Commit e08f90ba authored by David Johnson's avatar David Johnson

Add ipod linux module deb and rpm dkms build targets.

parent 23f93e97
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
......@@ -25,6 +25,7 @@ obj-m += ipod.o
KDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
VERSION ?= 3.0.0-0
$(MAKE) -C $(KDIR) M=$(PWD) modules
......@@ -34,3 +35,23 @@ install:
$(MAKE) -C $(KDIR) M=$(PWD) clean
emulab-ipod-dkms_$(VERSION)_all.deb: debian/control debian/rules debian/changelog debian/compat debian/emulab-ipod-dkms.dkms
dpkg-buildpackage -us -uc
mv ../emulab-ipod-dkms_$(VERSION)_all.deb .
deb-dkms: emulab-ipod-dkms_$(VERSION)_all.deb
deb-dkms-install: deb-dkms
dpkg -i emulab-ipod-dkms_$(VERSION)_all.deb
rpmbuild/RPMS/noarch/emulab-ipod-dkms-$(VERSION).noarch.rpm: rpm/emulab-ipod-dkms.conf rpm/emulab-ipod-dkms.spec
mkdir -p rpmbuild/{RPMS,SRPMS,SPECS,SOURCES}
cp -p Makefile ipod.c rpm/emulab-ipod-dkms.conf rpmbuild/SOURCES
rpmbuild --define "_topdir "$(shell readlink -f rpmbuild) -ba \
rpm-dkms: rpmbuild/RPMS/noarch/emulab-ipod-dkms-$(VERSION).noarch.rpm
rpm-dkms-install: rpm-dkms
rpm -iv rpmbuild/RPMS/noarch/emulab-ipod-dkms-$(VERSION).noarch.rpm
......@@ -14,10 +14,9 @@ Emulab IPOD ping-of-death DKMS kernel module
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
cp %{_sourcedir}/Makefile %{buildroot}/usr/src/%{module}-%{version}
cp %{_sourcedir}/ipod.c %{buildroot}/usr/src/%{module}-%{version}
cp %{_sourcedir}/emulab-ipod-dkms.conf %{buildroot}/usr/src/%{module}-%{version}/dkms.conf
rm -rf %{buildroot}
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