#!/usr/bin/make -f VERSION := $(shell dpkg-parsechangelog -S version | cut -d- -f1) %: dh $@ --with dkms override_dh_auto_configure: override_dh_auto_build: override_dh_auto_test: override_dh_auto_install: install -d debian/xpadneo-dkms/usr/src/hid-xpadneo-$(VERSION) cp -r hid-xpadneo/src debian/xpadneo-dkms/usr/src/hid-xpadneo-$(VERSION)/ cp hid-xpadneo/Makefile debian/xpadneo-dkms/usr/src/hid-xpadneo-$(VERSION)/ sed -e 's/@DO_NOT_CHANGE@/$(VERSION)/g' \ -e '/^POST_INSTALL=/d' \ -e '/^POST_REMOVE=/d' \ hid-xpadneo/dkms.conf.in \ > debian/xpadneo-dkms/usr/src/hid-xpadneo-$(VERSION)/dkms.conf install -d debian/xpadneo-dkms/usr/lib/modprobe.d install -m 644 hid-xpadneo/etc-modprobe.d/xpadneo.conf \ debian/xpadneo-dkms/usr/lib/modprobe.d/ install -d debian/xpadneo-dkms/usr/lib/udev/rules.d install -m 644 hid-xpadneo/etc-udev-rules.d/*.rules \ debian/xpadneo-dkms/usr/lib/udev/rules.d/ install -d debian/xpadneo-dkms/usr/share/metainfo install -m 644 xpadneo.metainfo.xml \ debian/xpadneo-dkms/usr/share/metainfo/io.github.atar_axis.xpadneo.metainfo.xml override_dh_installdeb: sed 's/@VERSION@/$(VERSION)/g' debian/xpadneo-dkms.preinst.in > debian/xpadneo-dkms.preinst sed 's/@VERSION@/$(VERSION)/g' debian/xpadneo-dkms.postinst.in > debian/xpadneo-dkms.postinst sed 's/@VERSION@/$(VERSION)/g' debian/xpadneo-dkms.prerm.in > debian/xpadneo-dkms.prerm sed 's/@VERSION@/$(VERSION)/g' debian/xpadneo-dkms.postrm.in > debian/xpadneo-dkms.postrm dh_installdeb override_dh_auto_clean: rm -f debian/xpadneo-dkms.preinst debian/xpadneo-dkms.postinst debian/xpadneo-dkms.prerm debian/xpadneo-dkms.postrm