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