diff compression/libarchive/libarchive.sh @ 1222:325631424c65

misc: bring back build function
author David Demelier <markand@malikania.fr>
date Wed, 27 Oct 2021 11:32:16 +0200
parents a47aaf9743a0
children 883739c71a8c
line wrap: on
line diff
--- a/compression/libarchive/libarchive.sh	Fri Oct 15 16:07:30 2021 +0200
+++ b/compression/libarchive/libarchive.sh	Wed Oct 27 11:32:16 2021 +0200
@@ -111,38 +111,41 @@
 	with_zstd="--without-zstd"
 fi
 
-rm -rf $PKGNAME-$PKGVERSION
-tar xvf $PKGNAME-$PKGVERSION.tar.gz
-cd $PKGNAME-$PKGVERSION
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvf $PKGNAME-$PKGVERSION.tar.gz
+	cd $PKGNAME-$PKGVERSION
 
-CC="$CC" \
-CFLAGS="$CFLAGS" \
-CXX="$CXX" \
-CXXFLAGS="$CXXFLAGS" \
-LDFLAGS="$LDFLAGS" \
-LIBS="$LIBS" \
-./configure \
-	--build=$CBUILD \
-	--host=$CHOST \
-	--prefix=/usr \
-	--enable-shared \
-	--enable-bsdtar=shared \
-	--enable-bsdcat=shared \
-	--enable-bsdcpio=shared \
-	--without-xml2 \
-	$with_acl \
-	$with_bzip2 \
-	$with_expat \
-	$with_lz4 \
-	$with_lzma \
-	$with_lzo \
-	$with_nettle \
-	$with_ssl \
-	$with_zlib \
-	$with_zstd
-make
-make install DESTDIR=$DESTDIR
-find $DESTDIR -type f -name "*.la" -delete
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	CXX="$CXX" \
+	CXXFLAGS="$CXXFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix= \
+		--enable-shared \
+		--enable-bsdtar=shared \
+		--enable-bsdcat=shared \
+		--enable-bsdcpio=shared \
+		--without-xml2 \
+		$with_acl \
+		$with_bzip2 \
+		$with_expat \
+		$with_lz4 \
+		$with_lzma \
+		$with_lzo \
+		$with_nettle \
+		$with_ssl \
+		$with_zlib \
+		$with_zstd
+	make
+	make install DESTDIR=$DESTDIR
+	find $DESTDIR -type f -name "*.la" -delete
 
-cd ..
-rm -rf $PKGNAME-$PKGVERSION
+	cd ..
+	rm -rf $PKGNAME-$PKGVERSION
+}