summaryrefslogtreecommitdiff
blob: b3be13f82b9246712a8153f6039411630b373e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0.ebuild,v 1.2 2004/03/09 05:15:51 geoman Exp $

MY_PN="docbook-simple"
MY_P=${MY_PN}-${PV}

S=${WORKDIR}

DESCRIPTION="Simplified Docbook DTD for XML"
SRC_URI="http://www.oasis-open.org/docbook/xml/simple/${PV}/${MY_P}.zip"
HOMEPAGE="http://www.oasis-open.org/docbook/"
LICENSE="X11"

KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~amd64 ~mips"
SLOT="1.0"
IUSE=""

RDEPEND="dev-libs/libxml2"

DEPEND=">=app-arch/unzip-5.41
	${RDEPEND}"

src_install() {

	insinto /usr/share/sgml/docbook/xml-simple-dtd-${PV}
	doins *.dtd *.mod *.css

}

pkg_postinst() {

	# and now enter the simplified docbook dtd to the catalog
	CATALOG=/etc/xml/catalog

	/usr/bin/xmlcatalog --noout --add "rewriteSystem" \
		"http://www.oasis-open.org/docbook/xml/simple/${PV}" \
		"/usr/share/sgml/docbook/xml-simple-dtd-${PV}" \
		${CATALOG}

	/usr/bin/xmlcatalog --noout --add "rewriteURI" \
		"http://www.oasis-open.org/docbook/xml/simple/${PV}" \
		"/usr/share/sgml/docbook/xml-simple-dtd-${PV}" \
		${CATALOG}

}

pkg_postrm() {

	# and clean up the catalog when we're finished
	CATALOG=/etc/xml/catalog
	/usr/bin/xmlcatalog --noout --del \
		"/usr/share/sgml/docbook/xml-simple-dtd-${PV}" \
		${CATALOG}

}