Merge pull request #425 from rakoo/fix-archpackage

Fix Archlinux package creation
This commit is contained in:
Jonathan Warren 2013-08-25 13:15:06 -07:00
commit a20cff425c
1 changed files with 3 additions and 14 deletions

17
arch.sh
View File

@ -1,5 +1,6 @@
#!/bin/bash
GIT_APP=PyBitmessage
APP=pybitmessage
PREV_VERSION=0.3.5
VERSION=0.3.5
@ -25,24 +26,12 @@ make clean
rm -f archpackage/*.gz
# having the root directory called name-version seems essential
mv ../${APP} ../${APP}-${VERSION}
mv ../${GIT_APP} ../${APP}-${VERSION}
tar -cvzf ${SOURCE} ../${APP}-${VERSION} --exclude-vcs
# rename the root directory without the version number
mv ../${APP}-${VERSION} ../${APP}
mv ../${APP}-${VERSION} ../${GIT_APP}
# calculate the MD5 checksum
CHECKSM=$(md5sum ${SOURCE})
sed -i "s/md5sums[^)]*)/md5sums=(${CHECKSM%% *})/g" archpackage/PKGBUILD
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}