* new options
* including pre/post installation scripts
* packing for tgz and versioning
- -- Michael Wagner <michael@wagnertech.de> Fr 10. Aug 22:54:48 CEST 2018
+ -- Michael Wagner <michael@wagnertech.de> 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 <michael@wagnertech.de> Mon, 12 Feb 2018 09:45:25 +0100
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
}
function check_version {
+
vline=$(head -1 debian/$paket.changelog)
vline=${vline%-*}
clversion=${vline#*(}
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"
if [ $configure -eq 1 ]
then
+ # delete changelog and control
+ rm debian/changelog debian/control || true
+
echo "paket=$paket" > debian/rules.pre
# shift
ARCH=""
# 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
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 <mail@wagnertech.de>
- " > 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
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 ]
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
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