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