diff --git a/.cvsignore b/.cvsignore index e69de29..d58c68e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +xhtml1.tgz diff --git a/sources b/sources index e69de29..77ecf46 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +1fdad567eecb5deb8e32e3892cfe0074 xhtml1.tgz diff --git a/xhtml1-dtds.spec b/xhtml1-dtds.spec new file mode 100644 index 0000000..58b64de --- /dev/null +++ b/xhtml1-dtds.spec @@ -0,0 +1,130 @@ +Name: xhtml1-dtds +Version: 1.0 +Release: 5 +Group: Applications/Text + +Summary: XML document type definition for XHTML 1.0 + +License: W3C IPR +URL: http://www.w3.org/TR/xhtml1/ + +PreReq: fileutils +PreReq: libxml2 >= 2.4.8 +# xml-common for /etc/xml +PreReq: xml-common + +BuildRoot: %{_tmppath}/%{name}-%{version} + +BuildArch: noarch +Source0: http://www.w3.org/TR/xhtml1/xhtml1.tgz +BuildRequires: tar + +%description +This provides the DTDs of the Second Edition of XHTML 1.0, a reformulation +of HTML 4 as an XML 1.0 application, and three DTDs corresponding to the +ones defined by HTML 4. The semantics of the elements and their attributes +are defined in the W3C Recommendation for HTML 4. These semantics provide +the foundation for future extensibility of XHTML. + +%prep +%setup -c -T +tar xvzf %{SOURCE0} +if [ `id -u` -eq 0 ]; then + chown -R root.root . + chmod -R a+rX,g-w,o-w . +fi + + +%build + + +%install +rm -rf $RPM_BUILD_ROOT + +# XHTML 1.0 2nd edition +DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/xhtml1/xhtml1-20020801/DTD +mkdir -p $DESTDIR +install xhtml1-20020801/DTD/*.dtd $DESTDIR +install xhtml1-20020801/DTD/*.ent $DESTDIR + +## +## Create the XHTML1 XML catalog +## + +CATALOG=$RPM_BUILD_ROOT/usr/share/sgml/xhtml1/xmlcatalog + +/usr/bin/xmlcatalog --noout --create $CATALOG +/usr/bin/xmlcatalog --noout --add "public" \ + "-//W3C//DTD XHTML 1.0 Strict//EN" \ + "xhtml1-20020801/DTD/xhtml1-strict.dtd" $CATALOG +/usr/bin/xmlcatalog --noout --add "public" \ + "-//W3C//DTD XHTML 1.0 Transitional//EN" \ + "xhtml1-20020801/DTD/xhtml1-transitional.dtd" $CATALOG +/usr/bin/xmlcatalog --noout --add "public" \ + "-//W3C//DTD XHTML 1.0 Frameset//EN" \ + "xhtml1-20020801/DTD/xhtml1-frameset.dtd" $CATALOG +/usr/bin/xmlcatalog --noout --add "rewriteSystem" \ + "http://www.w3.org/TR/xhtml1/DTD" \ + "xhtml1-20020801/DTD" $CATALOG +/usr/bin/xmlcatalog --noout --add "rewriteURI" \ + "http://www.w3.org/TR/xhtml1/DTD" \ + "xhtml1-20020801/DTD" $CATALOG + +%files +%defattr (-,root,root) +/usr/share/sgml/xhtml1 + +%post +CATALOG=/usr/share/sgml/xhtml1/xmlcatalog +# +# Register it in the super catalog with the appropriate delegates +# +ROOTCATALOG=/etc/xml/catalog + +if [ ! -r $ROOTCATALOG ] +then + /usr/bin/xmlcatalog --noout --create $ROOTCATALOG +fi + +if [ -w $ROOTCATALOG ] +then + /usr/bin/xmlcatalog --noout --add "delegatePublic" \ + "-//W3C//DTD XHTML 1.0" \ + "file://$CATALOG" $ROOTCATALOG + /usr/bin/xmlcatalog --noout --add "delegateSystem" \ + "http://www.w3.org/TR/xhtml1/DTD" \ + "file://$CATALOG" $ROOTCATALOG + /usr/bin/xmlcatalog --noout --add "delegateURI" \ + "http://www.w3.org/TR/xhtml1/DTD" \ + "file://$CATALOG" $ROOTCATALOG +fi + +%postun +# +# On removal, unregister the xmlcatalog from the supercatalog +# +if [ "$1" = 0 ]; then + CATALOG=/usr/share/sgml/xhtml1/xmlcatalog + ROOTCATALOG=/etc/xml/catalog + + if [ -w $ROOTCATALOG ] + then + /usr/bin/xmlcatalog --noout --del \ + "-//W3C//DTD XHTML 1.0" $ROOTCATALOG + /usr/bin/xmlcatalog --noout --del \ + "http://www.w3.org/TR/xhtml1/DTD" $ROOTCATALOG + /usr/bin/xmlcatalog --noout --del \ + "http://www.w3.org/TR/xhtml1/DTD" $ROOTCATALOG + fi +fi + +%changelog +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Fri Dec 13 2002 Daniel Veillard 1.0-4 +Prepare for inclusion, Prereq xml-common, fix the uninstall +for upgrades of the package + +* Thu Dec 12 2002 Daniel Veillard 1.0-1 +Creation, based on Tim Waugh docbook-dtd package