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

# source: james
TARBALL=mdview-2023-10-06.tar.bz2
MD5SUM=33748cf3dc0c82844cf9d7c24bf54dec
SRC_URL=http://distro.ibiblio.org/fatdog/source/900/$TARBALL
BUNDLE=

SLACKREQ='gtk2' # gettext build-time only
SLACKDESC="mdview: mdview $PKGVER (Simple markdown viewer)
mdview:
mdview: mdview is a super light-weight, GTK-based markdown files viewer. It
mdview: has no other dependencies other than GTK itself. It reads and
mdview: displays text files in (a subset of) markdown format, and provide
mdview: live links to other files as well as to the Internet. It is ideal for
mdview: showing help files (its original purpose), user manuals, and other
mdview: small set of hyperlinked markdown files.
mdview:
mdview:
mdview:
"

### default pkg_download
pkg_prepare() {
	pkg_prepare_default &&
	#patch is upstreamed
	#cd tmp/mdview-* &&
	#patch -Np1 -i ../pkg/hotfix_search_result_links_without_text.patch &&
	true
}
### default pkg_package

### build
pkg_build() {
	cd /tmp/mdview* &&

	make DEBUG="-Os -s" &&
	install -m755 mdview /usr/bin &&
	install -dm755 /usr/share/mdview/ &&
	cp -a examples /usr/share/mdview/ &&
	install -dm755 /usr/share/locale/de/LC_MESSAGES &&
	msgfmt po/de.po > /usr/share/locale/de/LC_MESSAGES/mdview.mo &&

	pkg_build_slackdesc
}
