# # spec file for package docbook2x # # Copyright (c) 2017 SUSE LINUX 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/ # Name: docbook2x BuildRequires: automake BuildRequires: docbook_4 BuildRequires: libxslt-devel %if 0%{?suse_version} >= 1200 BuildRequires: makeinfo %endif BuildRequires: openjade BuildRequires: perl-XML-DOM BuildRequires: perl-XML-Parser BuildRequires: perl-XML-SAX BuildRequires: perl-libwww-perl BuildRequires: sgml-skel BuildRequires: tidy Url: http://docbook2x.sourceforge.net/ Provides: db2x Provides: docbook2X Requires: docbook_4 Requires: openjade Requires: opensp Requires: perl-URI Requires: perl-XML-DOM Requires: perl-XML-Parser Requires: perl-XML-RegExp Requires: perl-XML-SAX Requires: perl-libwww-perl Requires: sgml-skel Requires: tidy %define regcat /usr/bin/sgml-register-catalog PreReq: %{regcat} /usr/bin/xmlcatalog /usr/bin/edit-xml-catalog PreReq: sed grep awk Obsoletes: db2x Summary: DocBook-to-Texinfo Converter License: GPL-2.0+ Group: Productivity/Publishing/DocBook Version: 0.8.8 Release: 126.3 Source: http://downloads.sourceforge.net/docbook2x/docbook2X-%{version}.tar.bz2 #Source: http://ftp1.sourceforge.net/sourceforge/docbook2x/docbook2X-%%{version}.tar.gz Source1: docbook2x-README.SUSE Patch: docbook2X-0.8.8-catalog.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A new tool based on Perl modules. %package doc Summary: DocBook-to-Texinfo Converter Group: Productivity/Publishing/DocBook PreReq: %install_info_prereq %description doc A new tool based on Perl modules. %define INSTALL install -m755 -s %define INSTALL_SCRIPT install -m755 %define INSTALL_DIR install -d -m755 %define INSTALL_DATA install -m644 %prep #echo %%{_docdir} #echo %%{_defaultdocdir} %setup -q -n docbook2X-%{version} cp %{S:1} README.SUSE %patch -p 1 %define perl_site %(TMP=%{perl_sitearch}; echo ${TMP%/*}) %build autoreconf --force --install %configure --with-xmldecl=/usr/share/sgml/opensp/xml.dcl sed -i.bak 's/${prefix}/\/usr/' perl/config.pl # exit 1 make htmldir=%{_docdir}/%{name}/html %{?_smp_mflags} %define FOR_ROOT_CAT for-catalog-%{name}-%{version}.xml xmlcatbin=/usr/bin/xmlcatalog CATALOG=usr/share/docbook2X/dtd/catalog.xml rm -f %{FOR_ROOT_CAT}.tmp $xmlcatbin --noout --create %{FOR_ROOT_CAT}.tmp $xmlcatbin --noout --add "delegateSystem" \ "http://docbook2x.sf.net/latest/" \ "file:///$CATALOG" %{FOR_ROOT_CAT}.tmp # Create tag sed '/ /<\/catalog/i\ ' \ %{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT} %install make install DESTDIR=$RPM_BUILD_ROOT \ nsgmls_xmldecl=/usr/share/sgml/opensp/xml.dcl \ htmldir=%{_docdir}/%{name}/html install -m644 AUTHORS COPYING NEWS README README.SUSE \ $RPM_BUILD_ROOT%{_docdir}/%{name} rm -f $RPM_BUILD_ROOT/%{_infodir}/dir mv $RPM_BUILD_ROOT%{_mandir}/man1/docbook2man.1 \ $RPM_BUILD_ROOT%{_mandir}/man1/docbook-to-man.1 mv $RPM_BUILD_ROOT%{_mandir}/man1/docbook2texi.1 \ $RPM_BUILD_ROOT%{_mandir}/man1/docbook-to-texi.1 mv $RPM_BUILD_ROOT%{_bindir}/docbook2man \ $RPM_BUILD_ROOT%{_bindir}/docbook-to-man mv $RPM_BUILD_ROOT%{_bindir}/docbook2texi \ $RPM_BUILD_ROOT%{_bindir}/docbook-to-texi %perl_process_packlist cat_dir=%{buildroot}/etc/xml %{INSTALL_DIR} $cat_dir %{INSTALL_DATA} %{FOR_ROOT_CAT} $cat_dir %define all_cat %{name}-%{version} %define info_files docbook2texi-xslt docbook2man-xslt docbook2X %post edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ --add /etc/xml/%{FOR_ROOT_CAT} %postun # remove entries only on removal of file if [ ! -f %{_sysconfdir}/xml/%{FOR_ROOT_CAT} -a -x /usr/bin/edit-xml-catalog ] ; then edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \ --del %{name}-%{version} fi exit 0 %post doc for f in %{info_files}; do %install_info --info-dir=%{_infodir} %{_infodir}/${f}.info.gz done %preun doc for f in %{info_files}; do %install_info_delete --info-dir=%{_infodir} %{_infodir}/${f}.info.gz done %files %defattr(-, root, root) %config %{_sysconfdir}/xml/%{FOR_ROOT_CAT} %{_bindir}/* %{_datadir}/docbook2X %files doc %defattr(-, root, root) %{_docdir}/%{name} %{_infodir}/* %{_mandir}/*/* %changelog * Thu Nov 9 2017 dimstar@opensuse.org - Rename README.SuSE to README.SUSE, adhering to the correct spelling. - Fix postun scriptlet: the variable %%{xml_sysconf_dir} is undefined and thus put into the postun scriptlet unexpanded. - Fix rpmlint warnings about %% in comments: macros are still expanded in comments. Some macros are multiline, which could impact the build directly. Escape the percent sign. * Tue Feb 10 2015 coolo@suse.com - move install_info from %%postun to %%preun and don't reference the extension twice * Mon Aug 12 2013 stephan.barth@suse.com - add BuildRequires for makeinfo (bnc#834457) * Thu Dec 1 2011 coolo@suse.com - add automake as buildrequire to avoid implicit dependency * Sun Sep 18 2011 jengelh@medozas.de - Remove redundant tags/sections from specfile (cf. packaging guidelines) - Use %%_smp_mflags for parallel build * Thu Dec 24 2009 aj@suse.de - Only remove file from catalog if it disappeared. - Do not use release numbers, they're not needed anymore. * Wed Mar 18 2009 ke@suse.de - Also Require docbook_4; reported by Jan Engelhardt bnc#486343. * Tue Feb 19 2008 ke@suse.de - Fix filename configuration issue; reported by Carlos Robinson; Novell bugzilla #360447. - Create doc sub-package. - spec file cleanup. * Mon Jul 2 2007 ke@suse.de - Version 0.8.8: Bug fixes, better rendering of the man page output (tables are now supported). - Stop shipping obsolete patches (gcc3.diff, docbook2x-0.8.2-perlsax.patch, and docbook2X-0.8.2-retval.diff, makefile-pl.patch). - spec file cleanup. - Register cataolg file; reported by Richard Guenther [#287864]. * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Wed Nov 2 2005 dmueller@suse.de - don't build as root * Mon Aug 16 2004 ke@suse.de - To avoid file conflicts with docbook-utils install manpages as docbook-to-man.1 and docbook2texi.1; reported by Thorsten Kukuk. * Fri Aug 13 2004 ke@suse.de - Update to version 0.8.5; bugfixes: * Generate Info directory information correctly. * Fix UTF-8 translation with &db2x_manxml;. * Tue Aug 10 2004 ke@suse.de - Update to version 0.8.4. - Install documentation. * Fri Jul 30 2004 ke@suse.de - Update to version 0.8.3: switch to XML-SAX. - Adjust neededforbuild and Requires on account of XML-SAX. * Sun Apr 25 2004 ro@suse.de - add missing return value * Thu Feb 19 2004 ke@suse.de - Rename docbook2man and docbook2texi to docbook-to-man and docbook-to-texi to avoid a filename conflict with the docbook-utils package. * Tue Feb 17 2004 ke@suse.de - Update to version 0.8.2. - Enable BuildRoot. - Add to neededforbuild: perl-libxml-perl perl-XML-Parser perl-XML-DOM perl-XML-RegExp expat perl-libwww-perl perl-URI docbook_4 sgml-skel. - Adjust gcc3.diff. - Disable doc dir for the moment. * Wed Dec 4 2002 ke@suse.de - Don't install docbook2manxml; it isn't compatible with current Perl modules; [# 21853]. * Mon Nov 11 2002 ro@suse.de - update Requires * Mon Nov 11 2002 ro@suse.de - changed neededforbuild to - changed neededforbuild to * Wed Mar 13 2002 sf@suse.de - corrected error for all 64-bit archs and gcc3 * Tue Nov 20 2001 ke@suse.de - Update to version 0.7.0. - Rename db2x -> docbook2x. - Drop obsolete .test file. - Fix "Requires:". * Mon Aug 13 2001 ro@suse.de - changed neededforbuild to * Thu Aug 2 2001 ke@suse.de - Update to version 0.6.9. - More specfile cleanup: Install data files [#4140]. * Fri Nov 17 2000 ke@suse.de - Update to version 0.6.0 (# 4140). - Cleanup spec file. * Tue Aug 15 2000 ke@suse.de - Install Map.pm (start to resolve bug # 3760). * Mon Jan 10 2000 ke@suse.de - Update: version 0.5.1 (sic!, the previous version number was wrongly taken from a component of the package). * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Wed Aug 4 1999 ke@suse.de - New package: version 1.4.