aboutsummaryrefslogtreecommitdiffstats
path: root/testing/freeciv/APKBUILD
blob: 790dff4e032928e5134baf067cf03263ffa99a3f (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=freeciv
pkgver=2.4.3
pkgrel=0
pkgdesc="civilization 2 clone"
url="http://freeciv.wikia.org/"
arch="all"
license="GPL"
depends="$pkgname-server"
makedepends="gtk+-dev gzip curl-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-server $pkgname-data $pkgname-lang"
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
	find "$pkgdir" -name '*.la' -delete
}

server() {
	replaces="freeciv"
	depends="freeciv-data"
	mkdir -p "$subpkgdir"/usr/bin
	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="437f9a4aadb80619a7c5ae9643142b8b  freeciv-2.4.3.tar.bz2"
sha256sums="7f107fe3b09f37934410dc7a64ac1b99a95997ddf53da53933b75d4da79fa899  freeciv-2.4.3.tar.bz2"
sha512sums="7abed9b3c0f65aa5ed856080a6da68152a8fe9ea285a070858f9a92ec32fb27bfb48fb77b7098a23bbf3e092c982ed455b6ea795230295c9d14f4832378ee3ba  freeciv-2.4.3.tar.bz2"