summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3106979135dfcbd7545251b22797b2cf7dd335c3 (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
# Maintainer: Tomaash

pkgname=pax-britannica
pkgver=20110514
pkgrel=1
pkgdesc="A one-button real-time strategy game for up to 4 players"
arch=('x86_64' 'i686')
url="http://paxbritannica.henk.ca/"
license=("MIT")
if [ `uname -m` == "x86_64" ]; then
	depends=('lib32-alsa-plugins' 'lib32-mesa' 'lib32-glu' 'lib32-libxrandr' 'lib32-libpulse')
else
	depends=('alsa-plugins' 'mesa' 'glu' 'libxrandr' 'libpulse')
fi
conflicts=("paxbritannica-git")
source=("http://paxbritannica.henk.ca/pax-britannica.tar.gz" 
	"https://github.com/henkboom/pax-britannica/raw/master/license.txt")
md5sums=('b2df1a3d1266ec3cf0722fc9807b28b0'
	'd8f449b1dec151e9a49c96034cb8015a')

build() {
	cd $srcdir/$pkgname

	# Create pkg.desktop-file
	cat > $srcdir/$pkgname.desktop <<-END 
	[Desktop Entry]
	Name=Pax Britannica
	Icon=pax-britannica
	GenericName=Pax Britannica
	Comment=A one-button real-time strategy game for up to 4 players
	Exec=pax-britannica
	Terminal=false
	Type=Application
	Categories=Game;
	END
}

package() {
	# Create pkgdir folders
	install -d $pkgdir/usr/bin
	install -d $pkgdir/usr/share/licenses/$pkgname
	install -d $pkgdir/usr/share/applications
	install -g games -d $pkgdir/opt/$pkgname

	# Copy game
	cp -a $srcdir/$pkgname/*       $pkgdir/opt/$pkgname
	cat   $srcdir/license.txt    > $pkgdir/usr/share/licenses/$pkgname/license.txt
	cp -a $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/

	# executable link
	ln -s /opt/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname
	
	# Desktop-file icon
	for i in 16x16 22x22 24x24 32x32 36x36 48x48 64x64 72x72 96x96 128x128; do
		mkdir -p $pkgdir/usr/share/icons/hicolor/$i/apps
		cd $pkgdir/usr/share/icons/hicolor/$i/apps
		convert -resize $i $pkgdir/opt/pax-britannica/sprites/factory_p4.png pax-britannica.png
	done
}