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