### this file is sourced not run
PKGVER=3.6.2
PKGBUILD=1
PKGARCH=i686

# source: BLFS 11.3
TARBALL=libarchive-$PKGVER.tar.xz
MD5SUM=72cbb3c085624c825f627bfc8f52ce53
SRC_URL=https://github.com/libarchive/libarchive/releases/download/v$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='bzip2_32 xz32 openssl32 expat32 zstd32' # liblzo2 build-time only
SLACKDESC="libarchive32: libarchive32 $PKGVER (archiver library)  
libarchive32:  
libarchive32: The libarchive library provides a single interface for 
libarchive32: reading/writing various compression formats. Comes with these 
libarchive32: sample tools: bsdtar and bsdcpio.  
libarchive32: 
libarchive32: This contains 32-bit version of the library.
libarchive32: 
libarchive32: http://libarchive.org/
libarchive32: 
libarchive32:
"

### default pkg_download
### default pkg_prepare
### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share etc
}

### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-static --with-expat --with-lzo2" 
	pkg_build_autoconf && pkg_build_slackdesc &&
	sed -i "s/iconv/ /" /usr/$LIBDIR/pkgconfig/libarchive.pc
}
