60 lines
2.0 KiB
Bash
60 lines
2.0 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
pkgname=tzcode
|
|
_ver=2019a
|
|
# use a pacman compatible version scheme
|
|
pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
|
|
pkgrel=1
|
|
pkgdesc="Sources for time zone and daylight saving time data"
|
|
arch=('i686' 'x86_64')
|
|
url="https://www.iana.org/time-zones"
|
|
license=('GPL')
|
|
options=('!emptydirs')
|
|
groups=('base')
|
|
depends=('coreutils' 'gawk' 'sed')
|
|
source=(
|
|
https://www.iana.org/time-zones/repository/releases/tzdata${_ver}.tar.gz{,.asc}
|
|
https://www.iana.org/time-zones/repository/releases/${pkgname}${_ver}.tar.gz{,.asc}
|
|
tzcode-makefile.patch
|
|
tzcode-makefile-exe-extensions.patch)
|
|
sha256sums=('90366ddf4aa03e37a16cd49255af77f801822310b213f195e2206ead48c59772'
|
|
'SKIP'
|
|
'8739f162bc30cdfb482435697f969253abea49595541a0afd5f443fbae433ff5'
|
|
'SKIP'
|
|
'f5ba93ebce547b14c44e55f94986046af6ed1c8befad296e4846412d053c4470'
|
|
'faf73eb5f07c56b019b540005f4262f33927a4ff2acf3752a055e8530decd749')
|
|
validpgpkeys=('7E3792A9D8ACF7D633BC1588ED97E90E62AA7E34')
|
|
|
|
timezones=('africa' 'antarctica' 'asia' 'australasia'
|
|
'europe' 'northamerica' 'southamerica'
|
|
'pacificnew' 'etcetera' 'backward'
|
|
'systemv' 'factory')
|
|
|
|
prepare() {
|
|
cd ${srcdir}
|
|
|
|
patch -p1 -i ${srcdir}/tzcode-makefile.patch
|
|
patch -p1 -i ${srcdir}/tzcode-makefile-exe-extensions.patch
|
|
}
|
|
|
|
build() {
|
|
cd ${srcdir}
|
|
|
|
make CFLAGS="${CFLAGS} -std=gnu99"
|
|
}
|
|
|
|
package() {
|
|
cd ${srcdir}
|
|
|
|
make -j1 DESTDIR=${pkgdir} install
|
|
mv ${pkgdir}/usr/share/zoneinfo-leaps ${pkgdir}/usr/share/zoneinfo/right
|
|
mv ${pkgdir}/usr/share/zoneinfo-posix ${pkgdir}/usr/share/zoneinfo/posix
|
|
|
|
./zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo ${timezones[@]}
|
|
./zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/posix ${timezones[@]}
|
|
./zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/right -L leapseconds ${timezones[@]}
|
|
|
|
./zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo -p America/New_York
|
|
install -m444 -t ${pkgdir}/usr/share/zoneinfo iso3166.tab zone.tab
|
|
}
|