diff options
author | David A. Redick | 2018-07-06 00:32:28 +0000 |
---|---|---|
committer | David A. Redick | 2018-07-06 00:32:28 +0000 |
commit | 95bbdc137b89ed78d9f774b73ec7e502053af195 (patch) | |
tree | 72f2437d9e5d63f9d503aa986d13a368b90f6f3c | |
parent | 35e4a0cd880a99fe23839bb7d0353094a31e8682 (diff) | |
download | aur-95bbdc137b89ed78d9f774b73ec7e502053af195.tar.gz |
Stopped using the games directory. Make highscore group users instead of games
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 76 | ||||
-rw-r--r-- | games.dir.patch | 13 | ||||
-rw-r--r-- | tecnoballz.install | 13 |
4 files changed, 64 insertions, 43 deletions
@@ -9,13 +9,16 @@ pkgbase = tecnoballz depends = sdl_image depends = sdl_mixer depends = tinyxml - backup = var/games/tecnoballz/tecnoballz.hi + depends = libmikmod + backup = var/lib/tecnoballz/tecnoballz.hi source = http://linux.tlk.fr/games/TecnoballZ/download/tecnoballz-0.93.1.tgz source = tecnoballz.xpm source = tecnoballz.desktop + source = games.dir.patch md5sums = 7beeacb06fa841382f0ecbe73f64723a md5sums = 5b8d94612523353b6d2eb32f840b58d8 md5sums = eec9a3f78b51647b41c3e4c6d1d19ce9 + md5sums = 92793da20387db8c32646052a85e56d7 pkgname = tecnoballz @@ -6,38 +6,56 @@ pkgname=tecnoballz pkgver=0.93.1 pkgrel=2 arch=('i686' 'x86_64') -pkgdesc="An exciting brick breaker game" -url="http://linux.tlk.fr/games/TecnoballZ/" -depends=('sdl_image' 'sdl_mixer' 'tinyxml') +pkgdesc='An exciting brick breaker game' +url='http://linux.tlk.fr/games/TecnoballZ/' +depends=('sdl_image' 'sdl_mixer' 'tinyxml' 'libmikmod') license=('GPL3') -backup=('var/games/tecnoballz/tecnoballz.hi') -source=(http://linux.tlk.fr/games/TecnoballZ/download/${pkgname}-${pkgver}.tgz - ${pkgname}.xpm - ${pkgname}.desktop) - -md5sums=('7beeacb06fa841382f0ecbe73f64723a' - '5b8d94612523353b6d2eb32f840b58d8' - 'eec9a3f78b51647b41c3e4c6d1d19ce9') - -build() { - cd $pkgname-$pkgver - autoreconf -fvi - ./configure --prefix=/usr - ## -O3 breaks compilation! - sed -i 's/CXXFLAGS=" -O3 -Wall"/CXXFLAGS=" -O2 -Wall"/' configure - make +backup=('var/lib/tecnoballz/tecnoballz.hi') +source=( + "http://linux.tlk.fr/games/TecnoballZ/download/${pkgname}-${pkgver}.tgz" + "${pkgname}.xpm" + "${pkgname}.desktop" + games.dir.patch +) + +md5sums=( + '7beeacb06fa841382f0ecbe73f64723a' + '5b8d94612523353b6d2eb32f840b58d8' + 'eec9a3f78b51647b41c3e4c6d1d19ce9' + '92793da20387db8c32646052a85e56d7' +) + +prepare () { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 < "${srcdir}/games.dir.patch" +} + +build () { + cd "${srcdir}/${pkgname}-${pkgver}" + + # The original submitter used this but the project docs say to use bootstrap + #autoreconf -fvi + ./bootstrap + + ./configure --prefix=/usr + + # Works out of the box for me but the original submitter did this. + ## -O3 breaks compilation! + #sed -i 's/CXXFLAGS=" -O3 -Wall"/CXXFLAGS=" -O2 -Wall"/' configure + + make } -package(){ - mkdir -p $pkgdir/usr/share/{applications,pixmaps} - install -m644 tecnoballz.xpm $pkgdir/usr/share/pixmaps - install -m644 tecnoballz.desktop $pkgdir/usr/share/applications +package () { + mkdir -p "${pkgdir}/usr/share/applications" + mkdir -p "${pkgdir}/usr/share/pixmaps" + install -m644 tecnoballz.desktop "${pkgdir}/usr/share/applications" + install -m644 tecnoballz.xpm "${pkgdir}/usr/share/pixmaps" - cd $pkgname-$pkgver - make DESTDIR=$pkgdir install + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="$pkgdir" install - ## fix permissions - chmod -R 775 $pkgdir/var/games/ - chmod 755 $pkgdir/usr/games/$pkgname - chown root:root $pkgdir/usr/games/$pkgname + # fix permissions + chgrp users "${pkgdir}/var/lib/${pkgname}/tecnoballz.hi" + chmod 755 "${pkgdir}/usr/bin/${pkgname}" } diff --git a/games.dir.patch b/games.dir.patch new file mode 100644 index 000000000000..36aa202335b7 --- /dev/null +++ b/games.dir.patch @@ -0,0 +1,13 @@ +diff -Naur tecnoballz-0.93.1.orig/src/Makefile.am tecnoballz-0.93.1/src/Makefile.am +--- tecnoballz-0.93.1.orig/src/Makefile.am 2018-07-05 23:35:20.849605105 +0000 ++++ tecnoballz-0.93.1/src/Makefile.am 2018-07-05 23:35:48.349456126 +0000 +@@ -1,7 +1,7 @@ + + NULL = +-gamesdir = $(prefix)/games +-scoredir = /var/games/tecnoballz ++gamesdir = $(prefix)/bin ++scoredir = /var/lib/tecnoballz + score = tecnoballz.hi + + SUBDIRS = TecnoballZ diff --git a/tecnoballz.install b/tecnoballz.install deleted file mode 100644 index 0af6b95a2618..000000000000 --- a/tecnoballz.install +++ /dev/null @@ -1,13 +0,0 @@ -post_install() { - - echo ">>> In order to save your score, add your user to the 'games' group:" - echo ">>>" - echo ">>> # gpasswd -a USERNAME games" - echo ">>>" - echo ">>> Remember to logout and log back in for the changes to take effect." -} - -post_upgrade() { - post_install $1 -} - |