# $Id$ PNAME="tzdata" PVER="2018g" PBUILD="r1" PCAT="sys-libs" DESCRIPTION="Timezone and daylight saving time data." HOMEPAGE="http://www.iana.org/time-zones/" DEPEND="" SDEPEND=">= virtual/glibc" SRCFILE="${PNAME}${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" ALX_PKG_KEEP="usr/share/zoneinfo/iso3166.tab usr/share/zoneinfo/zone.tab usr/share/zoneinfo/Europe/Berlin usr/share/zoneinfo/UTC" sminclude mtools alx-split SRC_URI=( http://www.iana.org/time-zones/repository/releases/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2SEPERATOR="ta" UP2DATE="updatecmd ${HOMEPAGE} | grep ${PNAME} | highesttarball gz" src_prepare() { # upstream says tar.gz, but really it's only a tar install -d ${SRCDIR} || die tar xvf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${SRCDIR} || die chmod +x ${SRCDIR}/yearistype.sh || die } alx_generic_src_install() { cd ${SRCDIR} local zones zones=( africa antarctica asia australasia backward etcetera europe factory northamerica pacificnew southamerica systemv ) zic -y ./yearistype.sh -d ${BINDIR}/usr/share/zoneinfo ${zones[*]} || die zic -y ./yearistype.sh -d ${BINDIR}/usr/share/zoneinfo/posix ${zones[*]} || die zic -y ./yearistype.sh -d ${BINDIR}/usr/share/zoneinfo/right -L leapseconds ${zones[*]} || die zic -y ./yearistype.sh -d ${BINDIR}/usr/share/zoneinfo -p America/New_York || die minstallfile iso3166.tab /usr/share/zoneinfo/ || die minstallfile zone.tab /usr/share/zoneinfo/ || die mchmod 0444 /usr/share/zoneinfo/iso3166.tab || die mchmod 0444 /usr/share/zoneinfo/zone.tab || die # alx only: split zone.tab and keep only the zonedata we need # zone.tab mv ${BINDIR}/usr/share/zoneinfo/zone.tab{,.full} || die grep "Europe/Berlin" ${BINDIR}/usr/share/zoneinfo/zone.tab.full > ${BINDIR}/usr/share/zoneinfo/zone.tab || die mchmod 0444 /usr/share/zoneinfo/zone.tab || die # iso3166.tab mv ${BINDIR}/usr/share/zoneinfo/iso3166.tab{,.full} || die grep "Germany" ${BINDIR}/usr/share/zoneinfo/iso3166.tab.full > ${BINDIR}/usr/share/zoneinfo/iso3166.tab || die mchmod 0444 /usr/share/zoneinfo/iso3166.tab || die }