#Maintainer: Maximus (maximuus@gmail.com>

pkgname=xfdiff
pkgver=4.5.0
pkgrel=1mb
arch=i486
source=(http://downloads.sourceforge.net/project/xffm/xfdiff/4.5.0/xfdiff-4.5.0.tar.gz)
sourcetemplate=http://people.salixos.org/maximuus/$pkgname/$pkgver/
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
url=http://xffm.sourceforge.net/xfdiff.html
#dotnew=()
#CFLAGS=
#CXXFLAGS=
#options=('noextract')

#doinst() {
#
#}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname - a graphical interface to the GNU diff and patch commands"
"Xfdiff 4.5.0 is graphic interface to the GNU diff and patch commands."
"With this utility, you can view differences side by side for files or"
"directories. You can also view differences that applying a patch file"
"would imply, without applying the patch. You can also apply patches to"
"the hard disc or create patch files for differences between files or"
"directories. All-in-all, a handy utility for lazy chaps who don't want"
"to type the diff command."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc
	make || return 1
	make install DESTDIR=$startdir/pkg
	
	#remove extra doc directory
	rm -rf $startdir/pkg/usr/share/xffm
	
	#fix icon placement & .desktop
	mkdir -p $startdir/pkg/usr/share/icons/hicolor/48x48/apps
	mv $startdir/pkg/usr/share/pixmaps/xfdiff-icon.png $startdir/pkg/usr/share/icons/hicolor/48x48/apps/xfdiff4.png
	rm -rf $startdir/pkg/usr/share/pixmaps
	sed -i "s|Icon=xfdiff-icon.png|Icon=xfdiff4|" $startdir/pkg/usr/share/applications/Xfdiff.desktop
}