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/arch.sh

49 lines
1.5 KiB
Bash
Raw Normal View History

2013-07-12 11:36:28 +02:00
#!/bin/bash
APP=pybitmessage
2014-11-02 14:21:51 +01:00
PREV_VERSION=0.4.4
2016-05-02 16:26:47 +02:00
VERSION=0.6.0
2013-07-12 11:36:28 +02:00
RELEASE=1
ARCH_TYPE=any
2013-07-12 11:36:28 +02:00
CURRDIR=`pwd`
SOURCE=archpackage/${APP}-${VERSION}.tar.gz
# Update version numbers automatically - so you don't have to
sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.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
# Create the source code
make clean
rm -f archpackage/*.gz
2014-11-02 14:21:51 +01:00
# having the root directory called name-version seems essential
2013-09-28 14:09:15 +02:00
mv ../${APP} ../${APP}-${VERSION}
2013-07-12 11:36:28 +02:00
tar -cvzf ${SOURCE} ../${APP}-${VERSION} --exclude-vcs
2014-11-02 14:21:51 +01:00
# rename the root directory without the version number
2013-09-28 14:09:15 +02:00
mv ../${APP}-${VERSION} ../${APP}
2013-07-12 11:36:28 +02:00
2014-11-02 14:21:51 +01:00
# calculate the MD5 checksum
2013-07-12 11:36:28 +02:00
CHECKSM=$(md5sum ${SOURCE})
sed -i "s/md5sums[^)]*)/md5sums=(${CHECKSM%% *})/g" archpackage/PKGBUILD
2013-09-28 14:09:15 +02:00
cd archpackage
# Create the package
tar -c -f ${APP}-${VERSION}.pkg.tar .
sync
xz ${APP}-${VERSION}.pkg.tar
sync
# Move back to the original directory
cd ${CURRDIR}