mirror of
https://github.com/dvorka/hstr.git
synced 2025-01-02 21:22:03 +08:00
69 lines
1.8 KiB
Bash
Executable file
69 lines
1.8 KiB
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Copyright (C) 2014-2018 Martin Dvorak <martin.dvorak@mindforger.com>
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
export SCRIPTHOME=`pwd`
|
|
|
|
. ./debian-env.sh
|
|
|
|
function createChangelog() {
|
|
# Debian tooling changelog hints:
|
|
# - signature line MUST have one whitespace prefix
|
|
# - signature line MUST have double space between email and timestamp
|
|
# - traling lines must have exactly one space
|
|
|
|
export MYTS=`date "+%a, %d %b %Y %H:%M:%S"`
|
|
echo "Changelog timestamp: ${MYTS}"
|
|
echo -e "hstr (${HHFULLVERSION}) ${UBUNTUVERSION}; urgency=low" > $1
|
|
echo " " >> $1
|
|
echo -e " * ${HHBZRMSG}" >> $1
|
|
echo " " >> $1
|
|
echo " -- Martin Dvorak (Dvorka) <martin.dvorak@mindforger.com> ${MYTS} +0100" >> $1
|
|
}
|
|
|
|
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}
|
|
}
|
|
|
|
echo -e "\n_ HSTR deb build _______________________________________________\n"
|
|
|
|
rm -rvf ../debian
|
|
cp -rvf ${HHSRC}/debian ..
|
|
|
|
createChangelog ../debian/changelog
|
|
cp -vf debian/rules ../debian/rules
|
|
cp -vf debian/hstr.dirs ../debian/hstr.dirs
|
|
cp -vf debian/watch ../debian/watch
|
|
|
|
# cleanup
|
|
rm -vrf ../dist ../bin ../doc ../pad.xml
|
|
|
|
cd ../..
|
|
mv hstr ${HH}
|
|
cd ${HH}
|
|
|
|
createTarball
|
|
|
|
debuild -us -uc
|
|
debuild -S
|
|
|
|
# eof
|