1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-16 00:17:11 +01:00
build/pkg/tzdata/build
David Oberhollenzer baacba67b0 Bump tzdb version
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-09-18 14:07:02 +02:00

39 lines
1 KiB
Text

VERSION="2019c"
SRCDIR="tzdb-${VERSION}"
TARBALL="${SRCDIR}.tar.xz"
URL="https://infraroot.at/pygos"
SHA256SUM="bb2373338140c3de7251e548526f1f70cb742739a962aad3f10238343a2c674c"
DEPENDS="toolchain"
SUBPKG="tzdata tzdata-dev"
prepare() {
sed -i 's/sbin/bin/g' Makefile
}
build() {
cp -r ${1}/* ${PKGBUILDDIR}
make -j $NUMJOBS
}
deploy() {
make USRDIR="" DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
sed -i 's@/usr@@g' "$PKGDEPLOYDIR/bin/tzselect"
pkg_scan_dir "$PKGDEPLOYDIR/share/zoneinfo" | \
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/tzdata.files"
pkg_scan_dir "$PKGDEPLOYDIR/share/zoneinfo-leaps" | \
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/tzdata.files"
}
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"
}