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

# source: james
TARBALL=simple-mtpfs-$PKGVER.tar.gz
MD5SUM=c1572704a6211ecfe05c7f6ae362d09c
SRC_URL=https://github.com/phatina/simple-mtpfs/archive/$TARBALL
BUNDLE=

SLACKREQ='libfuse libmtp libusb' # 
SLACKDESC="simple-mtpfs: simple-mtpfs $PKGVER (MTP filesystem driver)  
simple-mtpfs:  
simple-mtpfs: SIMPLE-MTPFS (Simple Media Transfer Protocol FileSystem) is a 
simple-mtpfs: file system driver, capable of operating on files on MTP devices 
simple-mtpfs: attached via USB to local machine. On the local computer where 
simple-mtpfs: the SIMPLE-MTPFS is mounted, the implementation makes use of the 
simple-mtpfs: FUSE (Filesystem in Userspace) kernel module. The practical 
simple-mtpfs: effect of this is that the end user can seamlessly interact with 
simple-mtpfs: MTP device files.  
simple-mtpfs: 
simple-mtpfs: https://github.com/phatina/simple-mtpfs
"

### default pkg_download
### default pkg_prepare
### package - add desktop files and simple GUI
pkg_package() {
	cp $CHROOT_DIR/tmp/pkg/mtp-browser.sh ./usr/bin &&
	mkdir -p ./usr/share/applications &&
	install -m644 tmp/pkg/mtp-browser.desktop ./usr/share/applications/
}

### build
pkg_build() {
	cd /tmp/simple*
	./autogen.sh &&
	pkg_build_autoconf &&
	pkg_build_slackdesc &&

	# our custom detector
	gcc $CFLAGS -s -o /usr/bin/simple-mtpfs-detect /tmp/pkg/simple-mtpfs-detect.c -lmtp
}
