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

# james
TARBALL=qpress-11-source.zip
MD5SUM=ea2d8bc96e86e93f64a93bc546401c95
SRC_URL=http://www.quicklz.com/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="qpress: qpress $PKGVER (File Archiver)
qpress: 
qpress: qpress is a portable file archiver using QuickLZ and designed to 
qpress: utilize fast storage systems to their max. It's often faster than 
qpress: file copy because the destination is smaller than the source.
qpress: 
qpress: http://www.quicklz.com/
qpress: 
qpress: 
qpress: 
qpress:
"

pkg_download() {
	echo downloading $2
	wget --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" \
		-O $1/$2 "$SRC_URL" # we need to fake a browser to make the website happy
}

pkg_prepare() {
	if pkg_check $SRC_DIR $TARBALL $MD5SUM; then
		echo extracting $TARBALL ...
		unzip $SRC_DIR/$TARBALL -d tmp/qpress &&
		cd tmp/qpress &&
		patch -Np1 -i ../pkg/ftbfs.patch
	else
		return 1
	fi
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/qpress*
	make &&
	install -m755 qpress /usr/bin &&
	pkg_build_slackdesc
}


