archrelease: copy trunk to extra-x86_64
[arch-packages.git] / tzdata / trunk / PKGBUILD
blob167eb648319140b7827897294151679a0dc4f274
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
3 pkgname=tzdata
4 pkgver=2021e
5 _tzcode=2021e
6 _tzdata=2021e
7 pkgrel=1
8 pkgdesc="Sources for time zone and daylight saving time data"
9 arch=('x86_64')
10 url="https://www.iana.org/time-zones"
11 license=('custom: public domain')
12 options=('!emptydirs')
13 source=(https://www.iana.org/time-zones/repository/releases/tzcode${_tzcode}.tar.gz{,.asc}
14         https://www.iana.org/time-zones/repository/releases/${pkgname}${_tzdata}.tar.gz{,.asc})
15 sha512sums=('87b0335129ea41c5f42f687f548712e5da892baa8494cecf5d34851beceecf6ae52f22104696ed187713cf9e502570eb2041e277dfd3c043c11d0253bfde685a'
16             'SKIP'
17             'c1e8d04e049157ed5d4af0868855bbd75517e3d7e1db9c41d5283ff260109de46b6fac6be94828201d093e163d868044ac2a9db2bf0aeab800e264d0c73a9119'
18             'SKIP')
19 validpgpkeys=('7E3792A9D8ACF7D633BC1588ED97E90E62AA7E34') # Paul Eggert <eggert@cs.ucla.edu>
21 _timezones=('africa' 'antarctica' 'asia' 'australasia'
22            'europe' 'northamerica' 'southamerica'
23            'etcetera' 'backward' 'factory')
25 prepare() {
26   sed -i "s:sbin:bin:g" Makefile
29 build() {
30   make LFLAGS=${LDFLAGS}
33 package() {
34   cd "${srcdir}"
35   # install tzcode stuff
36   make DESTDIR="${pkgdir}" install
38   # install tzdata stuff
39   ./zic -b fat -d "${pkgdir}"/usr/share/zoneinfo ${_timezones[@]}
40   ./zic -b fat -d "${pkgdir}"/usr/share/zoneinfo/posix ${_timezones[@]}
41   ./zic -b fat -d "${pkgdir}"/usr/share/zoneinfo/right -L leapseconds ${_timezones[@]}
42   # This creates the posixrules file. We use New York because POSIX requires the daylight savings time rules to be in accordance with US rules.   
43   ./zic -b fat -d "${pkgdir}"/usr/share/zoneinfo -p America/New_York
44   install -m644 -t "${pkgdir}"/usr/share/zoneinfo iso3166.tab leap-seconds.list zone1970.tab zone.tab SECURITY # zone.tab is depricated and will go soon
45   
46   # cleanup
47   rm "${pkgdir}/etc/localtime"
49   # install license
50   install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE