1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 11:09:46 +01:00
build/pkg/tzdata/build
David Oberhollenzer 81f4f36044 Bump tzdata version
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-03 19:28:43 +01:00

37 lines
884 B
Text

VERSION="2018f"
SRCDIR="tzdb-${VERSION}"
TARBALL="${SRCDIR}.tar.xz"
URL="http://infraroot.at/pygos"
SHA256SUM="a200d41801d214e212a6c870049c98aabde80e381a3cea7569160a2e210f2c14"
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/rootfs_files.txt" "$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"
}