38f0c6
%{!?python3_sitelib: %define python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
38f0c6
38f0c6
Name:       dblatex
38f0c6
Version:    0.3.10
38f0c6
Release:    8%{?dist}
38f0c6
Summary:    DocBook to LaTeX/ConTeXt Publishing
38f0c6
BuildArch:  noarch
38f0c6
# Most of package is GPLv2+, except:
38f0c6
# xsl/ directory is DMIT
38f0c6
# lib/dbtexmf/core/sgmlent.txt is Public Domain
38f0c6
# latex/misc/enumitem.sty, multirow2.sry and ragged2e.sty are LPPL
38f0c6
# latex/misc/lastpage.sty is GPLv2 (no +)
38f0c6
# latex/misc/passivetex is MIT (not included in binary RPM so not listed)
38f0c6
License:    GPLv2+ and GPLv2 and LPPL and DMIT and Public Domain
38f0c6
URL:        http://dblatex.sourceforge.net/
38f0c6
Source0:    http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
38f0c6
# Source1 is from http://docbook.sourceforge.net/release/xsl/current/COPYING
38f0c6
Source1:    COPYING-docbook-xsl
38f0c6
Patch0:     dblatex-0.3.10-enable-python3.patch
38f0c6
Patch1:     dblatex-0.3.10-disable-debian.patch
38f0c6
Patch2:     dblatex-0.3.10-use-shutil-which.patch
38f0c6
Patch3:     dblatex-0.3.10-fix-shebangs.patch
38f0c6
38f0c6
BuildRequires:  python3-devel
38f0c6
BuildRequires:  libxslt
38f0c6
BuildRequires:  texlive-base
38f0c6
BuildRequires:  texlive-collection-latex
38f0c6
BuildRequires:  texlive-collection-xetex
38f0c6
BuildRequires:  texlive-collection-htmlxml
38f0c6
BuildRequires:  texlive-xmltex-bin
38f0c6
BuildRequires:  texlive-anysize
38f0c6
BuildRequires:  texlive-appendix
38f0c6
BuildRequires:  texlive-changebar
38f0c6
BuildRequires:  texlive-fancybox
38f0c6
BuildRequires:  texlive-jknapltx
38f0c6
BuildRequires:  texlive-multirow
38f0c6
BuildRequires:  texlive-overpic
38f0c6
BuildRequires:  texlive-pdfpages
38f0c6
BuildRequires:  texlive-subfigure
38f0c6
BuildRequires:  texlive-stmaryrd
38f0c6
BuildRequires:  texlive-wasysym
38f0c6
Requires:       texlive-base
38f0c6
Requires:       texlive-collection-latex
38f0c6
Requires:       texlive-collection-xetex
38f0c6
Requires:       texlive-collection-htmlxml
38f0c6
Requires:       texlive-collection-fontsrecommended
38f0c6
Requires:       texlive-passivetex
38f0c6
Requires:       texlive-xmltex texlive-xmltex-bin
38f0c6
Requires:       texlive-anysize
38f0c6
Requires:       texlive-appendix
38f0c6
Requires:       texlive-bibtopic
38f0c6
Requires:       texlive-changebar
38f0c6
Requires:       texlive-ec
38f0c6
Requires:       texlive-fancybox
38f0c6
Requires:       texlive-jknapltx
38f0c6
Requires:       texlive-multirow
38f0c6
Requires:       texlive-overpic
38f0c6
Requires:       texlive-passivetex
38f0c6
Requires:       texlive-pdfpages
38f0c6
Requires:       texlive-subfigure
38f0c6
Requires:       texlive-stmaryrd
38f0c6
Requires:       texlive-wasysym
38f0c6
Requires:       texlive-xmltex-bin
38f0c6
Requires:       libxslt docbook-dtds
38f0c6
Recommends:     texlive-epstopdf-bin
38f0c6
Recommends:     transfig
38f0c6
Recommends:     inkscape
38f0c6
38f0c6
%description
38f0c6
dblatex is a program that transforms your SGML/XMLDocBook
38f0c6
documents to DVI, PostScript or PDF by translating them
38f0c6
into pure LaTeX as a first process.  MathML 2.0 markups
38f0c6
are supported, too. It started as a clone of DB2LaTeX.
38f0c6
38f0c6
Authors:
38f0c6
--------
38f0c6
   BenoƮt Guillon <marsgui at users dot sourceforge dot net>
38f0c6
   Andreas Hoenen <andreas dot hoenen at arcor dot de>
38f0c6
38f0c6
38f0c6
%prep
38f0c6
%setup -q
38f0c6
%patch0 -p1 -b .enable-python3
38f0c6
%patch1 -p1 -b .disable-debian
38f0c6
%patch2 -p1 -b .use-shutil-which
38f0c6
%patch3 -p1 -b .fix-shebangs
38f0c6
38f0c6
rm -rf lib/contrib
38f0c6
38f0c6
%build
38f0c6
%{__python3} setup.py build
38f0c6
38f0c6
%install
38f0c6
%{__python3} setup.py install --root $RPM_BUILD_ROOT
38f0c6
# these are already in tetex-latex:
38f0c6
for file in bibtopic.sty enumitem.sty ragged2e.sty passivetex/ xelatex/; do
38f0c6
  rm -rf $RPM_BUILD_ROOT%{_datadir}/dblatex/latex/misc/$file
38f0c6
done
38f0c6
38f0c6
mkdir -p $RPM_BUILD_ROOT%{_datadir}/texlive/texmf-dist/tex/latex/dblatex
38f0c6
for file in ` find $RPM_BUILD_ROOT%{_datadir}/dblatex/latex/ -name '*.sty' ` ; do
38f0c6
  mv $file $RPM_BUILD_ROOT%{_datadir}/texlive/texmf-dist/tex/latex/dblatex/`basename $file`;
38f0c6
done
38f0c6
38f0c6
## also move .xetex files
38f0c6
for file in ` find $RPM_BUILD_ROOT%{_datadir}/dblatex/latex/ -name '*.xetex' ` ; do
38f0c6
  mv $file $RPM_BUILD_ROOT%{_datadir}/texlive/texmf-dist/tex/latex/dblatex/`basename $file`;
38f0c6
done
38f0c6
38f0c6
rmdir $RPM_BUILD_ROOT%{_datadir}/dblatex/latex/{misc,contrib/example,style}
38f0c6
38f0c6
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dblatex
38f0c6
# shipped in %%docs
38f0c6
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/
38f0c6
38f0c6
sed -e 's/\r//' xsl/mathml2/README > README-xsltml
38f0c6
touch -r xsl/mathml2/README README-xsltml
38f0c6
cp -p %{SOURCE1} COPYING-docbook-xsl
38f0c6
38f0c6
38f0c6
%files
38f0c6
%{_mandir}/man1/dblatex.1*
38f0c6
%doc COPYRIGHT docs/manual.pdf COPYING-docbook-xsl README-xsltml
38f0c6
%{python3_sitelib}/dbtexmf/
38f0c6
%{python3_sitelib}/dblatex-*.egg-info
38f0c6
%{_bindir}/dblatex
38f0c6
%{_datadir}/dblatex/
38f0c6
%{_datadir}/texlive/texmf-dist/tex/latex/dblatex/
38f0c6
%dir %{_sysconfdir}/dblatex
38f0c6
38f0c6
%post -p /usr/bin/texhash
38f0c6
38f0c6
%postun -p /usr/bin/texhash
38f0c6
38f0c6
%changelog
38f0c6
* Wed Jun 13 2018 Nikola ForrĆ³ <nforro@redhat.com> - 0.3.10-8
38f0c6
- switch to Python 3 (#1590857)
38f0c6
38f0c6
* Wed May 16 2018 Than Ngo <than@redhat.com> - 0.3.10-7
38f0c6
- fixed bz#1545772 - FTBFS
38f0c6
38f0c6
* Wed Apr 18 2018 Nikola ForrĆ³ <nforro@redhat.com> - 0.3.10-6
38f0c6
- remove ImageMagick dependency (#1564991)
38f0c6
38f0c6
* Wed Apr 11 2018 Nikola ForrĆ³ <nforro@redhat.com> - 0.3.10-5
38f0c6
- make non-critical graphic tools weak dependencies
38f0c6
- recommend inkscape, which can be used to convert SVG images
38f0c6
38f0c6
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.10-4
38f0c6
- Update Python 2 dependency declarations to new packaging standards
38f0c6
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
38f0c6
38f0c6
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.10-3
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
38f0c6
38f0c6
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.10-2
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
38f0c6
38f0c6
* Wed Apr 05 2017 Michael J Gruber <mjg@fedoraproject.org> - 0.3.10-1
38f0c6
- rebase with upstream
38f0c6
38f0c6
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.9-2
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
38f0c6
38f0c6
* Mon Oct 17 2016 Michael J Gruber <mjg@fedoraproject.org> - 0.3.9-1
38f0c6
- bugfix and feature release
38f0c6
38f0c6
* Mon Aug 01 2016 Michael J Gruber <mjg@fedoraproject.org> - 0.3.8-1
38f0c6
- bugfix and feature release
38f0c6
38f0c6
* Mon Aug 01 2016 Michael J Gruber <mjg@fedoraproject.org> - 0.3.7-1
38f0c6
- bugfix release
38f0c6
38f0c6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-4
38f0c6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
38f0c6
38f0c6
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.6-3
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
38f0c6
38f0c6
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-2
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
38f0c6
38f0c6
* Mon May 18 2015 jchaloup <jchaloup@redhat.com> - 0.3.6-1
38f0c6
- Update to 0.3.6
38f0c6
  resolves: #1222169
38f0c6
38f0c6
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.5-2
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
38f0c6
38f0c6
* Mon May 26 2014 jchaloup <jchaloup@redhat.com> - 0.3.5-1
38f0c6
- Update to 0.3.5.
38f0c6
38f0c6
* Thu Aug 08 2013 Michael J Gruber <mjg@fedoraproject.org> - 0.3.4-8
38f0c6
- Merge in licensing changes from  Stanislav Ochotnicky <sochotnicky@redhat.com>:
38f0c6
-* Mon Jul 29 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.4-8
38f0c6
-- Add Public Domain license and licensing comment
38f0c6
-* Mon Jul 29 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.4-7
38f0c6
-- Add DMIT, GPLv2 and LPPL licenses
38f0c6
-- Fix space and tab mixing
38f0c6
-- Cleanup old spec file parts
38f0c6
38f0c6
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-7
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
38f0c6
38f0c6
* Wed May 29 2013 Michael J Gruber <mjg@fedoraproject.org> - 0.3.4-6
38f0c6
- Add mising R texlive-multirow.
38f0c6
38f0c6
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-5
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
38f0c6
38f0c6
* Wed Jan 02 2013 Benjamin De Kosnik  <bkoz@redhat.com> - 0.3.4-1
38f0c6
- Update to 0.3.4.
38f0c6
- Adjust for texlive rebase.
38f0c6
38f0c6
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-5
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
38f0c6
38f0c6
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
38f0c6
38f0c6
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-3
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
38f0c6
38f0c6
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.3-2
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
38f0c6
38f0c6
* Mon Apr 12 2010 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.3-1
38f0c6
- Update to 0.3
38f0c6
- Cleanup spec: drop some unnecessary conditionals for old releases (< F-11)
38f0c6
38f0c6
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.10-3
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
38f0c6
38f0c6
* Sun May 10 2009 Neal Becker <ndbecker2@gmail.com> - 0.2.10-2
38f0c6
- remove dblatex-0.2.9-xetex.patch
38f0c6
38f0c6
* Sun May 10 2009 Neal Becker <ndbecker2@gmail.com> - 0.2.10-1
38f0c6
- Update to 0.2.10
38f0c6
38f0c6
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.9-4
38f0c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
38f0c6
38f0c6
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.9-3
38f0c6
- Rebuild for Python 2.6
38f0c6
38f0c6
* Fri Jul  4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.2.9-2
38f0c6
- BR: texlive-xetex -> tex(xetex) for F-10 and later
38f0c6
38f0c6
* Thu Jun 12 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.2.9-1
38f0c6
- Update to latest upstream (0.2.9) (#448953)
38f0c6
- Remove some redundant Requires and BuildRequires (passivetex pulls
38f0c6
  in the tetex/tex requires, python dep added automatically)
38f0c6
- For F-9+ BR on tex(latex) and texlive-xetex, fix the installation
38f0c6
  scripts to install extra new files.
38f0c6
- Add patch from dblatex mailing list for better handling of a missing
38f0c6
  xetex.
38f0c6
- Conditionally add .egg-info file only if F9+ to allow for unified
38f0c6
  spec file
38f0c6
38f0c6
* Sun Dec 16 2007 Patrice Dumas <pertusus@free.fr> - 0.2.8-2.1
38f0c6
- don't install in docbook directory, it is a link to a versioned
38f0c6
  directory and may break upon docbook update (#425251,#389231)
38f0c6
38f0c6
* Sun Nov 25 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.8-1
38f0c6
- Update to 0.2.8
38f0c6
38f0c6
* Mon Nov 12 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-16
38f0c6
- convert spec to utf8
38f0c6
- change to gplv2+
38f0c6
38f0c6
* Mon Nov 12 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-15
38f0c6
- Add copyright info
38f0c6
38f0c6
* Mon Nov  5 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-14
38f0c6
- Req tetex-fonts for texhash
38f0c6
- Fix post, postun
38f0c6
38f0c6
* Sun Nov  4 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-13
38f0c6
- Add texhash
38f0c6
38f0c6
* Sun Nov  4 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-12
38f0c6
- Fix xsl link
38f0c6
38f0c6
* Sat Nov  3 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-12
38f0c6
- Various fixes from pertusus@free.fr:
38f0c6
- rm iconv stuff
38f0c6
- simplify docs installation
38f0c6
38f0c6
* Fri Nov  2 2007  <ndbecker2@gmail.com> - 0.2.7-11
38f0c6
- Various minor fixes
38f0c6
38f0c6
* Thu Nov  1 2007  <ndbecker2@gmail.com> - 0.2.7-10
38f0c6
- Add some reqs and brs
38f0c6
- rmdir /usr/share/dblatex/latex/{misc,contrib/example,style}
38f0c6
38f0c6
* Sat Oct 27 2007  <ndbecker2@gmail.com> - 0.2.7-9
38f0c6
- link /usr/share/dblatex/xsl -> /usr/share/sgml/docbook/xsl-stylesheets/dblatex
38f0c6
- rmdir /usr/share/dblatex/latex/{misc,specs,style}
38f0c6
- own /etc/dblatex
38f0c6
- change $(...) -> `...`
38f0c6
- Preserve timestamps on iconv
38f0c6
38f0c6
* Mon Oct 15 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-9
38f0c6
- mv all .sty files to datadir/texmf/tex/latex/dblatex
38f0c6
- Add Conflicts tetex-tex4ht
38f0c6
- mv all xsl stuff to datadir/sgml/docbook/xsl-stylesheets/dblatex/
38f0c6
38f0c6
* Mon Oct 15 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-8
38f0c6
- rm redundant latex files
38f0c6
38f0c6
* Tue Sep 25 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-8
38f0c6
- Fixed encodings in docs directory
38f0c6
- Install docs at correct location
38f0c6
38f0c6
* Fri Sep 21 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-7
38f0c6
- Revert back to GPLv2
38f0c6
- untabify
38f0c6
38f0c6
* Fri Sep 21 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-6
38f0c6
- Fix source URL
38f0c6
- Install all docs
38f0c6
- Tabify
38f0c6
38f0c6
* Thu Sep 20 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-5
38f0c6
- Add BR tetex-latex
38f0c6
38f0c6
* Thu Sep 20 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-4
38f0c6
- Add  BR tetex, ImageMagick
38f0c6
38f0c6
* Thu Sep 20 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-3
38f0c6
- Add BR libxslt
38f0c6
38f0c6
* Wed Sep 19 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-2
38f0c6
- Add BR python-devel
38f0c6
38f0c6
* Fri Sep  7 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-1
38f0c6
- Initial