Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
* modified build-debian-package.sh to be able to handle multiple vers…
Browse files Browse the repository at this point in the history
…ions of Ubuntu
  • Loading branch information
Konrad Gräfe committed May 8, 2010
1 parent e66b614 commit a226054
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 25 deletions.
54 changes: 30 additions & 24 deletions build-debian-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
PROJECT=pidgin-birthday-reminder
VERSION=$(cat VERSION)
REPOSITORY=ppa:konradgraefe/pidgin-plugins
DISTRIBUTIONS="karmic lucid"

if [ -f DEB_REVISION ]; then
DEB_REVISION=$(cat DEB_REVISION)
else
Expand All @@ -25,36 +27,40 @@ if [ "$in" != "" ]; then
echo $DEB_REVISION >DEB_REVISION
fi

rm -rf deb-pkg
mkdir deb-pkg
cd deb-pkg
for dist in $DISTRIBUTIONS
do

tar xzvf ../${PROJECT}-${VERSION}.tar.gz
rm -rf deb-pkg
mkdir deb-pkg
cd deb-pkg

cd ${PROJECT}-${VERSION}
tar xzvf ../${PROJECT}-${VERSION}.tar.gz

cp -r ${src_dir}/debian .
sed \
-e "s/@@VERSION@@/${VERSION}/" \
-e "s/@@DATE@@/$(date -R)/" \
-e "s/@@DEB_REVISION@@/${DEB_REVISION}/" \
debian/changelog.in >debian/changelog
cd ${PROJECT}-${VERSION}

sed \
-e "s/@@DATE@@/$(date -R)/" \
debian/copyright.in >debian/copyright
cp -r ${src_dir}/debian .
sed \
-e "s/@@VERSION@@/${VERSION}/" \
-e "s/@@DATE@@/$(date -R)/" \
-e "s/@@DEB_REVISION@@/${DEB_REVISION}/" \
-e "s/@@DISTRIBUTION@@/${dist}/" \
debian/changelog.in >debian/changelog

dpkg-buildpackage -S -rfakeroot
sed \
-e "s/@@DATE@@/$(date -R)/" \
debian/copyright.in >debian/copyright

cd ..
lintian -i *.dsc
dpkg-buildpackage -S -rfakeroot

echo ""
echo -n "Upload ${PROJECT}_${VERSION}-${DEB_REVISION} to repository (y/N) "
read -n 1 in
echo ""
cd ..
lintian -i *.dsc

if [ "$in" == "y" ]; then
dput ${REPOSITORY} ${PROJECT}_${VERSION}-${DEB_REVISION}_source.changes
fi
echo ""
echo -n "Upload ${PROJECT}_${VERSION}-${DEB_REVISION} to $dist repository (y/N) "
read -n 1 in
echo ""

if [ "$in" == "y" ]; then
dput ${REPOSITORY} ${PROJECT}_${VERSION}-${DEB_REVISION}_source.changes
fi
done
2 changes: 1 addition & 1 deletion debian/changelog.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pidgin-birthday-reminder (@@VERSION@@-@@DEB_REVISION@@) karmic; urgency=low
pidgin-birthday-reminder (@@VERSION@@-@@DEB_REVISION@@) @@DISTRIBUTION@@; urgency=low

* release version @@VERSION@@

Expand Down

0 comments on commit a226054

Please sign in to comment.