72 lines
2.4 KiB
Bash
72 lines
2.4 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
pkgname=tzcode
|
|
_ver=2014b
|
|
# 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="http://www.iana.org/time-zones"
|
|
license=('GPL')
|
|
options=('!emptydirs')
|
|
groups=('base')
|
|
depends=('coreutils' 'gawk' 'sed')
|
|
source=(http://www.iana.org/time-zones/repository/releases/${pkgname}${_ver}.tar.gz
|
|
http://www.iana.org/time-zones/repository/releases/tzdata${_ver}.tar.gz
|
|
tzcode-makefile.patch
|
|
tzcode-makefile-exe-extensions.patch
|
|
tzcode-tzfile.patch
|
|
tzcode-cygwin.patch
|
|
tzcode-man1.patch
|
|
tzcode-man3.patch
|
|
tzcode-man8.patch)
|
|
sha1sums=('cabc82066aa337c109e3e2f0e3f98a138841ff41'
|
|
'e35461362701c5f55a98c72bf0822dd0b47f2076'
|
|
'9d85e92e6fb8d823b48591508bcf77728dff2fa8'
|
|
'64687b89afddcb31418d28deabc2ac138dda78c8'
|
|
'46feb526f958e4cc027e253345fbe31b41dc5bf4'
|
|
'2095c6a471634cc9574b24a9b661d1f32952a11a'
|
|
'1a207233e2746933df6334f0316fb62a0505830b'
|
|
'b3c0c389481fece1b00257e5c8ce73256448196b'
|
|
'39697816b3f3c37bd898ef7380af3b224b99545c')
|
|
|
|
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
|
|
patch -p1 -i ${srcdir}/tzcode-tzfile.patch
|
|
patch -p1 -i ${srcdir}/tzcode-cygwin.patch
|
|
patch -p1 -i ${srcdir}/tzcode-man1.patch
|
|
patch -p1 -i ${srcdir}/tzcode-man3.patch
|
|
patch -p1 -i ${srcdir}/tzcode-man8.patch
|
|
|
|
}
|
|
|
|
build() {
|
|
cd ${srcdir}
|
|
|
|
make CFLAGS='-O2 -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
|
|
|
|
/sbin/zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo ${timezones[@]}
|
|
/sbin/zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/posix ${timezones[@]}
|
|
/sbin/zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/right -L leapseconds ${timezones[@]}
|
|
|
|
/sbin/zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo -p America/New_York
|
|
install -m444 -t ${pkgdir}/usr/share/zoneinfo iso3166.tab zone.tab
|
|
}
|