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

# source: james
TARBALL=bibletime-$PKGVER.tar.xz
MD5SUM=e0aed5f3b672c89ee5e06ffeb505e1ae
SRC_URL=https://github.com/bibletime/bibletime/releases/download/v${PKGVER}/$TARBALL
BUNDLE=

SLACKREQ='libclucene libsword qt5 qt5webengine'
SLACKDESC="bibletime: bibletime 2.10.1 (Bible Study Program)  
bibletime:  
bibletime: BibleTime is a Bible study application built with Qt, using the 
bibletime: SWORD programming library to work with Bible texts, commentaries, 
bibletime: dictionaries and books provided by the CrossWire Bible Society.  
bibletime: 
bibletime: This package requires either the full Qt5 package or Qt5 SFS.
bibletime: 
bibletime: http://www.bibletime.info/
bibletime: 
bibletime: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	# qt5	
	export PATH="$PATH:/opt/qt5/bin"
	export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/qt5/$LIBDIR"
	export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/qt5/$LIBDIR/pkgconfig"
	export QT5_PATH="/opt/qt5/bin"
	export QT5_LD_LIBRARY_PATH="/opt/qt5/$LIBDIR"
	export QT5_PKG_CONFIG_PATH="/opt/qt5/$LIBDIR/pkgconfig"
	export QT5_CPLUS_INCLUDE_PATH="/opt/qt5/include" 

	CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_BUILD_TYPE=Release"
	pkg_build_cmake &&
	pkg_build_slackdesc &&

	# will not run as root, so configure it to run as spot
	ln -s program-spot /usr/bin/bibletime-spot &&
	sed -i -e 's|Exec=bibletime|&-spot|' /usr/share/applications/bibletime.desktop
}


