diff options
author | root <root@rshg054.dnsready.net> | 2013-04-23 01:16:16 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-04-23 01:16:16 -0700 |
commit | d1d93fafb9ef98fdd0c9a5a486c179c03cbbfb33 (patch) | |
tree | da594e49962aa1b32a81dd8066423c4fd5fdcec6 /extra/five-or-more | |
parent | a5f6ca5d4e1aa12dfec53c3061df6e0198126fb4 (diff) |
Tue Apr 23 01:16:16 PDT 2013
Diffstat (limited to 'extra/five-or-more')
-rw-r--r-- | extra/five-or-more/PKGBUILD | 36 | ||||
-rw-r--r-- | extra/five-or-more/five-or-more.install | 35 |
2 files changed, 71 insertions, 0 deletions
diff --git a/extra/five-or-more/PKGBUILD b/extra/five-or-more/PKGBUILD new file mode 100644 index 000000000..47eefa009 --- /dev/null +++ b/extra/five-or-more/PKGBUILD @@ -0,0 +1,36 @@ +# $Id: PKGBUILD 183355 2013-04-21 22:09:04Z heftig $ +# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> +# Contributor: Jan de Groot <jgc@archlinux.org> + +pkgname=five-or-more +pkgver=3.8.1 +pkgrel=1 +pkgdesc="Remove colored balls from the board by forming lines" +arch=('i686' 'x86_64') +license=('GPL') +depends=('desktop-file-utils' 'hicolor-icon-theme' 'gtk3' 'librsvg') +makedepends=('intltool' 'itstool' 'gobject-introspection') +conflicts=('gnome-games') +replaces=('gnome-games') +options=('!emptydirs' '!libtool') +install=five-or-more.install +url="https://live.gnome.org/Five%20or%20more" +groups=('gnome-extra') +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz) +sha256sums=('a050f472dadbb3f44e5cd5e4ab31058a6058f4ccaa03558311706ec0c052b056') + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-schemas-compile \ + --with-scores-user=root --with-scores-group=games + make +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + + # Remove all scores, we generate them from postinstall + rm -rf "$pkgdir/var" +} diff --git a/extra/five-or-more/five-or-more.install b/extra/five-or-more/five-or-more.install new file mode 100644 index 000000000..eb9e34de3 --- /dev/null +++ b/extra/five-or-more/five-or-more.install @@ -0,0 +1,35 @@ +_scores=( + glines.Small.scores + glines.Medium.scores + glines.Large.scores +) + +post_install() { + glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + gtk-update-icon-cache -q -f usr/share/icons/hicolor + + for score in "${_scores[@]}" ; do + if [ -e "var/games/$score" ]; then + continue + fi + + touch "var/games/$score" + chown root:games "var/games/$score" + chmod 664 "var/games/$score" + done +} + +post_upgrade() { + post_install +} + +post_remove() { + glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + gtk-update-icon-cache -q -f usr/share/icons/hicolor + + for score in "${_scores[@]}" ; do + rm -f "var/games/$score" + done +} |