#Maintainer: Shador <futur~DOT~andy~AT~googlemail.com>

pkgname=unison
pkgver=2.32.52
pkgrel=1ab
arch=i486
source=('http://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.32.52.tar.gz' 'unison.png')
sourcetemplate="http://gaia.homelinux.org/salix/packages/$pkgname/$pkgver/"
docs=("bugs.txt" "contrib" "copying" "install" "news" "readme" "roadmap.txt" "tags" "todo.txt")
url='http://www.cis.upenn.edu/~bcpierce/unison/'
CXXFLAGS=' '
CFLAGS=$CXXFLAGS

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname - file-synchronization tool"
"Unison is a file-synchronization tool for Unix and Windows. It allows"
"two replicas of a collection of files and directories to be stored on"
"different hosts (or different disks on the same host), modified"
"separately, and then brought up to date by propagating the changes in"
"each replica to the other. Unison shares a number of features with"
"tools such as configuration management packages (CVS, PRCS,"
"Subversion, BitKeeper, etc.), distributed filesystems (Coda, etc.),"
"uni-directional mirroring utilities (rsync, etc.), and other"
"synchronizers (Intellisync, Reconcile, etc)."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	
	make UISTYLE=gtk2 THREADS=true || return 1
	
	mkdir -p $startdir/pkg/usr/{share/applications,bin}/
	cp ./unison $startdir/pkg/usr/bin/
	ln -s ./unison $startdir/pkg/usr/bin/unison-2.27
	
	for size in 16x16 24x24 32x32 48x48 64x64; do
		mkdir -p $startdir/pkg/usr/share/icons/hicolor/$size/apps
		convert ../unison.png -scale $size $startdir/pkg/usr/share/icons/hicolor/$size/apps/unison.png
	done
	cat <<"EODESK" >$startdir/pkg/usr/share/applications/unison.desktop
[Desktop Entry]
Name=Unison
Comment=The file-synchronizer
Exec=unison
Icon=unison
Terminal=false
Type=Application
Categories=Application;Utility;Filesystem;
EODESK
}