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

# source: BLFS 11.3
TARBALL=libgcrypt-$PKGVER.tar.bz2
MD5SUM=8fadbe1fddafa341dce5ef3869f70e25
SRC_URL=https://www.gnupg.org/ftp/gcrypt/libgcrypt/$TARBALL
BUNDLE=

SLACKREQ=libgpg-error32
SLACKDESC="libgcrypt32: libcrypt32 $PKGVER (GnuPG Cryptographic library)  
libgcrypt32:  
libgcrypt32: The libgcrypt package contains a general purpose crypto library 
libgcrypt32: based on the code used in GnuPG. The library provides a high level 
libgcrypt32: interface to cryptographic building blocks using an extendable and 
libgcrypt32: flexible API.  
libgcrypt32: 
libgcrypt32: This contains 32-bit version of the library
libgcrypt32: 
libgcrypt32: https://gnupg.org/software/libgcrypt/
libgcrypt32:
"

### 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 &&
	mkdir -p usr/bin &&
	mv -v tmp/*-32 usr/bin
}

### build
pkg_build() {
	cd /tmp/libgcrypt* 
	CC="gcc ${BUILD32}" USE_ARCH=32 ./configure $CONFFLAGS \
	--disable-static \
    --build=$CLFS_TARGET32 --host=$CLFS_TARGET32 &&
	make $MAKEFLAGS && make install &&
	pkg_build_slackdesc &&
	
	# multilib
	mv /usr/bin/libgcrypt-config /tmp/libgcrypt-config-32
}


