summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c9a73ff252d3ba83d215399a1b8734dd9fa5b0c0 (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
54
55
56
57
58
59
60
# Maintainer: Markus Heidelberg <markus dot heidelberg at web dot de>
# Contributor: Gyo <nucleogeek_at_gmail_dot_com>
pkgname=koules
pkgver=1.4
pkgrel=6
pkgdesc="A fast arcade game based on fundamental law of bodies attraction"
arch=('i686' 'x86_64')
url="http://www.ucw.cz/~hubicka/koules/English/"
license=('GPL')
depends=('dialog' 'libx11' 'libxext' 'alsa-oss')
makedepends=('imake' 'xorgproto')
source=(http://www.ucw.cz/~hubicka/koules/packages/$pkgname$pkgver-src.tar.gz
        $pkgname-$pkgver-gcc3.patch
        $pkgname-$pkgver-alsa-oss.patch
        $pkgname-$pkgver-multiple-definition.patch
        koules.desktop)
md5sums=('0a5ac9e57c8b72e9fc200bc98273235c'
         'ccc92d4ab7d61ca482d30192a5ee83ec'
         'cbb37f907f7e8726be364434b75b66a9'
         '0efb694f178065e2fdbc98f4445d3d38'
         'fb3cd393464214643c239ac4350f963a')

prepare() {
  cd "$srcdir/$pkgname$pkgver"

  patch -p1 < "$srcdir/$pkgname-$pkgver-gcc3.patch"

  rm -f oss-redir.c
  patch -p1 < "$srcdir/$pkgname-$pkgver-alsa-oss.patch"

  patch -p1 < "$srcdir/$pkgname-$pkgver-multiple-definition.patch"

  # some source modifications
  sed -i \
    -e "/^KOULESDIR/s:=.*:=/usr/bin:" \
    -e "/^SOUNDDIR/s:=.*:=/usr/share/$pkgname:" \
    -e "/SYSDEFS/s:=.*:= ${CFLAGS}:" Iconfig
  sed -i \
    -e "s:/usr/local/bin:/usr/bin:" \
    -e 's:exec.*tcl:exec xkoules -M "$@":' koules
}

build() {
  cd "$srcdir/$pkgname$pkgver"

  # generate makefiles, then build
  xmkmf -a
  make MANSRCSUFFIX=6
}

package() {
  cd "$srcdir/$pkgname$pkgver"
  install -Dm755 xkoules "$pkgdir/usr/bin/xkoules"
  install -Dm755 koules "$pkgdir/usr/bin/koules"
  install -Dm755 koules.sndsrv.linux "$pkgdir/usr/share/koules/koules.sndsrv.linux"
  install -m644 sounds/* "$pkgdir/usr/share/koules"
  install -Dm644 xkoules.6 "$pkgdir/usr/share/man/man6/xkoules.6"
  install -Dm644 Koules.xpm "$pkgdir/usr/share/pixmaps/koules.xpm"
  install -Dm644 "$srcdir/koules.desktop" "$pkgdir/usr/share/applications/koules.desktop"
}