From 91e0fccb96d28028d78ea41e34c1990585048d3b Mon Sep 17 00:00:00 2001 From: gnublin Date: Wed, 21 Jun 2017 14:26:52 +0200 Subject: [PATCH] gnublin --- tools/make/configure | 15 +++++++++------ tools/make/makefile | 3 +++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/make/configure b/tools/make/configure index 32b2558..3dfa084 100755 --- a/tools/make/configure +++ b/tools/make/configure @@ -111,12 +111,15 @@ else echo " this file is necessary for any package production." fi -# check for postinst -postinst=$(find src -name $paket.postinst) -if [ -n "$postinst" ] -then - ln -sf $postinst . -fi +# check for installation scripts +files=$(find src -name $paket.preinst) +files="$files $(find src -name $paket.postinst)" +files="$files $(find src -name $paket.prerm)" +files="$files $(find src -name $paket.postrm)" +for file in $files +do + ln -sf $file . +done # create generic make.pre, if not existing if [ ! -f make.pre ] diff --git a/tools/make/makefile b/tools/make/makefile index b2f4944..0dea151 100644 --- a/tools/make/makefile +++ b/tools/make/makefile @@ -60,7 +60,10 @@ copy.stamp: $(COPY_PRE) control.stamp: $(project).control mkdir -p $(project)/DEBIAN cp $(project).control $(project)/DEBIAN/control + if [ -f $(project).preinst ]; then cp $(project).preinst $(project)/DEBIAN/preinst; fi if [ -f $(project).postinst ]; then cp $(project).postinst $(project)/DEBIAN/postinst; fi + if [ -f $(project).prerm ]; then cp $(project).prerm $(project)/DEBIAN/prerm; fi + if [ -f $(project).postrm ]; then cp $(project).postrm $(project)/DEBIAN/postrm; fi @touch control.stamp $(project).zip: copy.stamp $(project) -- 2.20.1