#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=l3afpad
pkgver=0.8.18.1.11
pkgrel=5gv
source=("https://github.com/stevenhoneyman/l3afpad/archive/refs/tags/v$pkgver.tar.gz"
		"always_redraw_line_numbers.patch"
		"lang_el.patch"
		"pt.po"
		)
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
url=https://github.com/stevenhoneyman/l3afpad

doinst() {
# Update desktop database:
if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database usr/share/applications 1> /dev/null 2> /dev/null
fi
# Update mime database:
if [ -x /usr/bin/update-mime-database -a -d usr/share/mime ]; then
  /usr/bin/update-mime-database usr/share/mime 1> /dev/null 2> /dev/null &
fi
}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"l3afpad (Simple text editor)"
"L3afpad is a simple GTK+ text editor that emphasizes simplicity. As"
"development focuses on keeping weight down to a minimum, only the most"
"essential features are implemented in the editor. L3afpad is simple to"
"use, is easily compiled, requires few libraries, and starts up"
"quickly."
)


build() {
	cd $startdir/src/$pkgname-$pkgver

	patch -p2 < ../always_redraw_line_numbers.patch || exit 1
	patch -p1 < ../lang_el.patch || exit 1
	cp $startdir/src/pt.po po/

	./autogen.sh
	./configure --prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--localstatedir=/var \
		--sysconfdir=/etc \
		--build=$arch-slackware-linux
	make -j $numjobs || return 1
	make install DESTDIR=$startdir/pkg
}