### this file is sourced not run
PKGVER=1.03
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=cmdpack_1.03.orig.tar.gz
MD5SUM=79f62f20dc5ccb68d9a130e17798bb7f
SRC_URL=http://deb.debian.org/debian/pool/main/c/cmdpack/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="cmdpack: cmdpack $PKGVER (Emulation tools)
cmdpack: 
cmdpack: A suite of emulation tools, such as ecm (to compress/decompress ECM 
cmdpack: image), bin2iso (convert .BIN/.CUE cd to .ISO), etc.
cmdpack: Installs to /opt/cmdpack
cmdpack: 
cmdpack: https://packages.debian.org/stretch/ecm
cmdpack: 
cmdpack: 
cmdpack: 
cmdpack: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/cmdpack*/src &&
	
	mkdir -p /opt/cmdpack &&
	for p in bin2iso bincomp brrrip byteshuf byteswap cdpatch ecm \
			 fakecrc hax65816 id3point pecompat rels screamf subfile \
			 uips usfv vb2rip wordadd zerofill
	do
		echo Building $p ...
		$CC -Os $p.c -o /opt/cmdpack/$p || return 1
	done &&
	ln -s ecm /opt/cmdpack/unecm &&
		
	install -m644 ../doc/cmdpack.txt /opt/cmdpack &&
	pkg_build_slackdesc
}
