Skip to content

Instantly share code, notes, and snippets.

@leper
Created January 24, 2012 23:07
Show Gist options
  • Save leper/1673362 to your computer and use it in GitHub Desktop.
Save leper/1673362 to your computer and use it in GitHub Desktop.
0ad alpha 8 pkgbuild
# arg 1: the new package version
post_install() {
cat << EOF
Note:
==> In order to play the game, execute it as follows:
==> 0ad
==> You can also run the game editor with this command:
==> 0ad -editor
==> Have fun!
EOF
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install $1
}
op=$1
shift
$op $*
# Maintainer: t3ddy <t3ddy1988 "at" gmail {dot} com>
# Contributor: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
pkgname=0ad
pkgver=alpha_8
_pkgver=r10803-alpha
pkgrel=2
pkgdesc="Cross-platform, 3D and historically-based real-time strategy game"
arch=('i686' 'x86_64')
url="http://wildfiregames.com/0ad"
license=('GPL2' 'CCPL')
depends=('binutils' 'boost-libs' 'curl' 'enet>=1.3' 'gamin' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'openal' 'openexr' 'python2' 'sdl' 'wxgtk' 'zip' 'zlib')
makedepends=('boost' 'cmake')
conflicts=('0ad-svn' '0ad-ppa-wfg')
provides=('0ad')
source=("http://releases.wildfiregames.com/$pkgname-$_pkgver-unix-build.tar.xz"
"http://releases.wildfiregames.com/$pkgname-$_pkgver-unix-data.tar.xz"
"${pkgname}.install")
sha256sums=('fbf91d8482267384f8fb3fdd8a71e79ed71d73489c531f814fca70840043b928'
'cb4d2b4c4ce1eadff4d34127664a6de02f9b062007275507d80d9ee6ebbae7d9'
'4c0bd4f55f710ff27c3e27b4ddf97839a8b54c98f884a44a6c01abc7be4e66fc')
build(){
cd "$srcdir/$pkgname-$_pkgver/build/workspaces"
sed -i 's/unix_names = { "boost_signals-mt", "boost_filesystem-mt", "boost_system-mt" },/unix_names = { "boost_signals", "boost_filesystem", "boost_system" },/g' "${srcdir}/${pkgname}-${_pkgver}/build/premake/extern_libs4.lua"
./update-workspaces.sh --with-system-enet --bindir=/usr/bin --libdir=/usr/lib --datadir=/usr/share/${pkgname}/data
cd "$srcdir/$pkgname-$_pkgver/build/workspaces/gcc"
make CONFIG=Release
}
package(){
install -d ${pkgdir}/usr/{bin,lib,share/${pkgname}/data}
# We don't install ActorEditor or test
cp ${srcdir}/${pkgname}-${_pkgver}/binaries/system/pyrogenesis ${pkgdir}/usr/bin
cp ${srcdir}/${pkgname}-${_pkgver}/binaries/system/*.so{,.1.0} ${pkgdir}/usr/lib
cp -r ${srcdir}/${pkgname}-${_pkgver}/binaries/data ${pkgdir}/usr/share/${pkgname}
install -D -m 0755 "${srcdir}/${pkgname}-${_pkgver}/build/resources/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
install -D -m 0644 "${srcdir}/$pkgname-$_pkgver/build/resources/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -D -m 0644 "${srcdir}/$pkgname-$_pkgver/build/resources/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment