APKBUILD 1.34 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
Natanael Copa's avatar
Natanael Copa committed
4
pkgver=2012i
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
45 46 47

	install -Dm755 "$srcdir"/posixtz-$_ptzver/posixtz \
		"$pkgdir"/usr/bin/posixtz
Natanael Copa's avatar
Natanael Copa committed
48 49
}

Natanael Copa's avatar
Natanael Copa committed
50
md5sums="cf7f4335b7c8682899fa2814e711c1b2  tzcode2011i.tar.gz
Natanael Copa's avatar
Natanael Copa committed
51
feea4fc19a4c55ff7550d90741e5da3f  tzdata2012i.tar.gz
52
99efce32b3f870e1b071ce47f3a98a18  posixtz-0.3.tar.bz2
Natanael Copa's avatar
Natanael Copa committed
53
b12fcd52ddda1d4de16655e0c52a3675  Makefile.patch
Ariadne Conill's avatar
Ariadne Conill committed
54
0b4d86d855f7daa3f79c9f28f04a48f9  0001-posixtz-fix-up-lseek.patch"