jobcore/tzdata/PKGBUILD-arch

51 lines
2 KiB
Text

# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgname=tzdata
pkgver=2022d
_tzcode=2022d
_tzdata=2022d
pkgrel=1
pkgdesc="Sources for time zone and daylight saving time data"
arch=('x86_64')
url="https://www.iana.org/time-zones"
license=('custom: public domain')
options=('!emptydirs')
source=(https://www.iana.org/time-zones/repository/releases/tzcode${_tzcode}.tar.gz{,.asc}
https://www.iana.org/time-zones/repository/releases/${pkgname}${_tzdata}.tar.gz{,.asc})
sha512sums=('54491ef8dbab7c41754eb3f2990b8ccb2a10960098c7d78d94375d7f1362540f0d71ba77a46bcaf95f419f8d01a23bdf940cdc9c7906c23ad6c40cd1c788b1c2'
'SKIP'
'f0d9f1dc6b7613598a861a3860f249e5beff75d8c4bb12bae21018ee617044cf25065dff08f81b0e6ed2c43602f2166dd6407a989a369a004e068260f2eece30'
'SKIP')
validpgpkeys=('7E3792A9D8ACF7D633BC1588ED97E90E62AA7E34') # Paul Eggert <eggert@cs.ucla.edu>
_timezones=('africa' 'antarctica' 'asia' 'australasia'
'europe' 'northamerica' 'southamerica'
'etcetera' 'backward' 'factory')
prepare() {
sed -i "s:sbin:bin:g" Makefile
}
build() {
make LFLAGS="${LDFLAGS} ${LTOFLAGS}"
}
package() {
cd "${srcdir}"
# install tzcode stuff
make DESTDIR="${pkgdir}" install
# install tzdata stuff
./zic -b fat -d "${pkgdir}"/usr/share/zoneinfo ${_timezones[@]}
./zic -b fat -d "${pkgdir}"/usr/share/zoneinfo/posix ${_timezones[@]}
./zic -b fat -d "${pkgdir}"/usr/share/zoneinfo/right -L leapseconds ${_timezones[@]}
# This creates the posixrules file. We use New York because POSIX requires the daylight savings time rules to be in accordance with US rules.
./zic -b fat -d "${pkgdir}"/usr/share/zoneinfo -p America/New_York
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
# cleanup
rm "${pkgdir}/etc/localtime"
# install license
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}