9f2285
%global date    20020801
9f2285
9f2285
Name:           xhtml1-dtds
9f2285
Version:        1.0
9f2285
Release:        %{date}.11%{?dist}%{?extra_release}
9f2285
Summary:        XHTML 1.0 document type definitions
9f2285
9f2285
Group:          Applications/Text
9f2285
# W3C Software License for DTDs etc:
9f2285
# http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620#DTD
9f2285
License:        W3C
9f2285
URL:            http://www.w3.org/TR/2002/REC-xhtml1-%{date}/
9f2285
# Source0 generated with Source99, see comments in the script
9f2285
Source0:        %{name}-%{date}.tar.bz2
9f2285
Source1:        %{name}.catalog.xml
9f2285
Source99:       %{name}-prepare-tarball.sh
9f2285
Patch0:         %{name}-sgml-catalog.patch
9f2285
Patch1:         %{name}-sgml-dcl.patch
9f2285
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
9f2285
9f2285
BuildArch:      noarch
9f2285
BuildRequires:  libxml2 >= 2.4.8
9f2285
Requires:       libxml2 >= 2.4.8
9f2285
Requires:       xml-common
9f2285
Requires:       sgml-common
9f2285
Requires(post): /usr/bin/xmlcatalog
9f2285
Requires(preun): /usr/bin/xmlcatalog
9f2285
9f2285
%description
9f2285
This provides the DTDs of the Second Edition of XHTML 1.0, a reformulation
9f2285
of HTML 4 as an XML 1.0 application, and three DTDs corresponding to the
9f2285
ones defined by HTML 4. The semantics of the elements and their attributes
9f2285
are defined in the W3C Recommendation for HTML 4. These semantics provide
9f2285
the foundation for future extensibility of XHTML.
9f2285
9f2285
9f2285
%prep
9f2285
%setup -q -n xhtml1-20020801
9f2285
%patch0 -p0
9f2285
%patch1 -p1
9f2285
cp -p %{SOURCE1} DTD/catalog.xml
9f2285
9f2285
9f2285
%build
9f2285
9f2285
9f2285
%install
9f2285
rm -rf $RPM_BUILD_ROOT
9f2285
9f2285
# Note: documentation is not shipped; the W3C Documentation License is not an
9f2285
# acceptable one per Fedora licensing guidelines.
9f2285
9f2285
mkdir -p $RPM_BUILD_ROOT%{_datadir}/xml/xhtml/1.0
9f2285
cp -p DTD/* $RPM_BUILD_ROOT%{_datadir}/xml/xhtml/1.0
9f2285
9f2285
# XML catalog:
9f2285
9f2285
xpkg() {
9f2285
  xmlcatalog --noout --add "$1" "$2" \
9f2285
    file://%{_datadir}/xml/xhtml/1.0/catalog.xml \
9f2285
    $RPM_BUILD_ROOT%{_sysconfdir}/xml/%{name}-%{version}-%{release}.xml
9f2285
}
9f2285
9f2285
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xml
9f2285
xmlcatalog --noout --create \
9f2285
  $RPM_BUILD_ROOT%{_sysconfdir}/xml/%{name}-%{version}-%{release}.xml
9f2285
xpkg delegatePublic "-//W3C//DTD XHTML 1.0 "
9f2285
xpkg delegatePublic "-//W3C//ENTITIES Latin 1 for XHTML"
9f2285
xpkg delegatePublic "-//W3C//ENTITIES Special for XHTML"
9f2285
xpkg delegatePublic "-//W3C//ENTITIES Symbols for XHTML"
9f2285
for i in xhtml1 2002/REC-xhtml1-%{date} ; do
9f2285
  xpkg delegateSystem http://www.w3.org/TR/$i/DTD/
9f2285
  xpkg delegateURI http://www.w3.org/TR/$i/DTD/
9f2285
done
9f2285
ln -s %{name}-%{version}-%{release}.xml \
9f2285
  $RPM_BUILD_ROOT%{_sysconfdir}/xml/%{name}.xml
9f2285
9f2285
# SGML catalog:
9f2285
9f2285
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml
9f2285
cd $RPM_BUILD_ROOT%{_sysconfdir}/sgml
9f2285
touch %{name}-%{version}-%{release}.soc
9f2285
ln -s %{name}-%{version}-%{release}.soc %{name}.soc
9f2285
cd -
9f2285
9f2285
9f2285
%clean
9f2285
rm -rf $RPM_BUILD_ROOT
9f2285
9f2285
9f2285
%post
9f2285
cd %{_sysconfdir}/xml
9f2285
[ -e catalog ] || /usr/bin/xmlcatalog --noout --create catalog
9f2285
/usr/bin/xmlcatalog --noout --add \
9f2285
    nextCatalog %{name}-%{version}-%{release}.xml "" catalog >/dev/null
9f2285
cd - >/dev/null
9f2285
/usr/bin/xmlcatalog --sgml --noout --add \
9f2285
    %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc \
9f2285
    %{_datadir}/xml/xhtml/1.0/xhtml.soc >/dev/null
9f2285
:
9f2285
9f2285
%preun
9f2285
/usr/bin/xmlcatalog --noout --del \
9f2285
    %{name}-%{version}-%{release}.xml \
9f2285
    %{_sysconfdir}/xml/catalog >/dev/null
9f2285
/usr/bin/xmlcatalog --sgml --noout --del \
9f2285
    %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc \
9f2285
    %{_datadir}/xml/xhtml/1.0/xhtml.soc >/dev/null
9f2285
:
9f2285
9f2285
9f2285
%files
9f2285
%defattr(644,root,root,755)
9f2285
%ghost %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc
9f2285
%{_sysconfdir}/sgml/%{name}.soc
9f2285
%{_sysconfdir}/xml/%{name}*.xml
9f2285
%{_datadir}/xml/xhtml/
9f2285
9f2285
9f2285
%changelog
9f2285
* Tue Jul 15 2014 Daniel Veillard <veillard@redhat.com> - 1.0-20020801.11
9f2285
- adding %{dist} to Release to avoid dist tag conflicts (rhbz#1028577)
9f2285
9f2285
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0-20020801.10
9f2285
- Mass rebuild 2013-12-27
9f2285
9f2285
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.9
9f2285
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9f2285
9f2285
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.8
9f2285
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9f2285
9f2285
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.7
9f2285
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9f2285
9f2285
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.6
9f2285
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9f2285
9f2285
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.5
9f2285
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
9f2285
9f2285
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-20020801.4
9f2285
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9f2285
9f2285
* Fri Feb 20 2009 Ville Skyttä <ville.skytta at iki.fi> - 1.0-20020801.3
9f2285
- Prune nondistributable content from source tarball.
9f2285
9f2285
* Fri Dec 12 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.0-20020801.2
9f2285
- Drop no longer needed upgrade quirks.
9f2285
9f2285
* Thu Feb 28 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.0-20020801.1
9f2285
- Major spec file rewrite (#226559), most visible changes:
9f2285
- Various XML cataloguing improvements.
9f2285
- Register to SGML catalogs in addition to XML.
9f2285
- Install to %%{_datadir}/xml per the FHS.
9f2285
- Sync with Fedora packaging guidelines.
9f2285
- Silence post-install scriptlet.
9f2285
9f2285
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0-7.1.1
9f2285
- rebuild
9f2285
9f2285
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
9f2285
- rebuilt
9f2285
9f2285
* Wed Jun  2 2004 Daniel Veillard <veillard@redhat.com> 1.0-7
9f2285
- add BuildRequires: libxml2, fixes 125030
9f2285
9f2285
* Mon Feb 23 2004 Tim Waugh <twaugh@redhat.com>
9f2285
- Use ':' instead of '.' as separator for chown.
9f2285
9f2285
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
9f2285
- rebuilt
9f2285
9f2285
* Tue Oct 21 2003 Florian La Roche <Florian.LaRoche@redhat.de>
9f2285
- add %%clean specfile target
9f2285
9f2285
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
9f2285
- rebuilt
9f2285
9f2285
* Fri Dec 13 2002 Daniel Veillard <veillard@redhat.com> 1.0-4
9f2285
- Prepare for inclusion, Prereq xml-common, fix the uninstall
9f2285
  for upgrades of the package
9f2285
9f2285
* Thu Dec 12 2002 Daniel Veillard <veillard@redhat.com> 1.0-1
9f2285
- Creation, based on Tim Waugh docbook-dtd package