]> git.pld-linux.org Git - packages/docbook-dtd412-xml.git/blob - docbook-dtd412-xml.spec
f124003849091f45742e4c1529a45d131991ca28
[packages/docbook-dtd412-xml.git] / docbook-dtd412-xml.spec
1 # TODO:
2 # - use XML ISO entities from sgml-common
3 %define ver     4.1.2
4 %define sver    412
5 Summary:        XML/SGML DocBook DTD 4.1.2
6 Summary(pl.UTF-8):      XML/SGML DocBook DTD 4.1.2
7 Name:           docbook-dtd%{sver}-xml
8 Version:        1.0
9 Release:        14
10 License:        Free
11 Group:          Applications/Publishing/XML
12 Source0:        http://www.oasis-open.org/docbook/xml/%{ver}/docbkx%{sver}.zip
13 # Source0-md5:  0d5a4a999a2d7b2e77a46bd069301caf
14 URL:            http://www.oasis-open.org/docbook/
15 BuildRequires:  libxml2-progs
16 BuildRequires:  rpm-build >= 4.0.2-94
17 BuildRequires:  unzip
18 Requires(post,preun):   /usr/bin/install-catalog
19 Requires(post,preun):   /usr/bin/xmlcatalog
20 Requires:       libxml2-progs >= 2.4.17-6
21 Requires:       sgml-common
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define dtd_path                %{_datadir}/sgml/docbook/xml-dtd-%{ver}
26 %define xmlcat_file             %{dtd_path}/catalog.xml
27 %define sgmlcat_file            %{dtd_path}/catalog
28
29 %description
30 DocBook is an XML/SGML vocabulary particularly well suited to books
31 and papers about computer hardware and software (though it is by no
32 means limited to only these applications).
33
34 %description -l pl.UTF-8
35 DocBook DTD jest zestawem definicji dokumentów XML/SGML przeznaczonych
36 do tworzenia dokumentacji technicznej. Stosowany jest do pisania
37 podręczników systemowych, instrukcji jak i wielu innych ciekawych
38 rzeczy.
39
40 %prep
41 %setup -q -c
42 chmod -R a+rX *
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT%{dtd_path}
47
48 install *.{dtd,mod} $RPM_BUILD_ROOT%{dtd_path}
49 cp -a ent $RPM_BUILD_ROOT%{dtd_path}
50
51 %docbook_sgmlcat_fix $RPM_BUILD_ROOT%{sgmlcat_file} %{ver}
52
53 grep -v 'ISO ' docbook.cat >> $RPM_BUILD_ROOT%{sgmlcat_file}
54
55 %xmlcat_create $RPM_BUILD_ROOT%{xmlcat_file}
56
57 %xmlcat_add_rewrite \
58         http://www.oasis-open.org/docbook/xml/%{ver} \
59         file://%{dtd_path} \
60         $RPM_BUILD_ROOT%{xmlcat_file}
61
62 grep PUBLIC docbook.cat|grep -v ISO | \
63 sed 's/^/xmlcatalog --noout --add /;s/PUBLIC/public/;s=$= '$RPM_BUILD_ROOT'/%{xmlcat_file}=' | sh
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 %{dtd_path}/catalog.xml /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 *.txt ChangeLog
89 %{dtd_path}
This page took 0.053338 seconds and 2 git commands to generate.