2014-01-05 06:08:23 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
export SCRIPTHOME=`pwd`
|
|
|
|
|
2014-01-26 06:05:30 +08:00
|
|
|
. ./debian-env.sh
|
2014-01-05 06:08:23 +08:00
|
|
|
|
2014-01-05 17:43:21 +08:00
|
|
|
function createChangelog() {
|
2015-09-18 01:10:22 +08:00
|
|
|
# Debian tooling changelog hints:
|
2015-09-17 13:30:08 +08:00
|
|
|
# - signature line MUST have one whitespace prefix
|
|
|
|
# - signature line MUST have double space between email and timestamp
|
|
|
|
# - traling lines must have exactly one space
|
|
|
|
|
2014-01-05 17:43:21 +08:00
|
|
|
export MYTS=`date "+%a, %d %b %Y %H:%M:%S"`
|
|
|
|
echo "Changelog timestamp: ${MYTS}"
|
2015-09-10 16:13:58 +08:00
|
|
|
echo -e "hstr (${HHFULLVERSION}) ${UBUNTUVERSION}; urgency=low" > $1
|
2015-09-17 13:30:08 +08:00
|
|
|
echo " " >> $1
|
2014-01-05 17:43:21 +08:00
|
|
|
echo -e " * ${HHBZRMSG}" >> $1
|
2015-09-17 13:30:08 +08:00
|
|
|
echo " " >> $1
|
2015-09-18 01:10:22 +08:00
|
|
|
echo " -- Martin Dvorak (Dvorka) <martin.dvorak@mindforger.com> ${MYTS} +0100" >> $1
|
2014-01-05 17:43:21 +08:00
|
|
|
}
|
|
|
|
|
2014-01-05 18:04:01 +08:00
|
|
|
function createTarball() {
|
|
|
|
cd ..
|
|
|
|
mkdir work
|
|
|
|
cd work
|
|
|
|
cp -vrf ../${HH} .
|
|
|
|
rm -rvf ${HH}/.bzr
|
|
|
|
tar zcf ../${HH}.tgz ${HH}
|
|
|
|
cp -vf ../${HH}.tgz ../${HH}.orig.tar.gz
|
|
|
|
cd ../${HH}
|
|
|
|
}
|
|
|
|
|
2015-09-10 16:13:58 +08:00
|
|
|
echo -e "\n_ HSTR deb build _______________________________________________\n"
|
2014-01-05 18:04:01 +08:00
|
|
|
|
2014-01-05 06:08:23 +08:00
|
|
|
rm -rvf ../debian
|
|
|
|
cp -rvf ${HHSRC}/debian ..
|
|
|
|
|
2014-01-05 17:43:21 +08:00
|
|
|
createChangelog ../debian/changelog
|
2014-01-26 06:05:30 +08:00
|
|
|
cp -vf debian/rules ../debian/rules
|
2015-09-10 16:13:58 +08:00
|
|
|
cp -vf debian/hstr.dirs ../debian/hstr.dirs
|
2014-01-26 17:48:37 +08:00
|
|
|
cp -vf debian/watch ../debian/watch
|
2014-01-05 06:08:23 +08:00
|
|
|
|
|
|
|
cd ../..
|
2015-09-10 16:13:58 +08:00
|
|
|
mv hstr ${HH}
|
2014-01-05 06:08:23 +08:00
|
|
|
cd ${HH}
|
2014-01-05 18:04:01 +08:00
|
|
|
|
|
|
|
createTarball
|
|
|
|
|
2014-01-26 06:05:30 +08:00
|
|
|
debuild -us -uc
|
|
|
|
debuild -S
|
2014-01-05 06:08:23 +08:00
|
|
|
|
|
|
|
# eof
|