#!/bin/sh MAKEDEPS="make " DEPS="musl sh" PKG_VER=1.0.8 SOURCE=git://sourceware.org/git/bzip2.git BRANCH=bzip2-$PKG_VER DESC="a selection of programs for compressing and decompressing bzip2 files" prepare () { # ensure symbolic links are relative sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile } build () { make -f Makefile-libbz2_so make clean make } package () { make PREFIX=$PKG_DEST/usr install cp -av libbz2.so* $PKG_DEST/usr/lib cp -av libbz2.so.$PKG_VER $PKG_DEST/usr/lib/libbz2.so cp -v bzip2-shared $PKG_DEST/usr/bin/bzip2 for i in $PKG_DEST/usr/bin/{bzcat,bunzip2}; do ln -sfv bzip2 $i done # remove a useless static library rm -fv $PKG_DEST/usr/lib/libbz2.a }