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

# source: Kirk
TARBALL=boinc-v2-92747bc.tar.bz2
MD5SUM=7d3f432e3d537830297a5bca5eb91de7
SRC_URL=http://distro.ibiblio.org/fatdog/source/700/$TARBALL
BUNDLE=

SLACKREQ='wxwidgets'
SLACKDESC='boinc: boinc 2.8.12 (Network computing)  
boinc:  
boinc: The Berkeley Open Infrastructure for Network Computing is an
boinc: open source middleware system for volunteer and grid
boinc: computing. A menu entry for bonic-manager is under
boinc: Personal in the main menu. Boinc installs into
boinc: /usr/share/BOINC.
boinc:  
boinc:  
boinc: 
boinc: 
'

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/boinc*
	export CXXFLAGS="-O3"
	./_autosetup &&
	CONFFLAGS="$CONFFLAGS --disable-server --enable-client" &&
	./configure $CONFFLAGS && make $MAKEFLAGS &&
	cd ./packages/generic/sea/ &&
	make $MAKEFLAGS &&
	cp ./boincmgr.48x48.png /usr/share/pixmaps/ &&
	rm -r BOINC &&
	./boinc_7.2.47_x86_64-pc-linux-gnu.sh &&
	cp -r BOINC /usr/share/
	
		# launcher
	cat > /usr/bin/boinc-manager << "EOF"
#!/bin/ash
cd /usr/share/BOINC && exec ./boincmgr $@
EOF

chmod 755 /usr/bin/boinc-manager

		# desktop file
	cat > /usr/share/applications/boinc.desktop << "EOF"
[Desktop Entry]
Name=Boinc Client
GenericName=Boinc client
Comment=Boinc network computing
Exec=/usr/bin/boinc-manager
Icon=boincmgr.48x48.png
Terminal=false
Type=Application
StartupNotify=false
Categories=X-Personal;
Encoding=UTF-8
EOF

	pkg_build_slackdesc
}


