- release 12.
[packages/docbook-dtd30-sgml.git] / docbook-dtd30-sgml.spec
1 Summary:        SGML document type definition for DocBook 3.0
2 Name:           docbook-dtd30-sgml
3 Version:        1.0
4 Release:        12
5 License:        Distributable
6 Group:          Applications/Text
7 Group(de):      Applikationen/Text
8 Group(pl):      Aplikacje/Tekst
9 Source0:        http://www.oasis-open.org/docbook/sgml/3.0/docbk30.zip
10 Source1:        %{name}-Makefile
11 Patch0:         %{name}-catalog.patch
12 URL:            http://www.oasis-open.org/docbook/
13 BuildRequires:  unzip
14 Requires:       sgml-common >= 0.5
15 Requires(post):         sgml-common >= 0.5
16 Requires(postun):       sgml-common >= 0.5
17 Requires:       fileutils
18 BuildArch:      noarch
19 Provides:       docbook-dtd-sgml
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 The DocBook Document Type Definition (DTD) describes the syntax of
24 technical documentation texts (articles, books and manual pages). This
25 syntax is SGML-compliant and is developed by the OASIS consortium.
26 This is the version 3.0 of this DTD.
27
28
29 %prep
30 %setup -q -c -T
31 unzip %{SOURCE0}
32 chmod -R a+rX,g-w,o-w .
33 cp %{SOURCE1} Makefile
34 %patch0 -p0
35
36 %install
37 rm -rf $RPM_BUILD_ROOT
38
39 %{__make} install DESTDIR=$RPM_BUILD_ROOT
40
41 gzip -9nf *.txt
42
43 %clean
44 rm -rf $DESTDIR
45
46 %files
47 %defattr(644,root,root,755)
48 %doc *.gz
49 %{_datadir}/sgml/docbook/sgml-dtd-3.0
50
51
52 %post
53 # Update the centralized catalog corresponding to this version of the DTD
54 /usr/bin/install-catalog --add /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null
55 /usr/bin/install-catalog --add /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/docbook/sgml-dtd-3.0/catalog > /dev/null
56
57 # The following lines are for the case in which the style sheets were
58 # installed after another DTD but before this DTD
59 STYLESHEETS=$(echo /usr/share/sgml/docbook/dsssl-stylesheets-*)
60 STYLESHEETS=${STYLESHEETS##*/dsssl-stylesheets-}
61 if [ "$STYLESHEETS" != "*" ]; then
62         /usr/bin/install-catalog --add /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/openjade-1.3/catalog > /dev/null
63         /usr/bin/install-catalog --add /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/docbook/dsssl-stylesheets-$STYLESHEETS/catalog > /dev/null
64 fi
65
66 # Update the link to the current version of the DTD
67 ln -sf /etc/sgml/sgml-docbook-3.0.cat /etc/sgml/sgml-docbook.cat
68
69 %postun
70 # Update the centralized catalog corresponding to this version of the DTD
71 /usr/bin/install-catalog --remove /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null
72 /usr/bin/install-catalog --remove /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/docbook/sgml-dtd-3.0/catalog > /dev/null
73
74 # The following lines are for the case in which the style sheets were
75 # not uninstalled because there is still another DTD
76 STYLESHEETS=$(echo /usr/share/sgml/docbook/dsssl-stylesheets-*)
77 STYLESHEETS=${STYLESHEETS##*/dsssl-stylesheets-}
78 if [ "$STYLESHEETS" != "*" ]; then
79         /usr/bin/install-catalog --remove /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/openjade-1.3/catalog > /dev/null
80         /usr/bin/install-catalog --remove /etc/sgml/sgml-docbook-3.0.cat /usr/share/sgml/docbook/dsssl-stylesheets-$STYLESHEETS/catalog > /dev/null
81 fi
82
83 # Update the link to the current version of the DTD
84 if [ ! -e /etc/sgml/sgml-docbook-3.0.cat ]; then
85         rm -f /etc/sgml/sgml-docbook.cat
86         OTHERCAT=`ls /etc/sgml/sgml-docbook-?.?.cat 2> /dev/null | head --lines 1`
87         if [ -n "$OTHERCAT" ]; then ln -s $OTHERCAT /etc/sgml/sgml-docbook.cat; fi
88 fi
This page took 0.374775 seconds and 4 git commands to generate.