APKBUILD 2.94 KB
Newer Older
Sören Tempel's avatar
Sören Tempel committed
1
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
Natanael Copa's avatar
Natanael Copa committed
2 3 4
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tzdata
Sören Tempel's avatar
Sören Tempel committed
5 6
pkgver=2016g
_tzcodever=2016g
Sören Tempel's avatar
Sören Tempel committed
7
_ptzver=0.5
Natanael Copa's avatar
Natanael Copa committed
8
pkgrel=0
Natanael Copa's avatar
Natanael Copa committed
9 10 11 12
pkgdesc="Timezone data"
url="http://www.twinsun.com/tz/tz-link.htm"
arch="all"
license="Public Domain"
Sören Tempel's avatar
Sören Tempel committed
13 14 15 16
depends=""
depends_dev=""
makedepends=""
install=""
Natanael Copa's avatar
Natanael Copa committed
17
subpackages="$pkgname-doc"
Natanael Copa's avatar
Natanael Copa committed
18 19
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
Sören Tempel's avatar
Sören Tempel committed
20
	http://dev.alpinelinux.org/archive/posixtz/posixtz-$_ptzver.tar.xz
21
	0001-posixtz-fix-up-lseek.patch"
Natanael Copa's avatar
Natanael Copa committed
22

Francesco Colista's avatar
Francesco Colista committed
23
builddir="$srcdir"
Sören Tempel's avatar
Sören Tempel committed
24 25 26
_timezones="africa antarctica asia australasia europe northamerica \
	southamerica pacificnew etcetera backward systemv factory"

Natanael Copa's avatar
Natanael Copa committed
27
build() {
Francesco Colista's avatar
Francesco Colista committed
28
	cd "$builddir"
Sören Tempel's avatar
Sören Tempel committed
29 30
	make cc="${CC:-gcc}" CFLAGS="$CFLAGS -DHAVE_STDINT_H=1"
		TZDIR="/usr/share/zoneinfo" || return 1
31

Francesco Colista's avatar
Francesco Colista committed
32
	cd "$builddir"/posixtz-$_ptzver
Sören Tempel's avatar
Sören Tempel committed
33
	make posixtz || return 1
Natanael Copa's avatar
Natanael Copa committed
34 35 36
}

package() {
Francesco Colista's avatar
Francesco Colista committed
37
	cd "$builddir"
Natanael Copa's avatar
Natanael Copa committed
38

Sören Tempel's avatar
Sören Tempel committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52
	./zic -y ./yearistype -d "$pkgdir"/usr/share/zoneinfo ${_timezones}
	./zic -y ./yearistype -d "$pkgdir"/usr/share/zoneinfo/right -L leapseconds ${_timezones}
	#./zic -y ./yearistype -d "$pkgdir"/usr/share/zoneinfo/posix ${_timezones}

	./zic -y ./yearistype -d "$pkgdir"/usr/share/zoneinfo -p America/New_York
	install -m444 -t "$pkgdir"/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab

	mkdir -p "$pkgdir"/usr/sbin
	install -m755 zic zdump "$pkgdir"/usr/sbin || return 1

	mkdir -p "$pkgdir"/usr/share/man/man8
	install -m644 zic.8 zdump.8 "$pkgdir"/usr/share/man/man8 || return 1

	rm -f "$pkgdir"/usr/share/zoneinfo/localtime || return 1
Natanael Copa's avatar
Natanael Copa committed
53 54
	install -Dm755 "$srcdir"/posixtz-$_ptzver/posixtz \
		"$pkgdir"/usr/bin/posixtz || return 1
Natanael Copa's avatar
Natanael Copa committed
55 56
}

Sören Tempel's avatar
Sören Tempel committed
57 58
md5sums="f89867013676e3cb9544be2df7d36a91  tzcode2016g.tar.gz
3c7e97ec8527211104d27cc1d97a23de  tzdata2016g.tar.gz
Sören Tempel's avatar
Sören Tempel committed
59 60
80f8ae1df19dd28e1c8b192c6ea7b836  posixtz-0.5.tar.xz
ca177ded459c9d9c543b5d6ffcc6d6ac  0001-posixtz-fix-up-lseek.patch"
Sören Tempel's avatar
Sören Tempel committed
61 62
sha256sums="1ff90b47ad7986140a513b5287b1851c40f80fd44fd636db5cc5b46d06f9fa2b  tzcode2016g.tar.gz
3c7137b2bc47323b0de47b77786bacf81ed503d4b2c693ff8ada2fbd1281ebd1  tzdata2016g.tar.gz
Sören Tempel's avatar
Sören Tempel committed
63 64
e0a79e0922be2da686a1888d79cd253baaf81c2f30b4378fbbcf9ff9d632aab5  posixtz-0.5.tar.xz
4e7496c015878226659c45f22adf3d556692993465c4b837a6f92829fede8b71  0001-posixtz-fix-up-lseek.patch"
Sören Tempel's avatar
Sören Tempel committed
65 66
sha512sums="280f9bd9ee6eacc5cf82004dc5efd4e1d245e68a576c6d8172ebae0247d0777ac8987aed33609106eb1d596229979452023b593d1a4a58be9bc0932c376a3533  tzcode2016g.tar.gz
7b414c1af80faed335a59f40a18931265b71f8dacc3a5f3bd93e8ea0e3d6416a6839dfb88c64b04df3c728c4fb44105503ddb6e87f317dbff29e43c491c2fb3d  tzdata2016g.tar.gz
Sören Tempel's avatar
Sören Tempel committed
67 68
68dbaab9f4aef166ac2f2d40b49366527b840bebe17a47599fe38345835e4adb8a767910745ece9c384b57af815a871243c3e261a29f41d71f8054df3061b3fd  posixtz-0.5.tar.xz
f54ce213d74c5a8387e1a7c56299bc6eee65a035772288222128abc249a112067b8791b88b45c342b2d4d8d12e9e4f1f2f5c92c5de67f8b6413b1ebf1d7de467  0001-posixtz-fix-up-lseek.patch"