- adapterized
[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
36 and papers about computer hardware and software (though it is by no
37 means limited to only these applications).
38
39 %description -l pl
40 DocBook DTD jest zestawem definicji dokumentów XML/SGML przeznaczonych
41 do tworzenia dokumentacji technicznej. Stosowany jest do pisania
42 podrêczników systemowych, instrukcji jak i wielu innych ciekawych
43 rzeczy.
44
45 %prep
46 %setup -q -c
47 chmod -R a+rX *
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT%{dtd_path}
52
53 install *.{xml,dtd,mod} $RPM_BUILD_ROOT%{dtd_path}
54 install *.ent $RPM_BUILD_ROOT%{dtd_path} || :
55 cp -a ent $RPM_BUILD_ROOT%{dtd_path}
56
57 %docbook_sgmlcat_fix $RPM_BUILD_ROOT%{sgmlcat_file} %{ver}
58
59 cat docbook.cat >> $RPM_BUILD_ROOT%{sgmlcat_file}
60
61 %xmlcat_add_rewrite \
62         http://www.oasis-open.org/docbook/xml/%{ver} \
63         file://%{dtd_path} \
64         $RPM_BUILD_ROOT%{xmlcat_file}
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 if ! grep -q /etc/sgml/xml-docbook-%{ver}.cat /etc/sgml/catalog ; then
71     %sgmlcat_add /etc/sgml/xml-docbook-%{ver}.cat %{sgmlcat_file}
72
73 fi
74 if ! grep -q %{xmlcat_file} /etc/xml/catalog ; then
75     %xmlcat_add %{xmlcat_file}
76
77 fi
78
79 %preun
80 if [ "$1" = "0" ] ; then
81     %sgmlcat_del /etc/sgml/xml-docbook-%{ver}.cat %{sgmlcat_file}
82
83     %xmlcat_del %{xmlcat_file}
84
85 fi
86
87 %files
88 %defattr(644,root,root,755)
89 %doc README ChangeLog
90 %{dtd_path}
This page took 0.12293 seconds and 3 git commands to generate.