# vim: syn=sh:
#Maintainer: JRD <jrd@enialis.net>

pkgname=backintime
pkgver=0.9.26
pkgrel=1cp
arch=i486
source=(http://backintime.le-web.org/download/$pkgname/$pkgname-${pkgver}_src.tar.gz thunar-custom-action-howto)
sourcetemplate=http://enialis.net/~jrd/salix/$pkgname/$pkgver-$pkgrel/
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "thunar-custom-action-howto")
url=http://backintime.le-web.org

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (simple backup tool for Linux)"
"Back In Time is a simple backup tool for Linux based on rsync."
"The backup is done by taking snapshots of a specified set of folders."
"This is the front-end for GNOME/GTK."
"You could find how to add a custom action in Thunar in"
"  /usr/doc/$pkgname-$pkgver/"
"All you have to do is configure:"
"  * Where to save snapshot"
"  * What directories to backup"
"  * When backup should be done"
)

build() {
  cd $startdir/src/backintime-$pkgver/common
  export DESTDIR=$startdir/pkg
  export PREFIX=/usr
  ./configure || return 1
  make || return 1
  make install || return 1
  cd $startdir/src/backintime-$pkgver/gnome
  ./configure --no-check || return 1
  make || return 1
  make install || return 1
  cp $startdir/pkg/usr/share/applications/backintime-gnome-root.desktop $startdir/pkg/usr/share/applications/backintime-gnome-root-kde.desktop
  echo 'NotShowIn=KDE' >> $startdir/pkg/usr/share/applications/backintime-gnome-root.desktop
  sed -i 's/gksu /kdesu /' $startdir/pkg/usr/share/applications/backintime-gnome-root-kde.desktop
  echo 'OnlyShowIn=KDE' >> $startdir/pkg/usr/share/applications/backintime-gnome-root-kde.desktop
}