### this file is sourced not run
PKGVER=2.6.2023.06 # pull date
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=symphytum-${PKGVER}.tar.gz
MD5SUM=cebdac231e97a153aa272e8d773592e7
SRC_URL=https://github.com/giowck/symphytum/archive/1b7cbdc969c0ad3b4ce3f40aafa5eb811a72bfc9.tar.gz
BUNDLE=

SLACKREQ='qt5-common'

SLACKDESC="symphytum: symphytum $PKGVER (Personal Database)
symphytum: 
symphytum: Symphytum is a personal database software for everyone who desires to 
symphytum: manage and organize data in an easy and intuitive way, without having 
symphytum: to study complex database languages and software user interfaces.
symphytum: 
symphytum: https://github.com/giowck/symphytum/
symphytum: 
symphytum: 
symphytum: 
symphytum: 
"

### 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 CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/opt/qt5/include"
	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" 

	cd /tmp/symphytum* &&
	qmake -config release &&
	make $MAKEFLAGS &&
	pkg_build_slackdesc &&

	# install manually - taken from arch packager (stuff/installers/PKGBUILD)
	
	# Binary
	install -Dm755 "symphytum" "/usr/bin/symphytum" &&

	# Icons and desktop files
	install -dm755 "/usr/share/" &&
	cp -R "stuff/installers/deb/usr/share/applications/" "/usr/share/" &&
	cp -R "stuff/installers/deb/usr/share/pixmaps/" "/usr/share/" &&

	# Sync framework files
	install -dm755 "/usr/share/symphytum/" &&
	tar xzvf stuff/installers/deb/usr/share/symphytum/sync/dropbox-*.tar.gz -C stuff/installers/deb/usr/share/symphytum/sync/ &&
	rm -v stuff/installers/deb/usr/share/symphytum/sync/dropbox-*.tar.gz &&
	cp -R "stuff/installers/deb/usr/share/symphytum/" "/usr/share/" &&
	
	true
}
