1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-14 23:47:11 +01:00
build/pkg/tzdata/build
David Oberhollenzer 21342dee8e Cleanup: move path filtering into pkg_scan_dir
Instead of prefixing the search path with $PKGDEPLOYDIR and then
stripping the prefix off again every single time, do that inside
the pkg_scan_dir function.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2020-04-16 15:16:58 +02:00

36 lines
974 B
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 "share/zoneinfo" >> "$PKGDEPLOYDIR/tzdata.files"
pkg_scan_dir "share/zoneinfo-leaps" >> "$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"
}