### this file is sourced not run
PKGVER=0.8.1.debian5
PKGBUILD=1
PKGARCH=x86_64

# source: james + debian patches
TARBALL=gdmap-0.8.1.tar.gz
MD5SUM=54b43354dbe774810104607ad1eaaed3
SRC_URL=http://downloads.sourceforge.net/gdmap/$TARBALL
BUNDLE=

SLACKREQ=gtk2
SLACKDESC="gdmap: gdmap $PKGVER (Disk space visualisation tool)
gdmap:
gdmap: GdMap is a tool which allows to visualize disk space. Ever wondered why
gdmap: your hard disk is full or what directory and files take up most of the
gdmap: space? With GdMap these questions can be answered quickly. To display
gdmap: directory structures cushion treemaps are used which visualize a
gdmap: complete folder or even the whole hard drive with one picture.
gdmap:
gdmap:
gdmap:
gdmap:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/gdmap*
	tar -xf $CHROOT_DIR/tmp/pkg/gdmap_0.8.1-5.debian.tar.xz &&
	for p in $(cat debian/patches/series); do
		patch -Np1 -i debian/patches/$p || return 1
	done &&

	# Fatdog - open rox folder with right-click
	patch -Np1 -i ../pkg/right-click-open-rox.patch &&
	patch -Np1 -i ../pkg/fix-settings.patch &&
	true
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/gdmap*
	autoreconf -fi &&
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	sed -i 's/gdmap_icon.png/gdmap_icon/' /usr/share/applications/gdmap.desktop &&

	# replace with our own desktop file altogether
	install -m644 /tmp/pkg/gdmap.desktop /usr/share/applications
}
