]> git.pld-linux.org Git - packages/docbook-dtd30-sgml.git/blame - docbook-dtd30-sgml.spec
- release 12.
[packages/docbook-dtd30-sgml.git] / docbook-dtd30-sgml.spec
CommitLineData
cf82bcf4 1Summary: SGML document type definition for DocBook 3.0
2Name: docbook-dtd30-sgml
3Version: 1.0
f67891e9 4Release: 12
cf82bcf4 5License: Distributable
6Group: Applications/Text
7Group(de): Applikationen/Text
8Group(pl): Aplikacje/Tekst
9Source0: http://www.oasis-open.org/docbook/sgml/3.0/docbk30.zip
10Source1: %{name}-Makefile
11Patch0: %{name}-catalog.patch
12URL: http://www.oasis-open.org/docbook/
13BuildRequires: unzip
14Requires: sgml-common >= 0.5
15Requires(post): sgml-common >= 0.5
16Requires(postun): sgml-common >= 0.5
17Requires: fileutils
18BuildArch: noarch
19Provides: docbook-dtd-sgml
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
a94d254a 21
22%description
23The DocBook Document Type Definition (DTD) describes the syntax of
cf82bcf4 24technical documentation texts (articles, books and manual pages). This
25syntax is SGML-compliant and is developed by the OASIS consortium.
a94d254a 26This is the version 3.0 of this DTD.
27
28
29%prep
cf82bcf4 30%setup -q -c -T
a94d254a 31unzip %{SOURCE0}
cf82bcf4 32chmod -R a+rX,g-w,o-w .
a94d254a 33cp %{SOURCE1} Makefile
cf20f4c5 34%patch0 -p0
a94d254a 35
36%install
cf82bcf4 37rm -rf $RPM_BUILD_ROOT
a94d254a 38
cf82bcf4 39%{__make} install DESTDIR=$RPM_BUILD_ROOT
40
41gzip -9nf *.txt
a94d254a 42
43%clean
a94d254a 44rm -rf $DESTDIR
45
a94d254a 46%files
cf82bcf4 47%defattr(644,root,root,755)
48%doc *.gz
49%{_datadir}/sgml/docbook/sgml-dtd-3.0
a94d254a 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
59STYLESHEETS=$(echo /usr/share/sgml/docbook/dsssl-stylesheets-*)
60STYLESHEETS=${STYLESHEETS##*/dsssl-stylesheets-}
61if [ "$STYLESHEETS" != "*" ]; then
cf82bcf4 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
a94d254a 64fi
65
66# Update the link to the current version of the DTD
cf82bcf4 67ln -sf /etc/sgml/sgml-docbook-3.0.cat /etc/sgml/sgml-docbook.cat
a94d254a 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
76STYLESHEETS=$(echo /usr/share/sgml/docbook/dsssl-stylesheets-*)
77STYLESHEETS=${STYLESHEETS##*/dsssl-stylesheets-}
78if [ "$STYLESHEETS" != "*" ]; then
cf82bcf4 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
a94d254a 81fi
82
83# Update the link to the current version of the DTD
84if [ ! -e /etc/sgml/sgml-docbook-3.0.cat ]; then
cf82bcf4 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
a94d254a 88fi
This page took 0.038474 seconds and 4 git commands to generate.