#Packager: fredg <fred.galusik~at~gmail~dot~com>

pkgname=testdisk
pkgver=6.11
pkgrel=1fg
arch=i486
source=(http://www.cgsecurity.org/$pkgname-$pkgver.tar.bz2)
sourcetemplate=http://people.salixos.org/fredg/$pkgname/
docs=("readme" "install" "copying" "changelog" "authors" "news" "thanks" "info")
url=http://www.cgsecurity.org/wiki/TestDisk

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"testdisk (data recovery software)"
"TestDisk is a powerful free data recovery software! It was primarily"
"designed to help recover lost partitions and/or make non-booting disks"
"bootable again when these symptoms are caused by faulty software,"
"certain types of viruses or human error (such as accidentally deleting"
"a Partition Table). Partition table recovery using TestDisk"
"is really easy."
"PhotoRec is a file data recovery software designed to recover lost"
"files including video, documents and archives from hard disks,"
"CD-ROMs, and lost pictures"
)


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

# fix doc location
    mkdir -p $startdir/pkg/usr/doc/$pkgname-$pkgver
    mv $startdir/pkg/usr/share/doc/$pkgname-$pkgver/html $startdir/pkg/usr/doc/$pkgname-$pkgver
    rm -rf $startdir/pkg/usr/share
}