1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-23 03:29:46 +01:00
build/pkg/tzdata/build
David Oberhollenzer b4502eaf80 Add time zone data
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-08 15:05:49 +02:00

37 lines
884 B
Text

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