This repository has been archived on 2024-12-03. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-03/debian.sh
coolbeans7 d9c60d8e5f Update debian.sh
Sentence cased some comments, capitalized a noun
2014-01-24 08:20:28 -08:00

47 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
APP=pybitmessage
PREV_VERSION=0.4.2
VERSION=0.4.2
RELEASE=1
ARCH_TYPE=all
DIR=${APP}-${VERSION}
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
make clean
make
# Change the parent directory name to Debian format
mv ../${APP} ../${DIR}
# Create a source archive
make source
# Build the package
dpkg-buildpackage -F
# Sign files
gpg -ba ../${APP}_${VERSION}-1_${ARCH_TYPE}.deb
gpg -ba ../${APP}_${VERSION}.orig.tar.gz
# Restore the parent directory name
mv ../${DIR} ../${APP}