Core/bzip2/PKGBUILD
2024-09-07 23:18:11 +08:00

53 lines
1.4 KiB
Bash

# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=bzip2
pkgver=1.0.8
pkgrel=1
pkgdesc="A high-quality data compression program"
arch=('x86_64')
url="https://sourceware.org/bzip2"
license=('BSD')
groups=('base')
depends=('glibc' 'bash')
source=(https://www.sourceware.org/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz
${pkgname}-${pkgver}-install_docs-1.patch)
sha256sums=(ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
35e3bbd9642af51fef2a8a83afba040d272da42d7e3a251d8e43255a7b496702)
prepare() {
cd ${pkgname}-${pkgver}
patch -Np1 -i ${srcdir}/${pkgname}-${pkgver}-install_docs-1.patch
sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
sed -i "s@(PREFIX)/lib@(PREFIX)/lib64@g" Makefile
sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
}
build() {
cd ${pkgname}-${pkgver}
make -f Makefile-libbz2_so CC="${CHOST}-gcc ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
make clean
}
package() {
cd ${pkgname}-${pkgver}
make PREFIX=${pkgdir}/usr install
cp -av libbz2.so.* ${pkgdir}/usr/lib64
ln -sv libbz2.so.${pkgver} ${pkgdir}/usr/lib64/libbz2.so
install -m755 bzip2-shared ${pkgdir}/usr/bin/bzip2\
for i in ${pkgdir}/usr/bin/{bzcat,bunzip2}; do
ln -sfv bzip2 ${i}
done
}