]>
Commit | Line | Data |
---|---|---|
a94d254a | 1 | Name: docbook-dtd30-sgml |
2 | Version: 1.0 | |
3 | Release: 10 | |
4 | Group: Applications/Text | |
5 | ||
6 | Summary: SGML document type definition for DocBook. | |
7 | ||
8 | License: Distributable | |
9 | URL: http://www.oasis-open.org/docbook/ | |
10 | ||
11 | Provides: docbook-dtd-sgml | |
12 | Requires: sgml-common >= 0.5 | |
13 | Requires(post,postun): sgml-common >= 0.5 fileutils | |
14 | ||
15 | BuildRoot: %{_tmppath}/%{name}-%{version} | |
16 | ||
17 | BuildArch: noarch | |
18 | Source0: http://www.oasis-open.org/docbook/sgml/3.0/docbk30.zip | |
19 | Source1: %{name}-%{version}.Makefile | |
20 | Patch0: %{name}-%{version}.catalog.patch | |
21 | BuildRequires: unzip | |
22 | ||
23 | %description | |
24 | The DocBook Document Type Definition (DTD) describes the syntax of | |
25 | technical documentation texts (articles, books and manual pages). | |
26 | This syntax is SGML-compliant and is developed by the OASIS consortium. | |
27 | This is the version 3.0 of this DTD. | |
28 | ||
29 | ||
30 | %prep | |
31 | %setup -c -T | |
32 | unzip %{SOURCE0} | |
33 | if [ `id -u` -eq 0 ]; then | |
34 | chown -R root.root . | |
35 | chmod -R a+rX,g-w,o-w . | |
36 | fi | |
37 | cp %{SOURCE1} Makefile | |
38 | patch -b docbook.cat $RPM_SOURCE_DIR/%{name}-%{version}.catalog.patch | |
39 | ||
40 | %build | |
41 | ||
42 | ||
43 | %install | |
44 | DESTDIR=$RPM_BUILD_ROOT | |
45 | rm -rf $DESTDIR | |
46 | make install DESTDIR=$DESTDIR/usr/share/sgml/docbook/sgml-dtd-3.0 | |
47 | ||
48 | ||
49 | %clean | |
50 | DESTDIR=$RPM_BUILD_ROOT | |
51 | rm -rf $DESTDIR | |
52 | ||
53 | ||
54 | %files | |
55 | %defattr (-,root,root) | |
56 | %doc *.txt | |
57 | /usr/share/sgml/docbook/sgml-dtd-3.0 | |
58 | ||
59 | ||
60 | %post | |
61 | # Update the centralized catalog corresponding to this version of the DTD | |
62 | /usr/bin/install-catalog --add /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null | |
63 | /usr/bin/install-catalog --add /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/docbook/sgml-dtd-3.0/catalog > /dev/null | |
64 | ||
65 | # The following lines are for the case in which the style sheets were | |
66 | # installed after another DTD but before this DTD | |
67 | STYLESHEETS=$(echo /usr/share/sgml/docbook/dsssl-stylesheets-*) | |
68 | STYLESHEETS=${STYLESHEETS##*/dsssl-stylesheets-} | |
69 | if [ "$STYLESHEETS" != "*" ]; then | |
70 | /usr/bin/install-catalog --add /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/openjade-1.3/catalog > /dev/null | |
71 | /usr/bin/install-catalog --add /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/docbook/dsssl-stylesheets-$STYLESHEETS/catalog > /dev/null | |
72 | fi | |
73 | ||
74 | # Update the link to the current version of the DTD | |
75 | ln -s -f /etc/sgml/sgml-docbook-3.0.cat /etc/sgml/sgml-docbook.cat | |
76 | ||
77 | ||
78 | %postun | |
79 | # Update the centralized catalog corresponding to this version of the DTD | |
80 | /usr/bin/install-catalog --remove /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null | |
81 | /usr/bin/install-catalog --remove /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/docbook/sgml-dtd-3.0/catalog > /dev/null | |
82 | ||
83 | # The following lines are for the case in which the style sheets were | |
84 | # not uninstalled because there is still another DTD | |
85 | STYLESHEETS=$(echo /usr/share/sgml/docbook/dsssl-stylesheets-*) | |
86 | STYLESHEETS=${STYLESHEETS##*/dsssl-stylesheets-} | |
87 | if [ "$STYLESHEETS" != "*" ]; then | |
88 | /usr/bin/install-catalog --remove /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/openjade-1.3/catalog > /dev/null | |
89 | /usr/bin/install-catalog --remove /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/docbook/dsssl-stylesheets-$STYLESHEETS/catalog > /dev/null | |
90 | fi | |
91 | ||
92 | # Update the link to the current version of the DTD | |
93 | if [ ! -e /etc/sgml/sgml-docbook-3.0.cat ]; then | |
94 | rm -f /etc/sgml/sgml-docbook.cat | |
95 | OTHERCAT=`ls /etc/sgml/sgml-docbook-?.?.cat 2> /dev/null | head --lines 1` | |
96 | if [ -n "$OTHERCAT" ]; then ln -s $OTHERCAT /etc/sgml/sgml-docbook.cat; fi | |
97 | fi | |
98 | ||
99 | %changelog | |
100 | * Wed Jan 24 2001 Tim Waugh <twaugh@redhat.com> | |
101 | - Scripts require fileutils. | |
102 | - Make scripts quieter. | |
103 | ||
104 | * Mon Jan 15 2001 Tim Waugh <twaugh@redhat.com> | |
105 | - Don't play so many macro games. | |
106 | - Don't use 'rpm' in post scripts. | |
107 | - Make sure to own the sgml-dtd-3.0 directory. | |
108 | ||
109 | * Sun Jan 14 2001 Tim Waugh <twaugh@redhat.com> | |
110 | - Change requirement on /usr/bin/install-catalog to sgml-common. | |
111 | ||
112 | * Fri Jan 12 2001 Tim Waugh <twaugh@redhat.com> | |
113 | - Change Copyright: to License:. | |
114 | - Remove Packager: line. | |
115 | ||
116 | * Tue Jan 09 2001 Tim Waugh <twaugh@redhat.com> | |
117 | - Change group. | |
118 | - Use %%{_tmppath}. | |
119 | - rm before install. | |
120 | - openjade not jade. | |
121 | - Correct typo. | |
122 | - Build requires unzip. | |
123 | - Require install-catalog for post and postun. | |
124 | ||
125 | * Tue Jan 09 2001 Tim Waugh <twaugh@redhat.com> | |
126 | - Based on Eric Bischoff's new-trials packages. |