### this file is sourced not run
PKGVER=0.6.9debian3
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=partimage-0.6.9.tar.bz2
MD5SUM=1bc046fd915c5debbafc85729464e513
SRC_URL=http://downloads.sourceforge.net/partimage/$TARBALL
BUNDLE=

SLACKREQ='libnewt openssl' # lzo2 build-time only
SLACKDESC='partimage: partimage 0.6.9debian3 (Partition Imager)  
partimage:  
partimage: Partimage is a Linux utility which saves partitions having a 
partimage: supported filesystem to an image file. Most Linux and Windows 
partimage: filesystems are supported. The image file can be compressed with 
partimage: the gzip / bzip2 programs to save disk space, and they can be 
partimage: splitted into multiple files to be copied on CDs / DVDs, ... 
partimage: Partitions can also be saved across the network since version 0.6.0 
partimage: using the partimage network support, or using Samba / NFS.  
partimage: 
partimage:
'

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/partimage* &&
	tar -xf $CHROOT_DIR/tmp/pkg/partimage_0.6.8-3.debian.tar.xz &&
	for p in $(cat debian/patches/series); do
		patch -Np1 -i debian/patches/$p
	done
}


### default pkg_package
### build
pkg_build() {
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	
	# add desktop file
	mkdir -p /usr/share/applications &&
	cat > /usr/share/applications/partimage.desktop << "EOF"
[Desktop Entry]
Encoding=UTF-8
Name=Partition Image
Icon=gparted
Comment=Open source disk backup tool
Exec=defaultterm -e partimage
Terminal=true
Type=Application
Categories=X-FilesystemUtility
GenericName=PartImage
NoDisplay=true
EOF
}
