From 2cb6a627e61a5bf8f1eec7e68f0e34d48672a083 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Wed, 16 Sep 2015 17:31:10 +0200 Subject: [PATCH] simplify trc6500-master-file packaging --- trc6500-master-file/Makefile | 14 ++++++-------- trc6500-master-file/{debian-binary => binary} | 0 .../{debian/debian-changelog => changelog} | 0 .../{debian/debian-control => control} | 0 .../{debian/debian-postinst => postinst} | 0 .../{debian/debian-postrm => postrm} | 0 .../{debian/debian-preinst => preinst} | 0 7 files changed, 6 insertions(+), 8 deletions(-) rename trc6500-master-file/{debian-binary => binary} (100%) rename trc6500-master-file/{debian/debian-changelog => changelog} (100%) rename trc6500-master-file/{debian/debian-control => control} (100%) rename trc6500-master-file/{debian/debian-postinst => postinst} (100%) rename trc6500-master-file/{debian/debian-postrm => postrm} (100%) rename trc6500-master-file/{debian/debian-preinst => preinst} (100%) diff --git a/trc6500-master-file/Makefile b/trc6500-master-file/Makefile index a9850dc..6573fe1 100644 --- a/trc6500-master-file/Makefile +++ b/trc6500-master-file/Makefile @@ -2,8 +2,6 @@ DIR = ../master/ -CONFIGDIR = debian/ - FILES = $(shell cd $(DIR); find etc/ -type f) TARGET = ../$(MODULE)_$(VERSION)_$(ARCH).deb @@ -19,7 +17,7 @@ ARCH = all .DEFAULT: all .PHONY: clean deb all -VERSION = $(shell awk '/^$(MODULE)/ { gsub(/[()]/, ""); print $$2; exit }' debian/debian-changelog) +VERSION = $(shell awk '/^$(MODULE)/ { gsub(/[()]/, ""); print $$2; exit }' changelog) all: $(TARGET) deb @@ -31,7 +29,7 @@ deb: rm -rf deb mkdir --parent deb/etc/webconfig/ deb/etc/default/ deb/DEBIAN -deb/DEBIAN/preinst: debian/debian-preinst deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST) +deb/DEBIAN/preinst: preinst deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST) rm -f $@ cat $< > $@~ for f in $(FILES); do echo '[ -f "/'$$f'" ] && dpkg-divert --add /'$$f; done >>$@~ @@ -39,7 +37,7 @@ deb/DEBIAN/preinst: debian/debian-preinst deb $(addprefix $(DIR)/, $(FILES)) $(M chmod +x $@~ mv $@~ $@ -deb/DEBIAN/postrm: debian/debian-postrm deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST) +deb/DEBIAN/postrm: postrm deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST) rm -f $@ cat $< > $@~ for f in $(FILES); do echo '[ -f "/'$$f'" ] && dpkg-divert --remove /'$$f; done >>$@~ @@ -47,13 +45,13 @@ deb/DEBIAN/postrm: debian/debian-postrm deb $(addprefix $(DIR)/, $(FILES)) $(MAK chmod +x $@~ mv $@~ $@ -deb/DEBIAN/postinst: debian/debian-postinst deb +deb/DEBIAN/postinst: postinst deb cp $< $@ $(TARGET): deb $(OBJECTS) - sed s/@@version@@/$(VERSION)/ debian/debian-control > deb/DEBIAN/control + sed s/@@version@@/$(VERSION)/ control > deb/DEBIAN/control mkdir -p deb/usr/share/doc/$(MODULE) - cp debian/debian-changelog deb/usr/share/doc/$(MODULE)/changelog + cp changelog deb/usr/share/doc/$(MODULE)/changelog cp -r $(DIR)/* deb/ fakeroot dpkg --build deb mv deb.deb $@ diff --git a/trc6500-master-file/debian-binary b/trc6500-master-file/binary similarity index 100% rename from trc6500-master-file/debian-binary rename to trc6500-master-file/binary diff --git a/trc6500-master-file/debian/debian-changelog b/trc6500-master-file/changelog similarity index 100% rename from trc6500-master-file/debian/debian-changelog rename to trc6500-master-file/changelog diff --git a/trc6500-master-file/debian/debian-control b/trc6500-master-file/control similarity index 100% rename from trc6500-master-file/debian/debian-control rename to trc6500-master-file/control diff --git a/trc6500-master-file/debian/debian-postinst b/trc6500-master-file/postinst similarity index 100% rename from trc6500-master-file/debian/debian-postinst rename to trc6500-master-file/postinst diff --git a/trc6500-master-file/debian/debian-postrm b/trc6500-master-file/postrm similarity index 100% rename from trc6500-master-file/debian/debian-postrm rename to trc6500-master-file/postrm diff --git a/trc6500-master-file/debian/debian-preinst b/trc6500-master-file/preinst similarity index 100% rename from trc6500-master-file/debian/debian-preinst rename to trc6500-master-file/preinst -- 2.30.2