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