OCaml 4.14.0 rebuild
[arch-packages.git] / tzdata / trunk / PKGBUILD
blob806f37f89258d26211eafaa1404d18823de72f2d
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
3 pkgname=tzdata
4 pkgver=2022a
5 _tzcode=2022a
6 _tzdata=2022a
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=('3f047a6f414ae3df4a3d6bb9b39a1790833d191ae48e6320ab9438cd326dc455475186a02c44e4cde96b48101ab000880919b1e0e8092aed7254443ed2c831ed'
16             'SKIP'
17             '542e4559beac8fd8c4af7d08d816fd12cfe7ffcb6f20bba4ff1c20eba717749ef96e5cf599b2fe03b5b8469c0467f8cb1c893008160da281055a123dd9e810d9'
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} ${LTOFLAGS}"
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