From f522299be48051d2e8f4c6a5de8df828f3c7f7ad Mon Sep 17 00:00:00 2001 From: Michael Wagner Date: Wed, 9 Jan 2019 18:12:24 +0100 Subject: [PATCH] posaune --- debian/mbuild.changelog | 4 ++-- tools/make/mconfigure | 28 ++++++++++++++++++++++++---- tools/make/rules | 3 +++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/debian/mbuild.changelog b/debian/mbuild.changelog index 6c503a9..800b645 100644 --- a/debian/mbuild.changelog +++ b/debian/mbuild.changelog @@ -4,9 +4,9 @@ projects (0.2-%BUILD%) unstable; urgency=medium * new options * including pre/post installation scripts * packing for tgz and versioning - -- Michael Wagner Fr 10. Aug 22:54:48 CEST 2018 + -- Michael Wagner Fri, 10 Aug 2018 22:54:48 +0100 -projects (0.1-%BUILD%) unstable; urgency=medium +projects (0.1-nn) unstable; urgency=medium * Build in neuer git-Umgebung -- Michael Wagner Mon, 12 Feb 2018 09:45:25 +0100 diff --git a/tools/make/mconfigure b/tools/make/mconfigure index b2bff6f..a6e919d 100755 --- a/tools/make/mconfigure +++ b/tools/make/mconfigure @@ -22,6 +22,11 @@ function set_build { then tag="0.0-TOP" fi + tag_paket=${tag%_*} + if [ "$tag_paket" != "$paket" ] + then + tag="0.0-TOP" + fi changes=$(git status -s |grep "^ *M") || true if test -n "$changes" then @@ -37,6 +42,7 @@ function set_build { } function check_version { + vline=$(head -1 debian/$paket.changelog) vline=${vline%-*} clversion=${vline#*(} @@ -45,6 +51,13 @@ function check_version { version=$clversion return fi + + # do no check on a modified git repos + if [ "${build: -1}" == "M" ] + then + return + fi + if [ "$clversion" != $version ] then echo "version mismatch: git: $version, changelog: $clversion" @@ -104,6 +117,9 @@ fi if [ $configure -eq 1 ] then + # delete changelog and control + rm debian/changelog debian/control || true + echo "paket=$paket" > debian/rules.pre # shift ARCH="" @@ -166,7 +182,8 @@ then # copy package control if [ -f debian/$paket.control ] then - cp debian/$paket.control debian/control + # proceed + echo else # try old fashoned way control=$(find etc -name $paket.control) || true @@ -175,12 +192,12 @@ then echo "warning: control file not found" echo " this file is necessary for any package production." else - echo "Source: $pwd + echo "Source: $paket Section: main Priority: optional Maintainer: WagnerTech UG - " > debian/control - grep -v "Version:" $control |grep -v "Maintainer:" >> debian/control + " > debian/$paket.control + grep -v "Version:" $control |grep -v "Maintainer:" >> debian/$paket.control fi fi @@ -209,6 +226,7 @@ then else echo "PACK=version" >> debian/rules.pre fi + cp debian/rules.pre debian/setenv.sh fi if [ $compile -eq 1 -a ! -e debian/$paket.build ] @@ -219,12 +237,14 @@ fi if [ $compile -eq 1 ] then # build artefacts + . debian/setenv.sh debian/rules build fi if [ $pack -eq 1 ] then # build package + . debian/setenv.sh debian/rules pack fi diff --git a/tools/make/rules b/tools/make/rules index 9ddc638..33e72e3 100755 --- a/tools/make/rules +++ b/tools/make/rules @@ -62,6 +62,9 @@ copy: debian/$(paket).cp debian/tmp/DEBIAN/control: debian/control debian/changelog dpkg-gencontrol +debian/control: debian/$(paket).control + cp debian/$(paket).control debian/control + debian/changelog: debian/$(paket).changelog debian/rules.pre sed "s/%BUILD%/$(build)/" debian/$(paket).changelog > debian/changelog # echo "${pwd} (${build}) unstable; urgency=medium" > debian/changelog -- 2.20.1