mirror of
https://github.com/pygos/build.git
synced 2024-11-25 20:30:43 +01:00
David Oberhollenzer
c8d01f966a
Been working on this for too long, don't remember the specifics, will add documentation. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
38 lines
907 B
Text
38 lines
907 B
Text
VERSION="2018i"
|
|
SRCDIR="tzdb-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.xz"
|
|
URL="http://infraroot.at/pygos"
|
|
SHA256SUM="d7cf8a0edd7b0d9c926e4fb9b5d7adb3ca951df244806a99a7430be4e6d2a899"
|
|
DEPENDS="toolchain"
|
|
SUBPKG="tzdata tzdata-dev"
|
|
|
|
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/*.{files,desc} "$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"
|
|
}
|