aboutsummaryrefslogtreecommitdiffstats
path: root/main/tzdata/APKBUILD
blob: 8767ba7380a03e01b966aa19cbcedb8a8139a705 (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
61
62
63
64
65
66
67
68
69
70
71
72
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tzdata
pkgver=2013f
_tzcodever=2011i
_ptzver=0.3
pkgrel=0
pkgdesc="Timezone data"
url="http://www.twinsun.com/tz/tz-link.htm"
arch="all"
license="Public Domain"
depends=
makedepends=
install=
subpackages="$pkgname-doc"
source="http://www.iana.org/time-zones/repository/releases/tzcode$_tzcodever.tar.gz
	http://www.iana.org/time-zones/repository/releases/tzdata$pkgver.tar.gz
	http://git.alpinelinux.org/cgit/ncopa/posixtz/snapshot/posixtz-$_ptzver.tar.bz2
	Makefile.patch
	0001-posixtz-fix-up-lseek.patch"

_builddir="$srcdir"
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"
	make || return 1

	cd "$srcdir"/posixtz-$_ptzver
	make posixtz
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/share/zoneinfo/localtime
	
	if [ "$ALPINE_LIBC" = "eglibc" ]; then
		# tzselect is bashish
		depends="bash"
		# we have this in eglibc
		rm -rf "$pkgdir"/usr/sbin
	else
		rm -f "$pkgdir"/usr/bin/tzselect
		install -Dm755 "$srcdir"/posixtz-$_ptzver/posixtz \
			"$pkgdir"/usr/bin/posixtz || return 1
	fi
}

md5sums="cf7f4335b7c8682899fa2814e711c1b2  tzcode2011i.tar.gz
6d35470a6090e741c39aa9bc9cd103e3  tzdata2013f.tar.gz
fa56ee6f978f53448689b0ff4c9ba793  posixtz-0.3.tar.bz2
ad92d330afeb73e48645513a92eecc04  Makefile.patch
0b4d86d855f7daa3f79c9f28f04a48f9  0001-posixtz-fix-up-lseek.patch"
sha256sums="f0dd991de3f8d6c599c104e294377c9befa1ef40aa5a1d09e2e295a453f3c1ec  tzcode2011i.tar.gz
5b72ed29bea75e0b59cbd3f575db0aac62f96a2a36e652725f674a92a95d4ada  tzdata2013f.tar.gz
5f9d8eb45444c68d8dd4f4b9cbe1b07dac0448cc3797272e510f15c0add53f35  posixtz-0.3.tar.bz2
3c3ffe3baa33a4fa9b73d64c5fded51015215efc107232c04358f6985cbcc685  Makefile.patch
e0b6de6a3d389f96dc95e5b75c2ada9afc63858e3770a0f07a62e1e56a77561e  0001-posixtz-fix-up-lseek.patch"
sha512sums="4febb158d9799cb9a7017259d76b74d54d0a8f9dfb46443fa79701f488964080b1d64d81eec38c11fcb85aecf31f42bf42437d77575537c598c37a6569765696  tzcode2011i.tar.gz
489c6386b3926bcd5c257efbfdfe4fc62beff7bd030e2c686c7de4857d8b8ba13d09522358aedc6c324a0dc5d449e0dbf48ec289a5e91b1cb70f36886604c239  tzdata2013f.tar.gz
a1cdc10ca1b945ff4ec1cd5d4d2153d34911c95a43a0d899539bc27d751a4be1a81014ee0f49de074ccaafc3dcf6174a650f171ab3882bb0b601db1718533d7f  posixtz-0.3.tar.bz2
91f2f21cb84de0e3997685a023ab91d04415b0ace8c439743905bae8c77d313a48b911bababd5e389266c76b2bf0c50a84cf13f209bdd3a9c81933eff96dcd5f  Makefile.patch
c7ddb4eecf8e55e6153f641d478a3affa2522e093e94e95e2ee43039a5c6eed28dcc472bcaa3a7c7c1b84747744c25028467e0048765ef0fc75b89345fc29318  0001-posixtz-fix-up-lseek.patch"