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