bzip2: compile at separate directory
This commit is contained in:
1 file changed
+7
-7
@@ -13,25 +13,25 @@ group=(system.extra)
|
||||
cd $name-$version
|
||||
|
||||
setup(){
|
||||
true
|
||||
mkdir -p $name-shared
|
||||
cp *.c *.h $name-shared
|
||||
cp Makefile-libbz2_so $name-shared/Makefile
|
||||
}
|
||||
build(){
|
||||
export CFLAGS="-Winline -D_FILE_OFFSET_BITS=64 ${CFLAGS}"
|
||||
make -e -j`nproc` bzip2 bzip2recover libbz2.a
|
||||
|
||||
make -f Makefile-libbz2_so clean
|
||||
make -j`nproc` -f Makefile-libbz2_so all CFLAGS="-fpic -fPIC ${CFLAGS}"
|
||||
make -e -j$(nproc) bzip2recover libbz2.a
|
||||
make -j$(nproc) -C $name-shared CFLAGS="-fpic -fPIC ${CFLAGS}"
|
||||
}
|
||||
package(){
|
||||
install -dm755 ${DESTDIR}/usr/{bin,lib64,include,share/man/man1}
|
||||
|
||||
install -m755 bzip2 "${DESTDIR}"/usr/bin/bzip2
|
||||
install -m755 $name-shared/bzip2-shared "${DESTDIR}"/usr/bin/bzip2
|
||||
install -m755 bzip2recover bzdiff bzgrep bzmore "${DESTDIR}"/usr/bin
|
||||
ln -sf bzip2 "${DESTDIR}"/usr/bin/bunzip2
|
||||
ln -sf bzip2 "${DESTDIR}"/usr/bin/bzcat
|
||||
|
||||
cp -a libbz2.a "${DESTDIR}"/usr/lib64/
|
||||
cp -a libbz2.so* "${DESTDIR}"/usr/lib64
|
||||
cp -a $name-shared/libbz2.so* "${DESTDIR}"/usr/lib64
|
||||
ln -s libbz2.so.$version "${DESTDIR}"/usr/lib64/libbz2.so
|
||||
ln -s libbz2.so.$version "${DESTDIR}"/usr/lib64/libbz2.so.1
|
||||
|
||||
|
||||
Reference in new issue
Block a user