aboutsummaryrefslogtreecommitdiffstats
path: root/main/tzdata/APKBUILD
blob: 55e138c78e51ae0c1f64a4ba1e9c2ee338ec4792 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tzdata
pkgver=2011d
_ptzver=0.1
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="ftp://elsie.nci.nih.gov/pub/tzcode$pkgver.tar.gz
	ftp://elsie.nci.nih.gov/pub/tzdata$pkgver.tar.gz
	http://git.alpinelinux.org/cgit/ncopa/posixtz.git/snapshot/posixtz-$_ptzver.tar.bz2
	Makefile.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

	install -Dm755 "$srcdir"/posixtz-$_ptzver/posixtz \
		"$pkgdir"/usr/bin/posixtz
}

md5sums="95095242ee368e6a7e107f154590ac11  tzcode2011d.tar.gz
03c5793502b7c41985edd73146bf7e36  tzdata2011d.tar.gz
be1ca94f79abfa367b4c54a51737ba91  posixtz-0.1.tar.bz2
a64ed97d1fc03c66ee8612c0d9f40507  Makefile.patch"