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

# source: james
TARBALL=freshplayerplugin-2015.09.tar.bz2
MD5SUM=6603614e9c1db4c7fe3623e58d36c8e8
SRC_URL=http://distro.ibiblio.org/fatdog/source/700/$TARBALL
BUNDLE=

SLACKREQ='alsa-lib libjack2 openssl gtk2 libevent libconfig libva' # mesa/opengl, xrandr/xrender, ragel build-time only
SLACKDESC='libfreshplayerplugin: libfreshplayerplugin 2015.04 (NPAPI/Pepper API bridge)
libfreshplayerplugin: 
libfreshplayerplugin: This is a small library to bridge the difference between NPAPI 
libfreshplayerplugin: (browser plugin API from Mozilla, used virtually by all browsers 
libfreshplayerplugin: except Chrome), and Pepper API (the browser plugin API from Google 
libfreshplayerplugin: Chrome). It allows Pepper API plugins (notably, Pepper Flash plugin) 
libfreshplayerplugin: to run on NPAPI-based browsers such as Firefox, Seamonkey, Palemoon, 
libfreshplayerplugin: and its derivative. The implementation is incomplete as it only 
libfreshplayerplugin: implement parts needed to run Flash. Pepper Flash is not included, 
libfreshplayerplugin: you must find it from elsewhere (Chrome package or ChromeOS package).
libfreshplayerplugin: https://github.com/i-rinat/freshplayerplugin
'

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/fresh*
	
	# build
	mkdir build &&
	cd build &&
	cmake .. -DCMAKE_BUILD_TYPE=Release &&
	make $MAKEFLAGS &&
	
	# install bins and docs
	mkdir -p /usr/$LIBDIR/mozilla/plugins /usr/share/doc/libfreshplayerplugin &&
	cp libfreshwrapper-pepperflash.so /usr/$LIBDIR/mozilla/plugins &&
	install -m644 ../README.md ../doc/* ../data/* /usr/share/doc/libfreshplayerplugin &&
	mkdir -p /usr/share/doc/libfreshplayerplugin &&
	install -m644 ../README.md ../doc/* ../data/* /usr/share/doc/libfreshplayerplugin &&
	
	pkg_build_slackdesc
}
