1 |
commit: 428343a884338c1c570256356a1eaf5f8c9e7d74 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 4 12:15:30 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 11 17:57:37 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=428343a8 |
7 |
|
8 |
app-text/docbook-dsssl-stylesheets: Bump to EAPI 7, use sgml-catalog-r1 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
.../docbook-dsssl-stylesheets-1.79-r4.ebuild | 93 ++++++++++++++++++++++ |
13 |
1 file changed, 93 insertions(+) |
14 |
|
15 |
diff --git a/app-text/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-1.79-r4.ebuild b/app-text/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-1.79-r4.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..8603dfc7f36 |
18 |
--- /dev/null |
19 |
+++ b/app-text/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-1.79-r4.ebuild |
20 |
@@ -0,0 +1,93 @@ |
21 |
+# Copyright 1999-2019 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=7 |
25 |
+ |
26 |
+inherit sgml-catalog-r1 |
27 |
+ |
28 |
+MY_P=${P/-stylesheets/} |
29 |
+DESCRIPTION="DSSSL Stylesheets for DocBook" |
30 |
+HOMEPAGE="https://github.com/docbook/wiki/wiki" |
31 |
+SRC_URI="https://downloads.sourceforge.net/project/docbook/docbook-dsssl/${PV}/${MY_P}.tar.bz2" |
32 |
+ |
33 |
+LICENSE="MIT" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris" |
36 |
+IUSE="" |
37 |
+ |
38 |
+RDEPEND=" |
39 |
+ app-text/docbook-sgml-dtd:3.0 |
40 |
+" |
41 |
+ |
42 |
+DOCS=( BUGS ChangeLog README RELEASE-NOTES.txt WhatsNew ) |
43 |
+ |
44 |
+S="${WORKDIR}/${MY_P}" |
45 |
+ |
46 |
+src_install() { |
47 |
+ local d catdir=/usr/share/sgml/docbook/dsssl-stylesheets-${PV} |
48 |
+ |
49 |
+ dobin bin/collateindex.pl |
50 |
+ |
51 |
+ insinto "${catdir}" |
52 |
+ doins catalog VERSION |
53 |
+ |
54 |
+ insinto "${catdir}"/common |
55 |
+ doins common/*.{dsl,ent} |
56 |
+ |
57 |
+ insinto "${catdir}"/images |
58 |
+ doins images/*.gif |
59 |
+ |
60 |
+ for d in html lib olink print; do |
61 |
+ insinto "${catdir}/${d}" |
62 |
+ doins "${d}"/*.dsl |
63 |
+ done |
64 |
+ |
65 |
+ for d in dbdsssl html imagelib olink; do |
66 |
+ insinto "${catdir}/dtds/${d}" |
67 |
+ doins "dtds/${d}"/*.dtd |
68 |
+ done |
69 |
+ |
70 |
+ insinto "${catdir}/dtds/html" |
71 |
+ doins dtds/html/*.{dcl,gml} |
72 |
+ |
73 |
+ insinto /etc/sgml |
74 |
+ newins - dsssl-docbook-stylesheets.cat <<-EOF |
75 |
+ CATALOG "${EPREFIX}/usr/share/sgml/docbook/dsssl-stylesheets-${PV}/catalog" |
76 |
+ EOF |
77 |
+ |
78 |
+ dodoc "${DOCS[@]}" |
79 |
+} |
80 |
+ |
81 |
+pkg_preinst() { |
82 |
+ # work-around old revision removing it |
83 |
+ cp "${ED}"/etc/sgml/dsssl-docbook-stylesheets.cat "${T}" || die |
84 |
+} |
85 |
+ |
86 |
+pkg_postinst() { |
87 |
+ if [[ ! -f ${EROOT}/etc/sgml/dsssl-docbook-stylesheets.cat ]]; then |
88 |
+ cp "${T}"/dsssl-docbook-stylesheets.cat "${EROOT}"/etc/sgml/ || die |
89 |
+ fi |
90 |
+ # this one's shared with openjade, so we need to do it in postinst |
91 |
+ if ! grep -q -s dsssl-docbook-stylesheets.cat \ |
92 |
+ "${EROOT}"/etc/sgml/sgml-docbook.cat; then |
93 |
+ ebegin "Adding dsssl-docbook-stylesheets.cat to /etc/sgml/sgml-docbook.cat" |
94 |
+ cat >> "${EROOT}"/etc/sgml/sgml-docbook.cat <<-EOF |
95 |
+ CATALOG "${EPREFIX}/etc/sgml/dsssl-docbook-stylesheets.cat" |
96 |
+ EOF |
97 |
+ eend |
98 |
+ fi |
99 |
+ sgml-catalog-r1_pkg_postinst |
100 |
+} |
101 |
+ |
102 |
+pkg_postrm() { |
103 |
+ if [[ -z ${REPLACED_BY_VERSION} ]]; then |
104 |
+ ebegin "Removing dsssl-docbook-stylesheets.cat from /etc/sgml/sgml-docbook.cat" |
105 |
+ sed -i -e '/dsssl-docbook-stylesheets/d' \ |
106 |
+ "${EROOT}"/etc/sgml/sgml-docbook.cat |
107 |
+ eend |
108 |
+ if [[ ! -s ${EROOT}/etc/sgml/sgml-docbook.cat ]]; then |
109 |
+ rm -f "${EROOT}"/etc/sgml/sgml-docbook.cat |
110 |
+ fi |
111 |
+ fi |
112 |
+ sgml-catalog-r1_pkg_postrm |
113 |
+} |