VERSION="2018i" SRCDIR="tzdb-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="http://infraroot.at/pygos" SHA256SUM="d7cf8a0edd7b0d9c926e4fb9b5d7adb3ca951df244806a99a7430be4e6d2a899" DEPENDS="toolchain" prepare() { sed -i 's/sbin/bin/g' Makefile } build() { cp -r ${1}/* ${PKGBUILDDIR} make -j $NUMJOBS } deploy() { local SOURCE="$1" local DEPLOY="$2" make USRDIR="" DESTDIR="$DEPLOY" install cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY" sed -i 's@/usr@@g' "$DEPLOY/bin/tzselect" rm "$DEPLOY/bin/zdump" rm "$DEPLOY/bin/zic" } check_update() { local version=$(echo $VERSION | sed 's/\([[:lower:]]\)/.\1/g') local url="https://data.iana.org/time-zones/releases" curl --silent -L "$url" | grep -o "tzdb-[0-9a-z]*\.tar\.lz" | \ sed 's/tzdb-//g' | sed 's/.tar.lz//g' | sort -u | \ sed 's/\([[:lower:]]\)/.\1/g' | \ verson_find_greatest "$version" }