mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-15 00:39:16 +08:00
43 lines
1.3 KiB
Bash
43 lines
1.3 KiB
Bash
pkgname=tzdata
|
|
pkgver=2018f
|
|
pkgrel=1
|
|
pkgdesc="Sources for time zone and daylight saving time data"
|
|
arch=('x86_64')
|
|
url="https://www.iana.org/time-zones"
|
|
license=('GPL')
|
|
options=('!emptydirs')
|
|
source=(https://www.iana.org/time-zones/repository/releases/tzcode${pkgver}.tar.gz
|
|
https://www.iana.org/time-zones/repository/releases/${pkgname}${pkgver}.tar.gz)
|
|
sha256sums=('4ec74f8a84372570135ea4be16a042442fafe100f5598cb1017bfd30af6aaa70'
|
|
'0af6a85fc4ea95832f76524f35696a61abb3992fd3f8db33e5a1f95653e043f2')
|
|
|
|
timezones=('africa' 'antarctica' 'asia' 'australasia'
|
|
'europe' 'northamerica' 'southamerica'
|
|
'pacificnew' 'etcetera' 'backward'
|
|
'systemv' 'factory')
|
|
|
|
prepare() {
|
|
sed -i "s:sbin:bin:g" Makefile
|
|
}
|
|
|
|
build() {
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd ${srcdir}
|
|
# install tzcode stuff
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# install tzdata stuff
|
|
./zic -d ${pkgdir}/usr/share/zoneinfo ${timezones[@]}
|
|
./zic -d ${pkgdir}/usr/share/zoneinfo/posix ${timezones[@]}
|
|
./zic -d ${pkgdir}/usr/share/zoneinfo/right -L leapseconds ${timezones[@]}
|
|
|
|
./zic -d ${pkgdir}/usr/share/zoneinfo -p America/New_York
|
|
install -m444 -t ${pkgdir}/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab # zone.tab is depricated and will go soon
|
|
|
|
# cleanup
|
|
rm "${pkgdir}/etc/localtime"
|
|
}
|