aboutsummaryrefslogtreecommitdiffstats
path: root/testing/freeciv/APKBUILD
blob: 851b44e15669b4d11d7051a597dd3fd0ebacd615 (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=freeciv
pkgver=2.2.5
pkgrel=1
pkgdesc="civilization 2 clone"
url="http://freeciv.wikia.org/"
arch="all"
license="GPL"
depends="$pkgname-server"
makedepends="gtk+-dev gzip"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-server $pkgname-data"
source="http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2"

_builddir="${srcdir}/${pkgname}-${pkgver}"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc || return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

server() {
	replaces="freeciv"
	depends="freeciv-data"

	mkdir -p "$subpkgdir"/usr/bin

	mv "$pkgdir"/usr/bin/civmanual "$subpkgdir"/usr/bin/civmanual
	mv "$pkgdir"/usr/bin/freeciv-server "$subpkgdir"/usr/bin/freeciv-server
}

data() {
	arch="noarch"

	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/share/freeciv "$subpkgdir"/usr/share/freeciv
}

md5sums="e717de02c77139593f21b930245d1709  freeciv-2.2.5.tar.bz2"