From 7d0a96e7b5cf4541b07570d54829e152ff9b9a5c Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 7 Feb 2021 11:50:26 +0100 Subject: initial Debian/Devuan commit --- makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..68dd4a8 --- /dev/null +++ b/makefile @@ -0,0 +1,47 @@ +pkgname = my-x200 +exts := md html confd initd sh deb dsc orig.tar.gz debian.tar.xz +findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") +pkgver := 0.6 + +all: install + +clean: + rm -rf .backup + find -iname "*~" | xargs rm -rf + rm -rf $(pkgname)-$(pkgver) + find ./* -type f -iname "makefile" $(findopts) > ls-R + find ./* -type d -iname "debian" >> ls-R + rm -rf etc + rsync -avPr --files-from=ls-R . .backup + rm -rf * + cp -p -r .backup/* . + rm -rf .backup + pandoc -s README.md -o about.html + +prepare: + rm -rf $(pkgname)-$(pkgver) + debian/rules clean + rsync -avPr ./ $(pkgname)-$(pkgver) + tar czf $(pkgname)_$(pkgver).orig.tar.gz $(pkgname)-$(pkgver) + +debian: prepare + $(MAKE) --directory=$(pkgname)-$(pkgver) debian_package + +debian_package: + debuild + +install: + install -Dm755 my-x200.initd $(DESTDIR)etc/init.d/my-x200 + install -Dm644 my-x200.confd $(DESTDIR)etc/default/my-x200 + install -Dm644 my-x200-lid.sh $(DESTDIR)etc/acpi/events/my-x200-lid + install -Dm644 my-x200-sleep.sh $(DESTDIR)etc/acpi/events/my-x200-sleep + install -Dm755 my-x200.sh $(DESTDIR)etc/acpi/my-x200.sh + +uninstall: + rm -rf $(DESTDIR)etc/init.d/my-x200 + rm -rf $(DESTDIR)etc/default/my-x200 + rm -rf $(DESTDIR)etc/acpi/events/my-x200-lid + rm -rf $(DESTDIR)etc/acpi/events/my-x200-sleep + rm -rf $(DESTDIR)etc/acpi/my-x200.sh + +.PHONY: all clean install uninstall prepare debian debian_package -- cgit v1.2.3