bzip2 1.0.8-1

This commit is contained in:
xhaa123 2024-09-07 23:18:11 +08:00
parent a51190774a
commit 7eedf64905
2 changed files with 94 additions and 0 deletions

52
bzip2/PKGBUILD Normal file
View File

@ -0,0 +1,52 @@
# 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
}

View File

@ -0,0 +1,42 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2007-01-31
Initial Package Version: 1.0.4
Upstream Status: Not submitted
Origin: Randy McMurchy & Steve Crosby
Description: Installs pre-formatted documentation
diff -Naur bzip2-1.0.4.orig/Makefile bzip2-1.0.4/Makefile
--- bzip2-1.0.4.orig/Makefile 2007-01-03 03:49:21.000000000 +0000
+++ bzip2-1.0.4/Makefile 2007-01-26 20:00:01.000000000 +0000
@@ -25,7 +25,7 @@
# Where you want it installed when you do 'make install'
PREFIX=/usr/local
-
+DOCDIR=share/doc/$(DISTNAME)
OBJS= blocksort.o \
huffman.o \
@@ -74,6 +74,7 @@
if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
+ if ( test ! -d $(PREFIX)/$(DOCDIR) ) ; then mkdir -p $(PREFIX)/$(DOCDIR); fi
if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
cp -f bzip2 $(PREFIX)/bin/bzip2
cp -f bzip2 $(PREFIX)/bin/bunzip2
@@ -107,6 +108,14 @@
echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+ cp -f manual.html $(PREFIX)/$(DOCDIR)
+ cp -f manual.pdf $(PREFIX)/$(DOCDIR)
+ cp -f manual.ps $(PREFIX)/$(DOCDIR)
+ cp -f bzip2.txt $(PREFIX)/$(DOCDIR)
+ chmod a+r $(PREFIX)/$(DOCDIR)/manual.html
+ chmod a+r $(PREFIX)/$(DOCDIR)/manual.pdf
+ chmod a+r $(PREFIX)/$(DOCDIR)/manual.ps
+ chmod a+r $(PREFIX)/$(DOCDIR)/bzip2.txt
clean:
rm -f *.o libbz2.a bzip2 bzip2recover \