APKBUILD 2.66 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=2018d
_tzcodever=2018d
Sören Tempel's avatar
Sören Tempel committed
7
_ptzver=0.5
8
pkgrel=1
Natanael Copa's avatar
Natanael Copa committed
9
pkgdesc="Timezone data"
Sören Tempel's avatar
Sören Tempel committed
10
url="https://www.iana.org/time-zones"
Natanael Copa's avatar
Natanael Copa committed
11 12
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 22 23

	0001-posixtz-ensure-the-file-offset-we-pass-to-lseek-is-o.patch
	0002-fix-implicit-declaration-warnings-by-including-strin.patch"
Natanael Copa's avatar
Natanael Copa committed
24

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

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

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

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

Sören Tempel's avatar
Sören Tempel committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54
	./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
55 56
	install -Dm755 "$srcdir"/posixtz-$_ptzver/posixtz \
		"$pkgdir"/usr/bin/posixtz || return 1
Natanael Copa's avatar
Natanael Copa committed
57 58
}

Sören Tempel's avatar
Sören Tempel committed
59 60
sha512sums="e79a95e235cd384247e4112d5154f30eb7b40f28dab4872ed9153e45bf56569949d0845bc1b9ad24b7a5f9609bdadfc892959dbf0d540dbca79b18398dc4f930  tzcode2018d.tar.gz
ee961aedc34e134172523a29fb8a9358f42649d06ffcd2d8a6ad86eeb174a80af5bfc4637e9e52ecdc51fa3d01afef9fff660a69ed72904ff747a59b5634830b  tzdata2018d.tar.gz
Sören Tempel's avatar
Sören Tempel committed
61
68dbaab9f4aef166ac2f2d40b49366527b840bebe17a47599fe38345835e4adb8a767910745ece9c384b57af815a871243c3e261a29f41d71f8054df3061b3fd  posixtz-0.5.tar.xz
62 63
0f2a10ee2bb4007f57b59123d1a0b8ef6accf99e568f21537f0bb19f290fff46e24050f55f12569d7787be600e1b62aa790ea85a333153f3ea081a812c81b1b5  0001-posixtz-ensure-the-file-offset-we-pass-to-lseek-is-o.patch
fb322ab7867517ba39265d56d3576cbcea107c205d524e87015c1819bbb7361f7322232ee3b86ea9b8df2886e7e06a6424e3ac83b2006be290a33856c7d40ac4  0002-fix-implicit-declaration-warnings-by-including-strin.patch"