# Based on Arch tzdata PKGBUILD (because glibc)
pkgname=tzdata
pkgver=2024a
_tzcode=2024a
_tzdata=2024a
pkgrel=1
pkgdesc="Sources for time zone and daylight saving time data"
arch=('armv7h' 'aarch64')
url="https://www.iana.org/time-zones"
license=('LicenseRef-tz')
source=("$pkgname$pkgver.tar.gz"
"tzcode$pkgver.tar.gz")
optdepends=('bash: for tzselect'
'glibc: for zdump, zic')
options=('!emptydirs')
_timezones=('africa' 'antarctica' 'asia' 'australasia'
'europe' 'northamerica' 'southamerica'
'etcetera' 'backward' 'factory')
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"
}
sha256sums=('0d0434459acbd2059a7a8da1f3304a84a86591f6ed69c6248fffa502b6edffe3'
'80072894adff5a458f1d143e16e4ca1d8b2a122c9c5399da482cb68cba6a1ff8')