updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / openmine / PKGBUILD
blobcf28c5780b6efbf0452fe8f9ff2f250bf0fce01d
1 # Maintainer: Bartlomiej Palmowski (Rotwang), maks1k at wp dot pl
2 pkgname=openmine
3 pkgver=0.2.0b
4 pkgrel=2
5 pkgdesc="3D Minesweeper"
6 arch=('i686')
7 license=('GPL')
8 url=("http://openmine.sourceforge.net/")
9 source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
10 openmine.png
11 openmine.desktop)
12 depends=('sdl')
13 md5sums=('d581c7a83b7ab11bf36a0afe56985233'
14          'ad5c39576d20c0c6fd26cf7108acd57c'
15          'e93a0b832699680efe51f696d2cb4b00')
17 build() {
18 cd $pkgname-$pkgver
19 # patch the source, so openmine executable can "see" it's files (kudos to brebs)
20 sed -i -e '/#define RC_FILE/s/mines.conf/\/usr\/share\/openmine\/mines.conf/' main.c
21 sed -i -e '/#define THEME_IMAGE/s/.\/images/\/usr\/share\/openmine\/images/' main.c
22 chmod 0755 images
23 ./configure
24 make
25 mkdir -p $startdir/pkg/usr/share/$pkgname/images/{caco,classic}
26 install -D -m 0755 $pkgname $startdir/pkg/usr/bin/$pkgname
27 install -m 0644 mines.conf $startdir/pkg/usr/share/$pkgname/mines.conf
28 install -D -m 0644 ../$pkgname.desktop $startdir/pkg/usr/share/applications/$pkgname.desktop
29 install -D -m 0444 ../$pkgname.png $startdir/pkg/usr/share/pixmaps/$pkgname.png
30 cd images/caco
31 for i in *.bmp
33 install -m 0444 "$i" $startdir/pkg/usr/share/$pkgname/images/caco/"$i"
34 done
35 install theme.conf $startdir/pkg/usr/share/$pkgname/images/caco/theme.conf
36 cd ../classic
37 for i in *.bmp
39 install -m 0444 "$i" $startdir/pkg/usr/share/$pkgname/images/classic/"$i"
40 done
41 install theme.conf $startdir/pkg/usr/share/$pkgname/images/classic/theme.conf