[521] | 1 | %define catalog_name %{name}-%{version}-%{release}.cat |
---|
| 2 | |
---|
| 3 | Name: xhtml-dtd10 |
---|
| 4 | Version: 1.0 |
---|
| 5 | Release: 2%{?_dist_release} |
---|
| 6 | Group: Applications/Text |
---|
| 7 | |
---|
| 8 | Summary: XML document type definition for XHTML 1.0 |
---|
| 9 | |
---|
| 10 | License: Distributable |
---|
| 11 | |
---|
| 12 | #Provides: html-dtd |
---|
| 13 | Requires: sgml-common >= 0.5 |
---|
| 14 | BuildRequires: unzip |
---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version} |
---|
| 16 | |
---|
| 17 | BuildArch: noarch |
---|
| 18 | Source0: http://www.w3.org/TR/xhtml1/xhtml1.zip |
---|
| 19 | Source1: http://www.w3.org/Consortium/Legal/copyright-documents-19990405.html |
---|
| 20 | Url: http://www.w3.org/TR/xhtml1/ |
---|
| 21 | |
---|
| 22 | %description |
---|
| 23 | XML document type definition for XHTML 1.0 |
---|
| 24 | |
---|
| 25 | %prep |
---|
| 26 | [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} |
---|
| 27 | rm -rf ${RPM_BUILD_DIR}/%{name}-%{version} |
---|
| 28 | |
---|
| 29 | %setup -c -T |
---|
| 30 | unzip %{SOURCE0} |
---|
| 31 | cp -a %{SOURCE1} . |
---|
| 32 | |
---|
| 33 | %build |
---|
| 34 | |
---|
| 35 | %install |
---|
| 36 | [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} |
---|
| 37 | [ "${RPM_BUILD_ROOT}" != "/" ] && \ |
---|
| 38 | mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0 |
---|
| 39 | |
---|
| 40 | pushd xhtml1/DTD |
---|
| 41 | install -m0644 *.ent ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0 |
---|
| 42 | install -m0644 *.dtd ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0 |
---|
| 43 | install -m0644 *.dcl ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0 |
---|
| 44 | install -m0644 *.soc ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0 |
---|
| 45 | ln -s xhtml.soc ${RPM_BUILD_ROOT}%{_datadir}/sgml/xhtml/xhtml-dtd-1.0/catalog |
---|
| 46 | popd |
---|
| 47 | |
---|
| 48 | %clean |
---|
| 49 | [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} |
---|
| 50 | rm -rf ${RPM_BUILD_DIR}/%{name}-%{version} |
---|
| 51 | |
---|
| 52 | %files |
---|
| 53 | %defattr (-,root,root) |
---|
| 54 | %doc copyright-documents-19990405.html xhtml1/*.* |
---|
| 55 | %{_datadir}/sgml/xhtml/xhtml-dtd-1.0 |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | %post |
---|
| 59 | # Update the centralized catalog corresponding to this version of the DTD |
---|
| 60 | /usr/bin/install-catalog --add /etc/sgml/%{catalog_name} %{_datadir}/sgml/xhtml/xhtml-dtd-1.0/catalog > /dev/null |
---|
| 61 | |
---|
| 62 | # Update the link to the current version of the DTD |
---|
| 63 | ln -s -f /etc/sgml/%{catalog_name} /etc/sgml/xhtml.cat |
---|
| 64 | |
---|
| 65 | %postun |
---|
| 66 | # Update the centralized catalog corresponding to this version of the DTD |
---|
| 67 | /usr/bin/install-catalog --remove /etc/sgml/%{catalog_name} %{_datadir}/sgml/xhtml/xhtml-dtd-1.0/catalog > /dev/null |
---|
| 68 | |
---|
| 69 | # Update the link to the current version of the DTD |
---|
| 70 | if [ ! -e /etc/sgml/%{catalog_name} ]; then |
---|
| 71 | rm -f /etc/sgml/xhtml.cat |
---|
| 72 | OTHERCAT=`ls /etc/sgml/xhtml-?.*.cat 2> /dev/null | head --lines 1` |
---|
| 73 | if [ -n "$OTHERCAT" ]; then ln -s $OTHERCAT /etc/sgml/xhtml.cat; fi |
---|
| 74 | fi |
---|
| 75 | |
---|
| 76 | %changelog |
---|
| 77 | * Wed Oct 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.0-2vl5 |
---|
| 78 | - applied new versioning policy |
---|
| 79 | |
---|
| 80 | * Mon Mar 24 2003 IWAI Masaharu <iwai@alib.jp> 1.0-1vl2 |
---|
| 81 | - rename catalog file |
---|
| 82 | |
---|
| 83 | * Sun Jan 6 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> |
---|
| 84 | - first release |
---|
| 85 | |
---|