jobcore/tzdata/PKGBUILD-arch
2023-03-24 00:34:04 +02:00

53 lines
2 KiB
Text

# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgname=tzdata
pkgver=2023a
_tzcode=2023a
_tzdata=2023a
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')
optdepends=('bash: for tzselect'
'glibc: for zdump, zic')
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=('d45fc677a0a32ae807bf421faceff675565ee15e3ff42d3a4121df10e1f7855ac16b27fbc28bd365f93c57f40c5bdf19cde88546f7090cfab7676cac0a5516a4'
'SKIP'
'10aadd6eba50f63f427399281065ba34cb474f6a854f8dc7a6f4f1343b1474a05f22b69b1e113ea67bb5f3f479253610a16b89d9dfa157bf0fde4c69aa3d6493'
'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
}