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