Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
docbook-simple
docbook-simple.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File docbook-simple.spec of Package docbook-simple
# # spec file for package docbook-simple (Version 1.0) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: docbook-simple BuildRequires: sgml-skel unzip Summary: Simple DocBook DTD and Documentation Version: 1.0 Release: 309 Group: Productivity/Publishing/DocBook BuildArch: noarch Requires: sgml-skel libxml2 %define regcat /usr/bin/sgml-register-catalog PreReq: %{regcat} /usr/bin/xmlcatalog /usr/bin/edit-xml-catalog PreReq: sed grep awk #Provides: License: BSD 3-Clause; X11/MIT Url: http://www.oasis-open.org/docbook/xml/simple/ Source0: docbook-simple-1.0.zip Source1: CATALOG.docbook-simple-1.0 #Patch: BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This package contains the Simple DocBook DTD. Authors: -------- Norman Walsh <ndw@nwalsh.com> %define INSTALL install -m755 -s %define INSTALL_DIR install -d -m755 %define INSTALL_DATA install -m644 %define INSTALL_SCRIPT install -m755 -o root -g root %define sgml_dir %{_datadir}/sgml %define sgml_var_dir /var/lib/sgml %define sgml_mod_dir %{sgml_dir}/docbook %define sgml_mod_dtd_dir %{sgml_mod_dir}/dtd %define sgml_mod_custom_dir %{sgml_mod_dir}/custom %define sgml_mod_style_dir %{sgml_mod_dir}/stylesheet %define xml_dir %{_datadir}/xml %define xml_mod_dir %{xml_dir}/docbook/custom/simple/%{version} %define xml_mod_dtd_dir %{xml_mod_dir}/schema/dtd %define xml_mod_custom_dir %{xml_mod_dir}/custom %define xml_mod_style_dir %{xml_mod_dir}/stylesheet %define xml_mod_style_prod_dir %{xml_mod_style_dir} %define sgml_config_dir /var/lib/sgml %define sgml_sysconf_dir %{_sysconfdir}/sgml %define xml_config_dir /var/lib/xml %define xml_sysconf_dir %{_sysconfdir}/xml %prep echo $RPM_BUILD_ROOT %setup -c -T sed 's|@VERSION@|%{version}| s|@DIR@|%{xml_mod_dtd_dir}|' %{S:1} > CATALOG.%{name}-%{version} unzip -q -a %{S:0} find -type d | xargs chmod 755 find -type f | xargs chmod 644 %build # echo -ne 'PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.0//EN" "sdocbook.dtd"\n'\ # 'SYSTEM "http://www.oasis-open.org/docbook/xml/simple/1.0/sdocbook.dtd" "sdocbook.dtd"' >catalog # sed -e 's:\ \"\([-a-zA-Z0-9]*\.\(ent\|dtd\|dcl\|mod\)\)\"$: \"%{sgml_inst_dir}/\1\":g' \ # catalog > CATALOG.%{name}-%{version} xmlcatbin=/usr/bin/xmlcatalog CATALOG=docbook-simple.xml # etc/xml/%{name}.xml # create the catalogs root and docbook specific $xmlcatbin --noout --create $CATALOG $xmlcatbin --noout --add "public" \ "-//OASIS//DTD Simplified DocBook XML V1.0//EN" \ "file://%{xml_mod_dtd_dir}/sdocbook.dtd" $CATALOG $xmlcatbin --noout --add "system" \ "http://www.oasis-open.org/docbook/xml/simple/1.0/sdocbook.dtd" \ "file://%{xml_mod_dtd_dir}/sdocbook.dtd" $CATALOG %define FOR_ROOT_CAT for-catalog-%{name}-%{version}-%{release}.xml CATALOG=etc/xml/$CATALOG rm -f %{FOR_ROOT_CAT}.tmp $xmlcatbin --noout --create %{FOR_ROOT_CAT}.tmp $xmlcatbin --noout --add "delegateSystem" \ "http://www.oasis-open.org/docbook/xml/simple/" \ "file:///$CATALOG" %{FOR_ROOT_CAT}.tmp $xmlcatbin --noout --add "delegatePublic" \ "-//OASIS//DTD Simplified DocBook XML" \ "file:///$CATALOG" %{FOR_ROOT_CAT}.tmp # Create tag sed '/<catalog/a\ <group id="%{name}-%{version}-%{release}"> /<\/catalog/i\ </group>' \ %{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT} %install [ -z "$RPM_BUILD_ROOT" ] || { rm -fr $RPM_BUILD_ROOT %{INSTALL_DIR} $RPM_BUILD_ROOT } %{INSTALL_DIR} $RPM_BUILD_ROOT%{sgml_dir} \ $RPM_BUILD_ROOT%{xml_mod_dtd_dir} \ $RPM_BUILD_ROOT%{sgml_var_dir} \ $RPM_BUILD_ROOT%{_docdir}/%{name} cp -a [a-su-z][!C]* $RPM_BUILD_ROOT%{xml_mod_dtd_dir} %{INSTALL_DATA} CATALOG.* $RPM_BUILD_ROOT%{sgml_var_dir} # sgml2xmlcat.sh -i catalog -l -s %{buildroot}/usr/share/sgml \ # -p %{inst_name} pushd $RPM_BUILD_ROOT for c in var/lib/sgml/CATALOG.*; do rm -f %{buildroot}%{sgml_dir}/${c##*/} && ln -sf /$c %{buildroot}%{sgml_dir}/${c##*/} done popd # pushd $RPM_BUILD_ROOT%{sgml_dir} # for c in ../../../var/lib/sgml/CATALOG.*; do # rm -f ${c##*/} && ln -sf $c ${c##*/} # done # popd # sgml2xmlcat.sh -i CATALOG.%{name}-%{version} -c %{name}.xml cat_dir=%{buildroot}/etc/xml %{INSTALL_DIR} $cat_dir # %{INSTALL_DATA} %{name}.xml $RPM_BUILD_ROOT/etc/xml/%{name}.xml %{INSTALL_DATA} %{FOR_ROOT_CAT} %{name}.xml $cat_dir %define all_cat %{name}-%{version} %post if [ -x %{regcat} ]; then for c in %{all_cat}; do grep -q -e "%{sgml_dir}/CATALOG.$c\\>" /etc/sgml/catalog \ || %{regcat} -a %{sgml_dir}/CATALOG.$c >/dev/null 2>&1 done fi edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ --add /etc/xml/%{FOR_ROOT_CAT} %postun if [ "$1" = "0" -a -x %{regcat} ]; then for c in %{all_cat}; do %{regcat} -r %{sgml_dir}/CATALOG.$c >/dev/null 2>&1 done fi edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ --del %{name}-%{version}-%{release} exit 0 %clean rm -fr $RPM_BUILD_ROOT %files %defattr(-, root, root) # %doc copyright-software.html %config %{sgml_var_dir}/CATALOG.* %config %{_sysconfdir}/xml/%{name}.xml %config %{_sysconfdir}/xml/%{FOR_ROOT_CAT} %{sgml_dir}/CATALOG.* %{xml_mod_dtd_dir} %dir %{xml_dir}/docbook/custom %dir %{xml_dir}/docbook/custom/simple %dir %{xml_mod_dir} %dir %{xml_mod_dir}/schema %changelog * Thu Mar 29 2007 aj@suse.de - Add unzip as BuildRequires. * Fri Jan 12 2007 ke@suse.de - Remove /usr/share/xml from the files list. * Tue Aug 15 2006 ke@suse.de - Remove SuSEconfig calls. * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Fri Feb 13 2004 ke@suse.de - Adjust directories according to FHS 2.3: * Move files to /usr/share/xml/docbook/custom/simple. * Provide compatibility links for SL =< 9.0 (log this info in /var/adm/SuSEconfig/run-sgmldir-links for later processing). * Wed Feb 04 2004 hmacht@suse.de - added option # norootforbuild in specfile * Tue Jun 10 2003 coolo@suse.de - fix syntax error * Thu Jun 05 2003 ke@suse.de - Create absolute links. - Fix file list. * Fri May 23 2003 ke@suse.de - New package: version 1.0 (prepared by Thomas Schraitle).
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor