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

# BLFS 11.3
TARBALL=docbook-utils-$PKGVER.tar.gz
MD5SUM=6b41b18c365c01f225bc417cf632d81c
SRC_URL=https://sourceware.org/ftp/docbook-tools/new-trials/SOURCES/$TARBALL
BUNDLE=

SLACKREQ='openjade docbook-dsssl docbook31-dtd' # unzip build-time
SLACKDESC="docbook-utils: docbook-utils $PKGVER (Convert SGML files to other formats)
docbook-utils: 
docbook-utils: The DocBook-utils package is a collection of utility scripts used to 
docbook-utils: convert and analyze SGML documents in general, and DocBook files in 
docbook-utils: particular. The scripts are used to convert from DocBook or other 
docbook-utils: SGML formats into “classical” file formats like HTML, man, info, 
docbook-utils: RTF and many more. There's also a utility to compare two SGML files 
docbook-utils: and only display the differences in markup. This is useful for 
docbook-utils: comparing documents prepared for different languages.
docbook-utils: 
docbook-utils: 
"
SLACKSUG="perl-sgmlpm"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/docbook* &&
	
	# BLFS 11.3: corrects the syntax of 'grep' used by the jw (Jade Wrapper) script
	patch -Np1 -i ../pkg/docbook-utils-0.6.14-grep_fix-1.patch &&

	# change html doc install location 
	sed -i 's:/html::' doc/HTML/Makefile.in &&
	true
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/docbook* &&

	./configure --prefix=/usr --mandir=/usr/share/man &&
	make &&
	make docdir=/usr/share/doc install &&

	for doctype in html ps dvi man pdf rtf tex texi txt
	do
		ln -svf docbook2$doctype /usr/bin/db2$doctype
	done &&
	
	pkg_build_slackdesc
}


