jobcomm/armagetronad-git/PKGBUILD

88 lines
2.7 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcomm/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
_pkgname=armagetronad
pkgname=${_pkgname}-git
pkgver=v0.2.9.2.3+r2793+g391a7462
#r5654.4bf6245a
pkgrel=02
pkgdesc='A Tron Clone in 3D'
url='http://armagetronad.net/'
depends=('sdl_image' 'libxml2' 'sdl_mixer' 'ftgl' 'hicolor-icon-theme') # 'protobuf' 'boost-libs'
optdepends=('python: language updater'
'glew: Graphics on X11'
'glew-wayland: Graphics on Wayland')
makedepends=('boost')
#makedepends=('python' 'git')
provides=('armagetronad')
conflicts=('armagetronad')
#_commit=568a186d1c89e08f9a144631bbcc6bf901504203 # tags/v0.2.9.1.1
#source=("git+https://gitlab.com/armagetronad/armagetronad.git#commit=$_commit")
source=("git+https://gitlab.com/armagetronad/armagetronad.git")
# short
#pkgver() {
# cd "${srcdir}/${_pkgname}"
# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
#}
# long
pkgver() {
cd "${srcdir}/${_pkgname}"
git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}
prepare(){
cd "${srcdir}/${_pkgname}"
2to3 -w language/update.py
}
build() {
cd "${srcdir}/${_pkgname}"
./bootstrap.sh
./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--disable-games \
--enable-automakedefaults \
--disable-uninstall
sed -i -r \
-e 's/^LIBS = (.*)/LIBS = \1 \/usr\/lib\/libabsl_log_internal_message.so/' \
-e 's/^LIBS = (.*)/LIBS = \1 \/usr\/lib\/libabsl_log_internal_check_op.so/' \
-e 's/^LIBS = (.*)/LIBS = \1 \/usr\/lib\/libabsl_raw_logging_internal.so/' \
-e 's/^LIBS = (.*)/LIBS = \1 \/usr\/lib\/libabsl_spinlock_wait.so/' \
src/Makefile
make
}
package() {
cd "${srcdir}/${_pkgname}"
make DESTDIR="$pkgdir" install
# install -D -m 644 "desktop/armagetronad.desktop" "$pkgdir/usr/share/applications/armagetronad.desktop"
for f in 16x16 32x32 48x48; do
ln -s /usr/share/armagetronad/desktop/icons/$f/armagetronad.png "$pkgdir/usr/share/icons/hicolor/$f/apps/armagetronad.png"
done
mv "${pkgdir}/usr/bin/armagetronad" "${pkgdir}/usr/bin/armagetronad_bin"
printf "#!/bin/bash\n/usr/bin/armagetronad_bin --configdir /etc/armagetronad --datadir /usr/share/armagetronad" > "${pkgdir}/usr/bin/armagetronad"
chmod +x "${pkgdir}/usr/bin/armagetronad"
}
#---- arch license gpg-key & sha256sums ----
arch=('x86_64')
license=('GPL')
sha256sums=(SKIP)
## e4bb0eeecbd8c1c14a237dddea40ea7b5b1a6cc9e91475112ea0ae3f004af8a6 armagetronad-git-v0.2.9.2.3+r2793+g391a7462-02-x86_64.pkg.tar.lz