summaryrefslogtreecommitdiff
path: root/extra/gnome-games/PKGBUILD
blob: 349d6007cb1046f93cbcd9c077237d401c10abe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $Id: PKGBUILD 105513 2011-01-10 10:03:28Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-games
pkgver=2.32.1
pkgrel=2
pkgdesc="Some Games for GNOME"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
depends=('pygtk' 'libsm' 'gconf>=2.32.0' 'guile>=1.8.7' 'filesystem>=2010.09' 'desktop-file-utils' 'libcanberra>=0.25' 'clutter-gtk>=0.10.8' 'hicolor-icon-theme' 'librsvg>=2.32.0' 'python-rsvg>=2.32.0' 'python2-gconf')
makedepends=('gnome-doc-utils>=0.20.1' 'intltool' 'glproto' 'gobject-introspection')
optdepends=('python-gtkglext: glchess 3D mode')
provides=('glchess' 'gnome-sudoku')
conflicts=('glchess' 'gnome-sudoku')
options=('!emptydirs' '!libtool')
install=gnome-games.install
url="http://www.gnome.org"
groups=('gnome-extra')
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.32/${pkgname}-${pkgver}.tar.bz2
        03_missing_icons.patch
        scores.png)
sha256sums=('1a3b2e82102eed3780f05db4378111c475456678deed82fd4ca379da1c5593d9'
            '05d63319773e5389b87672a20b03c4c1e91a33fd1678b5e76335bf7e4daa46a6'
            '2f818741bbf20fc83a68d71908de76f5f1b2b9e27691a4767aebf0e4a39fee85')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np1 -i "${srcdir}/03_missing_icons.patch"
  PYTHON=python2 ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-scrollkeeper \
      --disable-static \
      --with-scores-user=root --with-scores-group=games \
      --enable-introspection=yes \
      --enable-omitgames=swell-foop,lightsoff
  make
  make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install

  # Remove all scores, we generate them from postinstall
  rm -rf "${pkgdir}/var"

  sed -i "s|#!/usr/bin/python$|#!/usr/bin/python2|" \
    $pkgdir/usr/lib/python2.7/site-packages/gnome_sudoku/{tracker_info,number_box}.py

  sed -i "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
    $pkgdir/usr/bin/{gnome-sudoku,glchess}

  install -m755 -d "${pkgdir}/usr/share/icons/hicolor/24x24/actions"
  install -m644 "${srcdir}/scores.png" "${pkgdir}/usr/share/icons/hicolor/24x24/actions/"

  install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
  gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gnome-games ${pkgdir}/etc/gconf/schemas/*.schemas
  rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
}