1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-14 15:37:11 +01:00
build/pkg/bzip2/build
David Oberhollenzer 8fa44569d8 cleanup: remove deploy directory argument from package command
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-06 10:03:12 +01:00

43 lines
1.1 KiB
Text
Executable file

VERSION="1.0.6"
SRCDIR="bzip2-${VERSION}"
TARBALL="bzip2_${VERSION}.orig.tar.bz2"
URL="https://snapshot.debian.org/archive/debian/20111204T160411Z/pool/main/b/bzip2"
SHA256SUM="d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7"
DEPENDS="toolchain"
SUBPKG="bzip2-dev bzip2"
prepare() {
return
}
build() {
cp -r ${1}/* ${PKGBUILDDIR}
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="$cflags -fstack-protector-all -fPIE -fPIC"
ldflags="$ldflags -z noexecstack -z relro -z now -fPIE -fPIC"
fi
make CFLAGS="-Wall -Winline -O2 -D_FILE_OFFSET_BITS=64 $cflags" \
LDFLAGS="$ldflags" CC=${TARGET}-gcc AR=${TARGET}-ar \
RANLIB=${TARGET}-ranlib -j $NUMJOBS libbz2.a bzip2 bzip2recover
}
deploy() {
make PREFIX="$PKGDEPLOYDIR" install
rm ${PKGDEPLOYDIR}/bin/{bzegrep,bzfgrep,bzless,bzcmp}
ln -s "/bin/bzgrep" "$PKGDEPLOYDIR/bin/bzegrep"
ln -s "/bin/bzgrep" "$PKGDEPLOYDIR/bin/bzfgrep"
ln -s "/bin/bzmore" "$PKGDEPLOYDIR/bin/bzless"
ln -s "/bin/bzdiff" "$PKGDEPLOYDIR/bin/bzcmp"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
}
check_update() {
return
}