From 0fe341f8ec0792db6b0c3ab81a2a93009fc20e93 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 15 Jan 2018 01:06:52 +0100 Subject: [PATCH] Add bzip2 package Signed-off-by: David Oberhollenzer --- cfg/alix/SQUASHFS | 1 + cfg/rpi3/SQUASHFS | 1 + pkg/bzip2/build | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 pkg/bzip2/build diff --git a/cfg/alix/SQUASHFS b/cfg/alix/SQUASHFS index 42481cc..ec44bee 100644 --- a/cfg/alix/SQUASHFS +++ b/cfg/alix/SQUASHFS @@ -6,3 +6,4 @@ util-linux grep less gzip +bzip2 diff --git a/cfg/rpi3/SQUASHFS b/cfg/rpi3/SQUASHFS index 824fac1..b682e9e 100644 --- a/cfg/rpi3/SQUASHFS +++ b/cfg/rpi3/SQUASHFS @@ -9,3 +9,4 @@ kmod grep less gzip +bzip2 diff --git a/pkg/bzip2/build b/pkg/bzip2/build new file mode 100755 index 0000000..b6254da --- /dev/null +++ b/pkg/bzip2/build @@ -0,0 +1,46 @@ +VERSION="1.0.6" +SRCDIR="bzip2-${VERSION}" +TARBALL="${SRCDIR}.tar.gz" +URL="http://www.bzip.org/1.0.6/" +SHA256SUM="a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd" + +prepare() { + return +} + +build() { + local SOURCE="$1" + local BUILD="$2" + + cp -r ${SOURCE}/* ${BUILD} + + make CC=${TARGET}-gcc AR=${TARGET}-ar RANLIB=${TARGET}-ranlib -j $NUMJOBS libbz2.a bzip2 bzip2recover +} + +deploy() { + local SOURCE="$1" + local BUILD="$2" + local DEPLOY="$3" + local DEVDEPLOY="$4" + + make PREFIX="$DEPLOY" install + + mv $DEPLOY/include $DEVDEPLOY + mv $DEPLOY/lib $DEVDEPLOY + rm -r $DEPLOY/man + + ${TARGET}-strip --discard-all ${DEPLOY}/bin/bunzip2 + ${TARGET}-strip --discard-all ${DEPLOY}/bin/bzip2 + ${TARGET}-strip --discard-all ${DEPLOY}/bin/bzip2recover + ${TARGET}-strip --discard-all ${DEPLOY}/bin/bzcat + + rm "$DEPLOY/bin/bzegrep" + rm "$DEPLOY/bin/bzfgrep" + rm "$DEPLOY/bin/bzless" + rm "$DEPLOY/bin/bzcmp" + + ln -s "/bin/bzgrep" "$DEPLOY/bin/bzegrep" + ln -s "/bin/bzgrep" "$DEPLOY/bin/bzfgrep" + ln -s "/bin/bzmore" "$DEPLOY/bin/bzless" + ln -s "/bin/bzdiff" "$DEPLOY/bin/bzcmp" +}