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