]> git.pld-linux.org Git - SPECS.git/blob - xhtml-dtd11-xml.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / xhtml-dtd11-xml.spec
1 # TODO:
2 # - maybe separate xhtml-modularization
3 %define         major   1
4 %define         minor   1
5 %define         micro   %{nil}
6 %define         type    REC
7 %define         year    2001
8 %define         month   05
9 %define         day     31
10
11 %define         mver    %{major}%{minor}
12 %define         ver     %{major}%{minor}%{micro}
13 %define         v_er    %{major}.%{minor}%{micro}
14 %define         v__er   %{major}\.%{minor}%{micro}
15
16 %define         xhtmlver        %{year}%{month}%{day}
17 %define         modver  20081008
18 %define         rubyver 20010531
19
20 Summary:        XHTML %{v_er}
21 Summary(pl.UTF-8):      XHTML %{v_er}
22 Name:           xhtml-dtd%{ver}-xml
23 Version:        %{xhtmlver}
24 Release:        1
25 Group:          Applications/Publishing/SGML
26 License:        W3C
27 Vendor:         W3C
28 Source0:        http://www.w3.org/TR/%{year}/%{type}-xhtml%{mver}-%{xhtmlver}/xhtml%{mver}.tgz
29 # Source0-md5:  00c3fe896f3d29419dbda4186aa98fe1
30 Source1:        http://www.w3.org/TR/2008/REC-xhtml-modularization-%{modver}/xhtml-modularization.tgz
31 # Source1-md5:  404429a5aae9c60382569d4d1b67acc0
32 Source2:        http://www.w3.org/TR/2001/REC-ruby-%{rubyver}/xhtml-ruby-1.mod
33 # Source2-md5:  0ea30a78a115139d3dde421227a54b24
34 URL:            http://www.w3.org/TR/xhtml11/
35 BuildRequires:  libxml2-progs
36 Requires(post): /usr/bin/xmlcatalog
37 Requires(post): sgml-common >= 0.5
38 Requires(preun):        /usr/bin/xmlcatalog
39 Requires(preun):        sgml-common >= 0.5
40 Requires:       sgml-common >= 0.6.3-5
41 Requires:       sgmlparser
42 AutoReqProv:    no
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         dtddir          %{_datadir}/sgml/html/xml-dtd-%{v_er}
47 %define         catalog         %{dtddir}/xmlcatalog-%{v_er}-%{version}-%{release}
48 %define         ccatalog        %{_sysconfdir}/sgml/xhtml-%{v_er}-%{version}-%{release}.cat
49
50 %description
51 XHTML 1.1 specification (with DTD, needed to parse XHTML 1.1 code).
52
53 %description -l pl.UTF-8
54 Specyfikacja XHTML 1.1 (wraz z DTD, potrzebnym do sprawdzania
55 poprawnoĊ›ci kodu XHTML 1.1).
56
57 %prep
58 %setup -q -a1 -n xhtml%{mver}-%{xhtmlver}
59 rm DTD/VERSION
60 rm DTD/xml*.dcl
61 rm xhtml-modularization-%{modver}/DTD/VERSION
62 rm -r xhtml-modularization-%{modver}/DTD/{examples,templates}
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{dtddir},%{_sysconfdir}/sgml}
67
68 xmlcatalog --noout --create $RPM_BUILD_ROOT%{catalog}
69 xmlcatalog --noout --add rewriteSystem \
70         'http://www.w3.org/TR/xhtml11/DTD/' \
71         '%{dtddir}/' \
72         $RPM_BUILD_ROOT%{catalog}
73 xmlcatalog --noout --add rewriteSystem \
74         'http://www.w3.org/TR/xhtml-modularization/DTD/' \
75         '%{dtddir}/' \
76         $RPM_BUILD_ROOT%{catalog}
77 xmlcatalog --noout --add rewriteSystem \
78         'http://www.w3.org/TR/ruby/' \
79         '%{dtddir}/' \
80         $RPM_BUILD_ROOT%{catalog}
81 xmlcatalog --noout -add public \
82         '-//W3C//DTD XHTML 1.1//EN' \
83         'xhtml11.dtd' \
84         $RPM_BUILD_ROOT%{catalog}
85
86 install DTD/* xhtml-modularization-%{modver}/DTD/* %{SOURCE2} \
87         $RPM_BUILD_ROOT%{dtddir}
88
89 touch $RPM_BUILD_ROOT%{ccatalog}
90
91 %post
92 %{_bindir}/install-catalog --add %{ccatalog} %{dtddir}/xhtml11.cat > /dev/null
93 %{_bindir}/install-catalog --add %{ccatalog} %{dtddir}/xhtml.cat > /dev/null
94 %{_bindir}/xmlcatalog --noout --add nextCatalog xhtml %{catalog} %{_sysconfdir}/xml/catalog
95
96 %preun
97 %{_bindir}/install-catalog --remove %{ccatalog} %{dtddir}/xhtml11.cat > /dev/null
98 %{_bindir}/install-catalog --remove %{ccatalog} %{dtddir}/xhtml.cat > /dev/null
99 %{_bindir}/xmlcatalog --noout --del %{catalog} %{_sysconfdir}/xml/catalog
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %files
105 %defattr(644,root,root,755)
106 %doc xhtml11.pdf
107 %ghost %{ccatalog}
108 %{_datadir}/sgml/html/xml-dtd-%{v_er}
This page took 0.411359 seconds and 3 git commands to generate.