APKBUILD 2.72 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2 3
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tzdata
4
pkgver=2013d
Natanael Copa's avatar
Natanael Copa committed
5
_tzcodever=2011i
6
_ptzver=0.3
Natanael Copa's avatar
Natanael Copa committed
7
pkgrel=0
Natanael Copa's avatar
Natanael Copa committed
8 9 10 11 12 13 14 15
pkgdesc="Timezone data"
url="http://www.twinsun.com/tz/tz-link.htm"
arch="all"
license="Public Domain"
depends=
makedepends=
install=
subpackages="$pkgname-doc"
Natanael Copa's avatar
Natanael Copa committed
16 17 18
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
19 20
	Makefile.patch
	0001-posixtz-fix-up-lseek.patch"
Natanael Copa's avatar
Natanael Copa committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

_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
36 37 38

	cd "$srcdir"/posixtz-$_ptzver
	make posixtz
Natanael Copa's avatar
Natanael Copa committed
39 40 41 42 43 44
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/share/zoneinfo/localtime
Carlo Landmeter's avatar
Carlo Landmeter committed
45 46 47 48 49 50 51 52 53 54 55
	
	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
Natanael Copa's avatar
Natanael Copa committed
56 57
}

Natanael Copa's avatar
Natanael Copa committed
58
md5sums="cf7f4335b7c8682899fa2814e711c1b2  tzcode2011i.tar.gz
59 60
65b6818162230fc02f86f293376c73df  tzdata2013d.tar.gz
99efce32b3f870e1b071ce47f3a98a18  posixtz-0.3.tar.bz2
Natanael Copa's avatar
Natanael Copa committed
61
ad92d330afeb73e48645513a92eecc04  Makefile.patch
Ariadne Conill's avatar
Ariadne Conill committed
62
0b4d86d855f7daa3f79c9f28f04a48f9  0001-posixtz-fix-up-lseek.patch"
Natanael Copa's avatar
Natanael Copa committed
63
sha256sums="f0dd991de3f8d6c599c104e294377c9befa1ef40aa5a1d09e2e295a453f3c1ec  tzcode2011i.tar.gz
64 65
cd1c96f0676e0edceebc6a418a2222ffb05becb41180dd9f847b9c7cef303b04  tzdata2013d.tar.gz
574a765e0569458d7ccb76e97b3a96de2f0c19ad093c6811675b8a57f7088a53  posixtz-0.3.tar.bz2
Natanael Copa's avatar
Natanael Copa committed
66
3c3ffe3baa33a4fa9b73d64c5fded51015215efc107232c04358f6985cbcc685  Makefile.patch
Natanael Copa's avatar
Natanael Copa committed
67 68
e0b6de6a3d389f96dc95e5b75c2ada9afc63858e3770a0f07a62e1e56a77561e  0001-posixtz-fix-up-lseek.patch"
sha512sums="4febb158d9799cb9a7017259d76b74d54d0a8f9dfb46443fa79701f488964080b1d64d81eec38c11fcb85aecf31f42bf42437d77575537c598c37a6569765696  tzcode2011i.tar.gz
69 70
dc4220c8c2113d899b8901561a1335eb4de31881622fd78f2470c625689efe08d50575aeb927d688fd5d24739f1d64222d40221091ff25f9ad61a65f0ca039d0  tzdata2013d.tar.gz
57dfd38a4050230e49ec9a23bfec5e995dd48ed1fa338a72c4d2c3b86590d4c7357d3dc6d12b4f1564beebcf48f0d0ed855574e4ba29268160d8f84928a477fd  posixtz-0.3.tar.bz2
Natanael Copa's avatar
Natanael Copa committed
71
91f2f21cb84de0e3997685a023ab91d04415b0ace8c439743905bae8c77d313a48b911bababd5e389266c76b2bf0c50a84cf13f209bdd3a9c81933eff96dcd5f  Makefile.patch
Natanael Copa's avatar
Natanael Copa committed
72
c7ddb4eecf8e55e6153f641d478a3affa2522e093e94e95e2ee43039a5c6eed28dcc472bcaa3a7c7c1b84747744c25028467e0048765ef0fc75b89345fc29318  0001-posixtz-fix-up-lseek.patch"