### this file is sourced not run
PKGVER=4.5
PKGBUILD=1
PKGARCH=noarch

# BLFS 11.3
TARBALL=docbook-$PKGVER.zip
MD5SUM=07c581f4bbcba6d3aac85360a19f95f7
SRC_URL=https://www.docbook.org/sgml/$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='' # sgml-common unzip build-time
SLACKDESC="docbook45-dtd: docbook45-dtd $PKGVER (Data Type Defitions (DTD) for DocBook)
docbook45-dtd: 
docbook45-dtd: The DocBook SGML DTD package contains document type definitions for 
docbook45-dtd: verification of SGML data files against the DocBook rule set. These 
docbook45-dtd: are useful for structuring books and software documentation to a 
docbook45-dtd: standard allowing you to utilize transformations already written for 
docbook45-dtd: that standard.
docbook45-dtd: 
docbook45-dtd: This package contains the DTD of Docbook 4.5.
docbook45-dtd: 
docbook45-dtd: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_check $SRC_DIR $TARBALL $MD5SUM &&
	mkdir tmp/docbook &&
	cd tmp/docbook &&
	unzip $SRC_DIR/$TARBALL &&

	# BLFS 11.3: removes the ENT definitions from the catalog file
	sed -i -e '/ISO 8879/d' \
		   -e '/gml/d' docbook.cat &&
	true
}

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

	install -v -d /usr/share/sgml/docbook/sgml-dtd-$PKGVER &&
	chown -R root:root . &&

	install -v docbook.cat /usr/share/sgml/docbook/sgml-dtd-$PKGVER/catalog &&
	cp -v -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-$PKGVER &&

	# do the installation in doinst.sh
	mkdir /install && cp ../pkg/{doinst.sh,slack-uninstall.sh} /install &&
	
	pkg_build_slackdesc
}


