54c45d6
Name:		htmldoc
de0c571
Version:	1.8.27
545f719
Release:	24%{?dist}
0077fb2
Summary:	Converter from HTML into indexed HTML, PostScript, or PDF
54c45d6
54c45d6
Group:		Applications/Publishing
c9bd78e
c9bd78e
# GPLv2 with OpenSSL exception
c9bd78e
License:	GPLv2 with exceptions
54c45d6
URL:		http://www.htmldoc.org/
54c45d6
Source:		http://ftp.easysw.com/pub/%{name}/%{version}/%{name}-%{version}-source.tar.bz2
54c45d6
672c0f8
Patch0:		htmldoc-1.8.27-desktop-icon.patch
5ab084e
Patch1:		htmldoc-1.8.27-dingbats-standard.patch
5ab084e
Patch2:		htmldoc-1.8.27-system-fonts.patch
5e0560e
Patch3:		htmldoc-1.8.27-scanf-overflows.patch
19ba5da
Patch4:		htmldoc-1.8.27-fortify-fail.patch
acd0792
Patch5:		htmldoc-1.8.27-fixdso.patch
8f9734e
# http://www.htmldoc.org/str.php?L243+P0+S-2+C0+I0+E0+M10+Q
8f9734e
# http://www.htmldoc.org/strfiles/243/patch-ae
8f9734e
Patch6: 	htmldoc-1.8.27-libpng15.patch
672c0f8
54c45d6
BuildRequires:	openssl-devel libjpeg-devel libpng-devel zlib-devel
54c45d6
BuildRequires:	fltk-devel libXpm-devel desktop-file-utils
5ab084e
BuildRequires:	dejavu-sans-fonts dejavu-sans-mono-fonts dejavu-serif-fonts
5ab084e
BuildRequires:	urw-fonts fontpackages-devel
5ab084e
BuildRequires:	ttf2pt1 t1utils
5ab084e
5ab084e
Requires:	dejavu-sans-fonts dejavu-sans-mono-fonts dejavu-serif-fonts
5ab084e
Requires:	urw-fonts
5ab084e
Requires:	ttf2pt1 t1utils
54c45d6
de0c571
54c45d6
%description
54c45d6
HTMLDOC converts HTML source files into indexed HTML, PostScript, or
54c45d6
Portable Document Format (PDF) files that can be viewed online or
54c45d6
printed. With no options a HTML document is produced on stdout.
de0c571
54c45d6
The second form of HTMLDOC reads HTML source from stdin, which allows
54c45d6
you to use HTMLDOC as a filter.
de0c571
54c45d6
The third form of HTMLDOC launches a graphical interface that allows
54c45d6
you to change options and generate documents interactively.
54c45d6
de0c571
54c45d6
%prep
54c45d6
%setup -q
54c45d6
54c45d6
# fix up hardcoded documentation path
54c45d6
sed -i 's/\(\$prefix\/share\/doc\/htmldoc\)/\1-%{version}/g' configure
54c45d6
acd0792
# Fix DSO linking
acd0792
%patch5 -p1 -b .fixdso
acd0792
5ab084e
# fix desktop icon (http://www.htmldoc.org/str.php?L169)
fed95ba
%patch0 -p1 -b .desktop-icon
672c0f8
5ab084e
# make Dingbats standard (http://www.htmldoc.org/str.php?L198)
5ab084e
%patch1 -p1 -b .dingbats
5ab084e
5ab084e
# use Fedora system fonts (http://www.htmldoc.org/str.php?L196)
5ab084e
%patch2 -p1 -b .system-fonts
5ab084e
cd fonts
5ab084e
rm -f *.pfa *.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n022003l.afm Courier.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n022004l.afm Courier-Bold.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n022024l.afm Courier-BoldOblique.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n022024l.pfb Courier-BoldOblique.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n022004l.pfb Courier-Bold.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n022023l.afm Courier-Oblique.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n022023l.pfb Courier-Oblique.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n022003l.pfb Courier.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/d050000l.afm Dingbats.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/d050000l.pfb Dingbats.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n019003l.afm Helvetica.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n019004l.afm Helvetica-Bold.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n019024l.afm Helvetica-BoldOblique.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n019024l.pfb Helvetica-BoldOblique.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n019004l.pfb Helvetica-Bold.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n019023l.afm Helvetica-Oblique.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n019023l.pfb Helvetica-Oblique.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n019003l.pfb Helvetica.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/s050000l.afm Symbol.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/s050000l.pfb Symbol.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n021004l.afm Times-Bold.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n021024l.afm Times-BoldItalic.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n021024l.pfb Times-BoldItalic.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n021004l.pfb Times-Bold.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n021023l.afm Times-Italic.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n021023l.pfb Times-Italic.pfb
5ab084e
ln -s %{_fontbasedir}/default/Type1/n021003l.afm Times-Roman.afm
5ab084e
ln -s %{_fontbasedir}/default/Type1/n021003l.pfb Times-Roman.pfb
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSans-BoldOblique.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSans-Bold.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSansMono-BoldOblique.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSansMono-Bold.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSansMono-Oblique.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSansMono.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSans-Oblique.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSans.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSerif-BoldItalic.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSerif-Bold.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSerif-Italic.ttf
5ab084e
ln -s %{_fontbasedir}/dejavu/DejaVuSerif.ttf
5e0560e
cd ..
5e0560e
5e0560e
# fix some scanf overflows (http://www.htmldoc.org/str.php?L214)
5e0560e
%patch3 -p1 -b .scanf-overflows
5ab084e
19ba5da
# fix limitation of -D_FORTIFY_SOURCE=2
19ba5da
%patch4 -p1 -b .fortify-fail
19ba5da
8f9734e
# fix build with libpng-1.5+
bc889b3
%patch6 -p0 -b .libpng15
8f9734e
de0c571
54c45d6
%build
54c45d6
%configure
54c45d6
make %{?_smp_mflags}
54c45d6
de0c571
54c45d6
%install
54c45d6
rm -rf $RPM_BUILD_ROOT
54c45d6
make install prefix=${RPM_BUILD_ROOT}%{_prefix} mandir=${RPM_BUILD_ROOT}%{_mandir} bindir=${RPM_BUILD_ROOT}%{_bindir} datadir=${RPM_BUILD_ROOT}%{_datadir}
54c45d6
54c45d6
# kill thing which we get later in the right place with %doc
54c45d6
rm -rf ${RPM_BUILD_ROOT}%{_docdir}/htmldoc
54c45d6
54c45d6
# install icons
54c45d6
for s in 16 24 32 48 64 96 128; do 			\
54c45d6
	install -d ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/${s}x${s}/apps; \
54c45d6
	cp -a desktop/htmldoc-$s.png 			\
54c45d6
	${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/${s}x${s}/apps/htmldoc.png;\
54c45d6
done
54c45d6
54c45d6
# install MIME
54c45d6
install -d ${RPM_BUILD_ROOT}%{_datadir}/mime/packages
54c45d6
cp -a desktop/htmldoc.xml ${RPM_BUILD_ROOT}%{_datadir}/mime/packages
54c45d6
54c45d6
# desktop file
545f719
desktop-file-install \
5ab084e
	--dir ${RPM_BUILD_ROOT}%{_datadir}/applications		\
54c45d6
	--remove-category=X-Red-Hat-Base			\
54c45d6
	--add-mime-type=application/vnd.htmldoc-book		\
54c45d6
	desktop/htmldoc.desktop
54c45d6
54c45d6
54c45d6
%post
54c45d6
# scriptlet for icons
54c45d6
touch --no-create %{_datadir}/icons/hicolor || :
54c45d6
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
5ab084e
	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
54c45d6
fi
54c45d6
54c45d6
# scriptlet for MIME
54c45d6
update-mime-database %{_datadir}/mime &> /dev/null || :
54c45d6
54c45d6
# scriptlet for desktop database
54c45d6
update-desktop-database &> /dev/null || :
54c45d6
54c45d6
54c45d6
%postun
54c45d6
# scriptlet for icons
54c45d6
touch --no-create %{_datadir}/icons/hicolor || :
54c45d6
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
5ab084e
	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
54c45d6
fi
54c45d6
54c45d6
# scriptlet for MIME
54c45d6
update-mime-database %{_datadir}/mime &> /dev/null || :
54c45d6
54c45d6
# scriptlet for desktop database
54c45d6
update-desktop-database &> /dev/null || :
54c45d6
54c45d6
54c45d6
%clean
54c45d6
rm -rf $RPM_BUILD_ROOT
54c45d6
de0c571
54c45d6
%files
54c45d6
%defattr(-,root,root,-)
54c45d6
%doc doc/intro.html doc/c-relnotes.html doc/htmldoc.{html,pdf,ps} doc/help.html
54c45d6
%doc CHANGES.txt COPYING.txt README.txt
54c45d6
%{_datadir}/htmldoc
54c45d6
%{_datadir}/applications/*
54c45d6
%{_mandir}/man1/*
54c45d6
%{_bindir}/htmldoc
54c45d6
%{_datadir}/icons/hicolor/*/apps/*
54c45d6
%{_datadir}/mime/packages/htmldoc.xml
54c45d6
de0c571
54c45d6
%changelog
545f719
* Wed Apr 24 2013 Jon Ciesla <limburgher@gmail.com> - 1.8.27-24
545f719
- Drop desktop vendor tag.
545f719
9606120
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.27-23
9606120
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9606120
Adam Tkac 04065b2
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1.8.27-22
Adam Tkac 04065b2
- rebuild due to "jpeg8-ABI" feature drop
Adam Tkac 04065b2
a3243b9
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.8.27-21
a3243b9
- rebuild against new libjpeg
a3243b9
Daniel Drake f48eeb3
* Sat Sep  1 2012 Daniel Drake <dsd@laptop.org> - 1.8.27-20
Daniel Drake f48eeb3
- fix libpng-1.5 patch to not corrupt images
Daniel Drake f48eeb3
ed0b20c
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.27-19
ed0b20c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ed0b20c
8f9734e
* Fri Jan 13 2012 Rex Dieter <rdieter@fedoraproject.org> 1.8.27-18
8f9734e
- fix build against libpng-1.5
8f9734e
946ce7e
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.27-17
946ce7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
946ce7e
5ef6ee8
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.8.27-16
5ef6ee8
- Rebuild for new libpng
5ef6ee8
acd0792
* Tue Jun 14 2011 Peter Robinson <pbrobinson@gmail.com> - 1.8.27-15
acd0792
- Fix DSO linking so htmldoc actually compiles and works - RHBZ 631135 and others
acd0792
2357d3f
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.27-14
2357d3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2357d3f
6cde882
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.8.27-13
6cde882
- rebuilt with new openssl
6cde882
19ba5da
* Thu Aug 13 2009 Adam Goode <adam@spicenitz.org> - 1.8.27-12
19ba5da
- Fix limitation of -D_FORTIFY_SOURCE=2 (#511520)
5e0560e
- Fix scanf overflows (#512513)
5e0560e
9745f53
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.27-11
9745f53
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
9745f53
ac70f3a
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.27-10
ac70f3a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ac70f3a
5ab084e
* Tue Feb 10 2009 Adam Goode <adam@spicenitz.org> - 1.8.27-9
5ab084e
- Patch to specify Dingbats as a standard PS and PDF font
5ab084e
- Use system fonts to conform to new font guidelines (#477397)
5ab084e
aa60293
* Fri Jan 16 2009 Tomas Mraz <tmraz@redhat.com> - 1.8.27-8
aa60293
- rebuild with new openssl
aa60293
fed95ba
* Sat Aug 30 2008 Adam Goode <adam@spicenitz.org> - 1.8.27-7
fed95ba
- RPM 4.6 fix for patch tag
fed95ba
8142ab7
* Sat Feb  9 2008 Adam Goode <adam@spicenitz.org> - 1.8.27-6
8142ab7
- GCC 4.3 mass rebuild
8142ab7
672c0f8
* Wed Dec  5 2007 Adam Goode <adam@spicenitz.org> - 1.8.27-5
672c0f8
- Fix desktop file validation
672c0f8
61e410c
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 1.8.27-4
61e410c
 - Rebuild for deps
61e410c
d1b2a8b
* Wed Aug 22 2007 Adam Goode <adam@spicenitz.org> - 1.8.27-3
d1b2a8b
- Update license tag
d1b2a8b
- Rebuild for buildid
d1b2a8b
d01b425
* Sat May  5 2007 Adam Goode <adam@spicenitz.org> - 1.8.27-2
d01b425
- Remove X-Fedora
d01b425
0d986a2
* Thu Aug 31 2006 Adam Goode <adam@spicenitz.org> - 1.8.27-1.1
0d986a2
- Mass rebuild
0d986a2
de0c571
* Wed Aug  2 2006 Adam Goode <adam@spicenitz.org> - 1.8.27-1
de0c571
- New upstream release
de0c571
54c45d6
* Wed May 31 2006 Adam Goode <adam@spicenitz.org> - 1.8.26-4
54c45d6
- Fix hardcoded documentation path in configure
54c45d6
- Add help.html to documentation
54c45d6
54c45d6
* Mon May 29 2006 Adam Goode <adam@spicenitz.org> - 1.8.26-3
54c45d6
- Use upstream desktop file
54c45d6
- Install icons
54c45d6
- Install mime XML file
54c45d6
- Eliminate strange spaces in description
54c45d6
54c45d6
* Sat May 27 2006 Adam Goode <adam@spicenitz.org> - 1.8.26-2
54c45d6
- Add downloadable source
54c45d6
54c45d6
* Thu May 25 2006 Adam Goode <adam@spicenitz.org> - 1.8.26-1
54c45d6
- New upstream release
54c45d6
- Rebuild for FC5
54c45d6
54c45d6
* Mon Oct 24 2005 Thomas Chung <tchung@fedoranews.org> 1.8.24-1
54c45d6
- Rebuild for FC4
54c45d6
54c45d6
* Tue Feb 22 2005 Thomas Chung <tchung@fedoranews.org> 1.8.24-0
54c45d6
- Initial RPM build for FC3