- epoch1
[packages/docbook-dtd42-xml.git] / docbook-dtd42-xml.spec
1
2 #
3 # todo:
4 # - use XML ISO entities from sgml-common
5 #
6
7 Summary:        XML/SGML DocBook DTD 4.2
8 Summary(pl):    XML/SGML DocBook DTD 4.2
9 %define ver     4.2
10 Name:           docbook-dtd42-xml
11 Version:        1.0
12 Release:        3
13 Epoch:          1
14 Vendor:         OASIS
15 License:        Free
16 Group:          Applications/Publishing/XML
17 URL:            http://www.oasis-open.org/docbook/
18 Source0:        http://www.oasis-open.org/docbook/xml/%{ver}/docbook-xml-%{ver}.zip
19 BuildRequires:  unzip
20 BuildRequires:  rpm-build >= 4.0.2-94
21 BuildRequires:  /usr/bin/xmlcatalog
22 PreReq:         libxml2
23 PreReq:         sgml-common
24 Requires(post,preun):   /usr/bin/install-catalog
25 Requires(post,preun):   /usr/bin/xmlcatalog
26 Requires:       libxml2-progs >= 2.4.17-6
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define dtd_path                %{_datadir}/sgml/docbook/xml-dtd-%{ver}
31 %define xmlcat_file             %{dtd_path}/catalog.xml
32 %define sgmlcat_file    %{dtd_path}/catalog
33
34 %description
35 DocBook is an XML/SGML vocabulary particularly well suited to books and papers
36 about computer hardware and software (though it is by no means limited to only
37 these applications).                 
38
39 %description -l pl
40 DocBook DTD jest zestawem definicji dokumentów XML/SGML przeznaczonych do
41 tworzenia dokumentacji technicznej. Stosowany jest do pisania podrêczników
42 systemowych, instrukcji jak i wielu innych ciekawych rzeczy.
43
44 %prep
45 %setup -q -c
46 chmod -R a+rX *
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT%{dtd_path}
51
52 install *.{xml,dtd,mod} $RPM_BUILD_ROOT%{dtd_path}
53 install *.ent $RPM_BUILD_ROOT%{dtd_path} || :
54 cp -a ent $RPM_BUILD_ROOT%{dtd_path}
55
56 %docbook_sgmlcat_fix $RPM_BUILD_ROOT%{sgmlcat_file} %{ver}
57
58 cat docbook.cat >> $RPM_BUILD_ROOT%{sgmlcat_file}
59
60 %xmlcat_add_rewrite \
61         http://www.oasis-open.org/docbook/xml/%{ver} \
62         file://%{dtd_path} \
63         $RPM_BUILD_ROOT%{xmlcat_file}
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
69 if ! grep -q /etc/sgml/xml-docbook-%{ver}.cat /etc/sgml/catalog ; then
70     %sgmlcat_add /etc/sgml/xml-docbook-%{ver}.cat %{sgmlcat_file}
71
72 fi
73 if ! grep -q %{xmlcat_file} /etc/xml/catalog ; then
74     %xmlcat_add %{xmlcat_file}
75
76 fi
77
78 %preun
79 if [ "$1" = "0" ] ; then
80     %sgmlcat_del /etc/sgml/xml-docbook-%{ver}.cat %{sgmlcat_file}
81
82     %xmlcat_del %{xmlcat_file}
83
84 fi
85
86 %files
87 %defattr(644,root,root,755)
88 %doc README ChangeLog
89 %{dtd_path}
This page took 0.088639 seconds and 3 git commands to generate.