Blame env-builder-data/build/script/packet/bzip2-1.0.6.sh

31c087
31c087
PK_DIRNAME="bzip2-1.0.6"
31c087
PK_ARCHIVE="$PK_DIRNAME.tar.gz"
337357
PK_URL="https://sourceware.org/pub/bzip2/$PK_ARCHIVE"
31c087
31c087
source $INCLUDE_SCRIPT_DIR/inc-pkall-default.sh
31c087
31c087
pkbuild() {
31c087
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME" || return 1
31c087
31c087
    cp --remove-destination "$UNPACK_PACKET_DIR/$PK_DIRNAME/Makefile" ./ || return 1
31c087
    patch "Makefile" "$FILES_PACKET_DIR/Makefile.patch" || return 1
31c087
31c087
    cp --remove-destination "$UNPACK_PACKET_DIR/$PK_DIRNAME/bzip2.c" ./ || return 1
31c087
    patch "bzip2.c" "$FILES_PACKET_DIR/bzip2.c.patch" || return 1
31c087
31c087
    PREFIX="$INSTALL_PACKET_DIR" make -j${THREADS} libbz2.a || return 1
31c087
}
31c087
31c087
pkinstall() {
31c087
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME" || return 1
31c087
31c087
    mkdir -p "$INSTALL_PACKET_DIR/include"
31c087
    cp -f bzlib.h "$INSTALL_PACKET_DIR/include/" || return 1
31c087
    
31c087
    mkdir -p "$INSTALL_PACKET_DIR/lib"
31c087
    cp -f libbz2.a "$INSTALL_PACKET_DIR/lib/"|| return 1
31c087
}