2 # - maybe separate xhtml-modularization
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}
16 %define xhtmlver %{year}%{month}%{day}
17 %define modver 20081008
18 %define rubyver 20010531
20 Summary: XHTML %{v_er}
21 Summary(pl.UTF-8): XHTML %{v_er}
22 Name: xhtml-dtd%{ver}-xml
25 Group: Applications/Publishing/SGML
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
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
51 XHTML 1.1 specification (with DTD, needed to parse XHTML 1.1 code).
53 %description -l pl.UTF-8
54 Specyfikacja XHTML 1.1 (wraz z DTD, potrzebnym do sprawdzania
55 poprawnoĊci kodu XHTML 1.1).
58 %setup -q -a1 -n xhtml%{mver}-%{xhtmlver}
61 rm xhtml-modularization-%{modver}/DTD/VERSION
62 rm -r xhtml-modularization-%{modver}/DTD/{examples,templates}
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{dtddir},%{_sysconfdir}/sgml}
68 xmlcatalog --noout --create $RPM_BUILD_ROOT%{catalog}
69 xmlcatalog --noout --add rewriteSystem \
70 'http://www.w3.org/TR/xhtml11/DTD/' \
72 $RPM_BUILD_ROOT%{catalog}
73 xmlcatalog --noout --add rewriteSystem \
74 'http://www.w3.org/TR/xhtml-modularization/DTD/' \
76 $RPM_BUILD_ROOT%{catalog}
77 xmlcatalog --noout --add rewriteSystem \
78 'http://www.w3.org/TR/ruby/' \
80 $RPM_BUILD_ROOT%{catalog}
81 xmlcatalog --noout -add public \
82 '-//W3C//DTD XHTML 1.1//EN' \
84 $RPM_BUILD_ROOT%{catalog}
86 install DTD/* xhtml-modularization-%{modver}/DTD/* %{SOURCE2} \
87 $RPM_BUILD_ROOT%{dtddir}
89 touch $RPM_BUILD_ROOT%{ccatalog}
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
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
102 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
108 %{_datadir}/sgml/html/xml-dtd-%{v_er}