1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-07-01 23:40:19 +02:00
build/pkg/tzdata/build
David Oberhollenzer d2432c1d1e Use pkg for managing binaries and their dependencies
- rewrite the rootfs_files.txt listings to the format used by pkg
 - create package files from each package
 - use "pkg install" to manage installation of packages and dependencies
   into the rootfs and initrd staging dirs

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-03 17:47:02 +01:00

38 lines
880 B
Plaintext

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