### this file is sourced not run
PKGVER=0.9.0 # latest GTK2 version
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=gsmartcontrol-$PKGVER.tar.bz2
MD5SUM=bd7816722eb376b059d85bb42e4ff62e
SRC_URL=http://downloads.sourceforge.net/gsmartcontrol/$TARBALL
BUNDLE=

SLACKREQ="gtk2mm libpcre smartmontools"
SLACKDESC="gsmartcontrol: gsmartcontrol $PKGVER (GUI for smartmontools)  
gsmartcontrol:  
gsmartcontrol: GSmartControl is a graphical user interface (GUI) for smartctl 
gsmartcontrol: (from smartmontools package), which is a tool for querying and 
gsmartcontrol: controlling SMART (Self-Monitoring, Analysis, and Reporting 
gsmartcontrol: Technology) data on modern hard disk and solid-state drives. It 
gsmartcontrol: allows you to inspect the drive's SMART data to determine its 
gsmartcontrol: health, as well as run various tests on it.  
gsmartcontrol: 
gsmartcontrol: 
gsmartcontrol:
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	rm -f icon-theme.cache &&
	rm -f usr/share/icons/hicolor/icon-theme.cache &&
	# replace gsmartcontrol-root with the one that works
	> /usr/bin/gsmartcontrol-root cat << "EOF"
#!/bin/sh
[ $(id -u) -ne 0 ] && type gtksu > /dev/null && exec gtksu gsmartcontrol gsmartcontrol "$@"
exec gsmartcontrol "$@"
EOF
}
