mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
39 lines
1 KiB
Text
39 lines
1 KiB
Text
VERSION="2019b"
|
|
SRCDIR="tzdb-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.xz"
|
|
URL="https://infraroot.at/pygos"
|
|
SHA256SUM="33dc25ddb936ad0ef098ff8ceecb2bbb7725fbdf720be0ebd8cc3bed5b418b59"
|
|
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"
|
|
}
|