671b93
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
671b93
671b93
Name:       dblatex
671b93
Version:    0.3.4
671b93
Release:    11%{?dist}
671b93
Summary:    DocBook to LaTeX/ConTeXt Publishing
671b93
BuildArch:  noarch
671b93
# Most of package is GPLv2+, except:
671b93
# xsl/ directory is DMIT
671b93
# lib/dbtexmf/core/sgmlent.txt is Public Domain
671b93
# latex/misc/enumitem.sty, multirow2.sry and ragged2e.sty are LPPL
671b93
# latex/misc/lastpage.sty is GPLv2 (no +)
671b93
# latex/misc/passivetex is MIT (not included in binary RPM so not listed)
671b93
License:    GPLv2+ and GPLv2 and LPPL and DMIT and Public Domain
671b93
URL:        http://dblatex.sourceforge.net/
671b93
Source0:    http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
671b93
Patch0:     dblatex-0.2.7-external-which.patch
671b93
Patch1:     dblatex-disable-debian.patch
671b93
Patch2:     0001-Make-pdf-generation-work-in-FIPS-mode.patch
671b93
671b93
BuildRequires:  python-devel
671b93
BuildRequires:  python-which
671b93
BuildRequires:  libxslt
671b93
BuildRequires:  ImageMagick
671b93
BuildRequires:  texlive-base
671b93
BuildRequires:  texlive-collection-latex
671b93
BuildRequires:  texlive-collection-xetex
671b93
BuildRequires:  texlive-collection-htmlxml
671b93
BuildRequires:  transfig
671b93
BuildRequires:  texlive-epstopdf-bin
671b93
BuildRequires:  texlive-xmltex-bin
671b93
BuildRequires:  texlive-anysize
671b93
BuildRequires:  texlive-appendix
671b93
BuildRequires:  texlive-changebar
671b93
BuildRequires:  texlive-jknapltx
671b93
BuildRequires:  texlive-multirow
671b93
BuildRequires:  texlive-overpic
671b93
BuildRequires:  texlive-pdfpages
671b93
BuildRequires:  texlive-subfigure
671b93
BuildRequires:  texlive-stmaryrd
671b93
Requires:       texlive-base
671b93
Requires:       texlive-collection-latex
671b93
Requires:       texlive-collection-xetex
671b93
Requires:       texlive-collection-htmlxml
671b93
Requires:       texlive-collection-fontsrecommended
671b93
Requires:       texlive-epstopdf-bin
671b93
Requires:       texlive-passivetex
671b93
Requires:       texlive-xmltex texlive-xmltex-bin
671b93
Requires:       texlive-anysize
671b93
Requires:       texlive-appendix
671b93
Requires:       texlive-bibtopic
671b93
Requires:       texlive-changebar
671b93
Requires:       texlive-ec
671b93
Requires:       texlive-jknapltx
671b93
Requires:       texlive-multirow
671b93
Requires:       texlive-overpic
671b93
Requires:       texlive-passivetex
671b93
Requires:       texlive-pdfpages
671b93
Requires:       texlive-subfigure
671b93
Requires:       texlive-stmaryrd
671b93
Requires:       texlive-xmltex-bin
671b93
Requires:       libxslt docbook-dtds
671b93
Requires:       transfig
671b93
Requires:       ImageMagick
671b93
671b93
%description
671b93
dblatex is a program that transforms your SGML/XMLDocBook
671b93
documents to DVI, PostScript or PDF by translating them
671b93
into pure LaTeX as a first process.  MathML 2.0 markups
671b93
are supported, too. It started as a clone of DB2LaTeX.
671b93
671b93
Authors:
671b93
--------
671b93
   BenoƮt Guillon <marsgui at users dot sourceforge dot net>
671b93
   Andreas Hoenen <andreas dot hoenen at arcor dot de>
671b93
671b93
671b93
%prep
671b93
%setup -q
671b93
%patch0 -p1 -b .external-which
671b93
%patch1 -p1 -b .disable-debian
671b93
%patch2 -p1 -b .fips-mode
671b93
rm -rf lib/contrib
671b93
671b93
# make sure we use correct python version
671b93
sed -i '1s: /usr/bin/env python:/usr/bin/python:' scripts/dblatex
671b93
671b93
%build
671b93
%{__python} setup.py build
671b93
671b93
671b93
%install
671b93
#%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
671b93
%{__python} setup.py install --root $RPM_BUILD_ROOT
671b93
# these are already in tetex-latex:
671b93
for file in bibtopic.sty enumitem.sty ragged2e.sty passivetex/ xelatex/; do
671b93
  rm -rf $RPM_BUILD_ROOT%{_datadir}/dblatex/latex/misc/$file
671b93
done
671b93
671b93
mkdir -p $RPM_BUILD_ROOT%{_datadir}/texlive/texmf-dist/tex/latex/dblatex
671b93
for file in ` find $RPM_BUILD_ROOT%{_datadir}/dblatex/latex/ -name '*.sty' ` ; do
671b93
  mv $file $RPM_BUILD_ROOT%{_datadir}/texlive/texmf-dist/tex/latex/dblatex/`basename $file`;
671b93
done
671b93
671b93
## also move .xetex files
671b93
for file in ` find $RPM_BUILD_ROOT%{_datadir}/dblatex/latex/ -name '*.xetex' ` ; do
671b93
  mv $file $RPM_BUILD_ROOT%{_datadir}/texlive/texmf-dist/tex/latex/dblatex/`basename $file`;
671b93
done
671b93
671b93
rmdir $RPM_BUILD_ROOT%{_datadir}/dblatex/latex/{misc,contrib/example,style}
671b93
671b93
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dblatex
671b93
# shipped in %%docs
671b93
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/
671b93
671b93
sed -e 's/\r//' xsl/mathml2/README > README-xsltml
671b93
touch -r xsl/mathml2/README README-xsltml
671b93
671b93
671b93
%files
671b93
%{_mandir}/man1/dblatex.1*
671b93
%doc COPYRIGHT docs/manual.pdf README-xsltml
671b93
%{python_sitelib}/dbtexmf/
671b93
%{python_sitelib}/dblatex-*.egg-info
671b93
%{_bindir}/dblatex
671b93
%{_datadir}/dblatex/
671b93
%{_datadir}/texlive/texmf-dist/tex/latex/dblatex/
671b93
%dir %{_sysconfdir}/dblatex
671b93
671b93
%post -p /usr/bin/texhash
671b93
671b93
%postun -p /usr/bin/texhash
671b93
671b93
%changelog
671b93
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.3.4-11
671b93
- Mass rebuild 2013-12-27
671b93
671b93
* Tue Sep 24 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.4-10
671b93
- Replace /usr/bin/env usage in dblatex script
671b93
- Remove separate docbook license file
671b93
- Resolves: rhbz#987014
671b93
- Resolves: rhbz#878039
671b93
671b93
* Mon Jul 29 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.4-9
671b93
- Add FIPS mode patch
671b93
671b93
* Mon Jul 29 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.4-8
671b93
- Add Public Domain license and licensing comment
671b93
671b93
* Mon Jul 29 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.3.4-7
671b93
- Add DMIT, GPLv2 and LPPL licenses
671b93
- Fix space and tab mixing
671b93
- Cleanup old spec file parts
671b93
671b93
* Wed May 29 2013 Michael J Gruber <mjg@fedoraproject.org> - 0.3.4-6
671b93
- Add mising R texlive-multirow.
671b93
671b93
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-5
671b93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
671b93
671b93
* Wed Jan 02 2013 Benjamin De Kosnik  <bkoz@redhat.com> - 0.3.4-1
671b93
- Update to 0.3.4.
671b93
- Adjust for texlive rebase.
671b93
671b93
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-5
671b93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
671b93
671b93
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
671b93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
671b93
671b93
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-3
671b93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
671b93
671b93
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.3-2
671b93
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
671b93
671b93
* Mon Apr 12 2010 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.3-1
671b93
- Update to 0.3
671b93
- Cleanup spec: drop some unnecessary conditionals for old releases (< F-11)
671b93
671b93
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.10-3
671b93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
671b93
671b93
* Sun May 10 2009 Neal Becker <ndbecker2@gmail.com> - 0.2.10-2
671b93
- remove dblatex-0.2.9-xetex.patch
671b93
671b93
* Sun May 10 2009 Neal Becker <ndbecker2@gmail.com> - 0.2.10-1
671b93
- Update to 0.2.10
671b93
671b93
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.9-4
671b93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
671b93
671b93
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.9-3
671b93
- Rebuild for Python 2.6
671b93
671b93
* Fri Jul  4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.2.9-2
671b93
- BR: texlive-xetex -> tex(xetex) for F-10 and later
671b93
671b93
* Thu Jun 12 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.2.9-1
671b93
- Update to latest upstream (0.2.9) (#448953)
671b93
- Remove some redundant Requires and BuildRequires (passivetex pulls
671b93
  in the tetex/tex requires, python dep added automatically)
671b93
- For F-9+ BR on tex(latex) and texlive-xetex, fix the installation
671b93
  scripts to install extra new files.
671b93
- Add patch from dblatex mailing list for better handling of a missing
671b93
  xetex.
671b93
- Conditionally add .egg-info file only if F9+ to allow for unified
671b93
  spec file
671b93
671b93
* Sun Dec 16 2007 Patrice Dumas <pertusus@free.fr> - 0.2.8-2.1
671b93
- don't install in docbook directory, it is a link to a versioned
671b93
  directory and may break upon docbook update (#425251,#389231)
671b93
671b93
* Sun Nov 25 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.8-1
671b93
- Update to 0.2.8
671b93
671b93
* Mon Nov 12 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-16
671b93
- convert spec to utf8
671b93
- change to gplv2+
671b93
671b93
* Mon Nov 12 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-15
671b93
- Add copyright info
671b93
671b93
* Mon Nov  5 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-14
671b93
- Req tetex-fonts for texhash
671b93
- Fix post, postun
671b93
671b93
* Sun Nov  4 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-13
671b93
- Add texhash
671b93
671b93
* Sun Nov  4 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-12
671b93
- Fix xsl link
671b93
671b93
* Sat Nov  3 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-12
671b93
- Various fixes from pertusus@free.fr:
671b93
- rm iconv stuff
671b93
- simplify docs installation
671b93
671b93
* Fri Nov  2 2007  <ndbecker2@gmail.com> - 0.2.7-11
671b93
- Various minor fixes
671b93
671b93
* Thu Nov  1 2007  <ndbecker2@gmail.com> - 0.2.7-10
671b93
- Add some reqs and brs
671b93
- rmdir /usr/share/dblatex/latex/{misc,contrib/example,style}
671b93
671b93
* Sat Oct 27 2007  <ndbecker2@gmail.com> - 0.2.7-9
671b93
- link /usr/share/dblatex/xsl -> /usr/share/sgml/docbook/xsl-stylesheets/dblatex
671b93
- rmdir /usr/share/dblatex/latex/{misc,specs,style}
671b93
- own /etc/dblatex
671b93
- change $(...) -> `...`
671b93
- Preserve timestamps on iconv
671b93
671b93
* Mon Oct 15 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-9
671b93
- mv all .sty files to datadir/texmf/tex/latex/dblatex
671b93
- Add Conflicts tetex-tex4ht
671b93
- mv all xsl stuff to datadir/sgml/docbook/xsl-stylesheets/dblatex/
671b93
671b93
* Mon Oct 15 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-8
671b93
- rm redundant latex files
671b93
671b93
* Tue Sep 25 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-8
671b93
- Fixed encodings in docs directory
671b93
- Install docs at correct location
671b93
671b93
* Fri Sep 21 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-7
671b93
- Revert back to GPLv2
671b93
- untabify
671b93
671b93
* Fri Sep 21 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-6
671b93
- Fix source URL
671b93
- Install all docs
671b93
- Tabify
671b93
671b93
* Thu Sep 20 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-5
671b93
- Add BR tetex-latex
671b93
671b93
* Thu Sep 20 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-4
671b93
- Add  BR tetex, ImageMagick
671b93
671b93
* Thu Sep 20 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-3
671b93
- Add BR libxslt
671b93
671b93
* Wed Sep 19 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-2
671b93
- Add BR python-devel
671b93
671b93
* Fri Sep  7 2007 Neal Becker <ndbecker2@gmail.com> - 0.2.7-1
671b93
- Initial