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

# source: james
# release tarball
#PKGVER=
#TARBALL=
#MD5SUM=
#SRC_URL=
#BUNDLE=

# git-master tarball
PKGVER=3.50.09
MD5SUM=1ca875b797b9be1b715501702f7faabc
hash=199472ad6a4ecee6c8583fb5a504a2e99712b4fc
hash7=${hash#???????}; hash7=${hash%$hash7}
TARBALL=mtpaint-$PKGVER.tar.gz
SRC_URL=https://github.com/wjaguar/mtPaint/archive/$hash.tar.gz

SLACKREQ='freetype2 lcms2 giflib libjpeg-turbo libopenjpeg libtiff gifsicle
libwebp libopenjpeg2'
SLACKDESC="mtpaint: mtpaint $PKGVER (Paint program)
mtpaint:  
mtpaint: mtPaint is a painting program which Mark Tyler developed from scratch 
mtpaint: so he could easily create pixel art and manipulate digital photos. It 
mtpaint: uses the GTK+ toolkit (version 1 or 2) and runs on PCs via the 
mtpaint: GNU/Linux or Windows operating systems. Due to its efficient design 
mtpaint: it can run on older PC hardware (e.g. a 200MHz CPU and 16MB of free 
mtpaint: RAM).  
mtpaint: 
mtpaint: https://github.com/wjaguar/mtPaint
mtpaint:
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/mtPaint*
	./configure release intl man --prefix=/usr &&
	make $MAKEFLAGS && make $MAKEINSTALLFLAGS install &&
	pkg_build_slackdesc &&

	# Custom Fatdog desktop file
	sed -i -e 's|^Categories=.*|Categories=Graphics;|' /usr/share/applications/mtpaint.desktop &&

	# Append 'image/webp' to MIME types in desktop file
	sed -i 's#MimeType=.*#&image/webp;#' /usr/share/applications/mtpaint.desktop
}


