Name: rss-dtd091
Version: 1.0
Release: 2%{?_dist_release}
Group: Applications/Text

Summary: XML document type definition for RSS 0.91

License: Distributable

#Provides: html-dtd
Requires: sgml-common >= 0.5 fileutils

BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildArch: noarch
Source0: http://my.netscape.com/publish/formats/rss-0.91.dtd
Source1: rss091.cat
Url: http://my.netscape.com/publish/formats/rss-spec-0.91.html

%description
This is RSS 0.91 DTD.


%prep
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
rm -rf ${RPM_BUILD_DIR}/%{name}-%{version}

%setup -c -T -n %{name}-%{version}
cp %{SOURCE0} .

%build


%install
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
[ "${RPM_BUILD_ROOT}" != "/" ] && \
            mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/sgml/rss/rss-dtd-0.91

install -m0644 %{SOURCE0} ${RPM_BUILD_ROOT}%{_datadir}/sgml/rss/rss-dtd-0.91
install -m0644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/sgml/rss/rss-dtd-0.91
ln -s  rss091.cat ${RPM_BUILD_ROOT}%{_datadir}/sgml/rss/rss-dtd-0.91/catalog

%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
rm -rf ${RPM_BUILD_DIR}/%{name}-%{version}

%files
%defattr (-,root,root)
%{_datadir}/sgml/rss/rss-dtd-0.91


%post
# Update the centralized catalog corresponding to this version of the DTD
/usr/bin/install-catalog --add /etc/sgml/rss-0.91.cat %{_datadir}/sgml/rss/rss-dtd-0.91/catalog > /dev/null

# Update the link to the current version of the DTD
ln -s -f /etc/sgml/rss-0.91.cat /etc/sgml/rss.cat

%postun
# Update the centralized catalog corresponding to this version of the DTD
/usr/bin/install-catalog --remove /etc/sgml/rss-0.91.cat %{_datadir}/sgml/rss/rss-dtd-0.91/catalog > /dev/null

# Update the link to the current version of the DTD
if [ ! -e /etc/sgml/rss-0.91.cat ]; then
    rm -f /etc/sgml/rss.cat
    OTHERCAT=`ls /etc/sgml/rss-?.*.cat 2> /dev/null | head --lines 1`
    if [ -n "$OTHERCAT" ]; then ln -s $OTHERCAT /etc/sgml/rss.cat; fi
fi

%changelog
* Fri Oct 10 2008 Shu KONNO <owa@bg.wakwak.com> 1.0-1vl5
- applied new versioning policy, spec in utf-8

* Thu Jan  3 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.0-0vl1
- first release

