ebuild.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. APP=pybitmessage
  3. PREV_VERSION=0.3.5
  4. VERSION=0.3.5
  5. RELEASE=1
  6. SOURCEDIR=.
  7. ARCH_TYPE=`uname -m`
  8. CURRDIR=`pwd`
  9. SOURCE=~/ebuild/${APP}-${VERSION}.tar.gz
  10. # Update version numbers automatically - so you don't have to
  11. sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.sh arch.sh puppy.sh slack.sh
  12. sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec
  13. sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec
  14. sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD
  15. sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD
  16. sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs
  17. sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs
  18. sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh
  19. sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links
  20. # create the source code in the SOURCES directory
  21. make clean
  22. mkdir -p ~/ebuild
  23. rm -f ${SOURCE}
  24. mv ../${APP} ../${APP}-${VERSION}
  25. tar -cvzf ${SOURCE} ../${APP}-${VERSION} --exclude-vcs
  26. # rename the root directory without the version number
  27. mv ../${APP}-${VERSION} ../${APP}