PyBitmessage/packages/unmaintained/debian.sh

49 lines
1.4 KiB
Bash
Raw Normal View History

2013-04-01 21:23:32 +02:00
#!/bin/bash
APP=pybitmessage
2016-05-02 16:26:47 +02:00
PREV_VERSION=0.4.4
VERSION=0.6.0
2013-06-30 17:16:41 +02:00
RELEASE=1
ARCH_TYPE=all
2013-07-12 11:36:28 +02:00
DIR=${APP}-${VERSION}
2016-05-02 16:26:47 +02:00
CURDIR=`pwd`
SHORTDIR=`basename ${CURDIR}`
2013-04-01 21:23:32 +02:00
2013-07-12 11:36:28 +02:00
if [ $ARCH_TYPE == "x86_64" ]; then
ARCH_TYPE="amd64"
fi
if [ $ARCH_TYPE == "i686" ]; then
ARCH_TYPE="i386"
fi
# Update version numbers automatically - so you don't have to
sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile rpm.sh arch.sh puppy.sh ebuild.sh slack.sh
sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec
sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec
sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD
sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD
sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs
sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs
sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh
sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links
2013-06-03 21:13:52 +02:00
2013-04-01 21:23:32 +02:00
make clean
2013-07-12 11:36:28 +02:00
make
# Change the parent directory name to Debian format
2016-05-02 16:26:47 +02:00
mv ../${SHORTDIR} ../${DIR}
2013-07-12 11:36:28 +02:00
# Create a source archive
make sourcedeb
2013-04-01 21:23:32 +02:00
# Build the package
2016-05-02 16:26:47 +02:00
dpkg-buildpackage -F -us -uc
2013-06-03 21:13:52 +02:00
# Sign files
2013-07-12 11:36:28 +02:00
gpg -ba ../${APP}_${VERSION}-1_${ARCH_TYPE}.deb
2013-04-01 21:23:32 +02:00
gpg -ba ../${APP}_${VERSION}.orig.tar.gz
2013-07-12 11:36:28 +02:00
# Restore the parent directory name
2016-05-02 16:26:47 +02:00
mv ../${DIR} ../${SHORTDIR}