chroot-bzip2: provides bzip2 and bzip2-devel vpkgs.

This commit is contained in:
Juan RP 2012-02-28 22:03:19 +01:00
parent ad3e526fc0
commit 98088db2fb
3 changed files with 37 additions and 2 deletions

View file

@ -1 +1,2 @@
libc.so.6
libbz2.so.1

View file

@ -0,0 +1,15 @@
--- Makefile-libbz2_so.orig 2010-10-21 23:53:37.730855571 +0200
+++ Makefile-libbz2_so 2010-10-21 23:54:25.784425275 +0200
@@ -35,10 +35,11 @@ OBJS= blocksort.o \
bzlib.o
all: $(OBJS)
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
+ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS)
$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
rm -f libbz2.so.1.0
ln -s libbz2.so.1.0.6 libbz2.so.1.0
+ ln -s libbz2.so.1.0.6 libbz2.so.1
clean:
rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared

View file

@ -1,6 +1,7 @@
# Template build file for 'chroot-bzip2'.
pkgname=chroot-bzip2
version=1.0.6
revision=1
wrksrc="bzip2-${version}"
homepage="http://www.bzip.org"
distfiles="http://www.bzip.org/$version/bzip2-$version.tar.gz"
@ -25,17 +26,35 @@ long_desc="
This package is only meant to be used by xbps-src, don't install it manually."
noverifyrdeps=yes
bootstrap=yes
provides="bzip2-${version} bzip2-devel-${version}"
conflicts="bzip2>=0"
do_build() {
# Add large-file support
sed -e 's/^CFLAGS=\(.*\)$/CFLAGS=\1 \$(BIGFILES)/' -i Makefile-libbz2_so
# use our optimization
sed -i "s|-O2|${CFLAGS}|g" Makefile
make ${makejobs}
sed -i "s|-O2|${CFLAGS}|g" Makefile-libbz2_so
make ${makejobs} -f Makefile-libbz2_so
make ${makejobs} bzip2recover libbz2.a
}
do_install() {
vinstall bzip2 755 usr/bin bzip2
vinstall bzip2-shared 755 usr/bin bzip2
vinstall bzip2recover 755 usr/bin
ln -sf bzip2 ${DESTDIR}/usr/bin/bunzip2
ln -sf bzip2 ${DESTDIR}/usr/bin/bzcat
install -m755 bzdiff bzgrep bzmore ${DESTDIR}/usr/bin
vinstall libbz2.so.${version} 755 usr/lib
ln -s libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so
ln -s libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so.1
ln -s libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so.1.0
vinstall libbz2.a 644 usr/lib
vinstall bzlib.h 644 usr/include
}