# vim: set syn=sh:
# Packager: Phill Watkins <ubemail~at~ymail~dot~com>
# Former Packager(s): George Vlahavas (vlahavas~at~gmail~dot~com)

pkgname=gparted
pkgver=0.8.0
pkgrel=1pw
#arch=
source=("http://downloads.sourceforge.net/project/gparted/gparted/gparted-$pkgver/gparted-$pkgver.tar.bz2")
sourcetemplate=http://people.salixos.org/pwatk/packages/13.2/xap/$pkgname
docs=("README" "INSTALL" "COPYING" "ChangeLog" "AUTHORS" "NEWS" "TODO")
url=http://gparted.sourceforge.net/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"gparted (Gnome Partition Editor)"
"The goal of GParted is to provide an easy way to graphically manage"
"disk device partitions, without unintended loss of data, through the"
"use of GNU libparted and other free software file system tools."
)

build() {
	set -e
	
	cd $startdir/src/$pkgname-$pkgver
	./configure \
	  --prefix=/usr \
	  --sysconfdir=/etc \
	  --localstatedir=/var \
	  --libdir=/usr/lib${LIBDIRSUFFIX} \
	  --mandir=/usr/man \
	  --infodir=/usr/info \
	  --docdir=/usr/doc/$pkgname-$pkgver \
	  --build=$arch-slackware-linux \
	  --disable-doc
	make -j $numjobs
	make install DESTDIR=$startdir/pkg

	# Create two .desktop files, one for KDE, one for the rest
	( cd $startdir/pkg/usr/share/applications
	  cp -a gparted{,-kde}.desktop
	  echo "NotShowIn=KDE" >> gparted.desktop 
	  echo "OnlyShowIn=KDE" >> gparted-kde.desktop
	  sed "s/gksu/kdesu/" -i gparted-kde.desktop
	)

	set +e
}