### this file is sourced not run
PKGVER=3.0.0
PKGBUILD=1

# source: CBLFS 3.0.0
TARBALL= # no tarball
MD5SUM=  # no md5sum 
SRC_URL= # no download url - comes from $CHROOT_DIR/tmp/pkg
BUNDLE=

SLACKREQ=
SLACKDESC="multiarch-wrapper: multiarch-wrapper $PKGVER (CBLFS multiarch-wrapper)  
multiarch-wrapper:  
multiarch-wrapper: Execute a different program based on the USE_ARCH variable. 
multiarch-wrapper: The USE_ARCH variable will be the suffix of the executed 
multiarch-wrapper: program.  
multiarch-wrapper: 
multiarch-wrapper: 
multiarch-wrapper: 
multiarch-wrapper: 
multiarch-wrapper: 
multiarch-wrapper:
"

### nothing to download
pkg_download() {
	: do nothing
}

### nothing to prepare
pkg_prepare() {
	: do nothing
}

### default pkg_package
### build
pkg_build() {
	# build
	gcc -s -o /usr/bin/multiarch_wrapper /tmp/pkg/multiarch_wrapper.c &&
	
	# test
	cd /tmp &&
	echo 'echo "32bit Version"' > test-32 &&
	echo 'echo "64bit Version"' > test-64 &&
	chmod -v 755 test-32 test-64 &&
	ln -sv /usr/bin/multiarch_wrapper test	&&
	
	USE_ARCH=32 ./test | grep 32bit &&
	USE_ARCH=64 ./test | grep 64bit &&
	
	pkg_build_slackdesc
}


