%if 0%{?fc7}
%else
%define _remove_encoding --remove-key Encoding
%endif
Summary: Website copier and offline browser
Name: httrack
Version: 3.43.9
Release: 2%{?dist}
License: GPLv2+
Group: Applications/Internet
URL: http://www.httrack.com/
Source0: http://www.httrack.com/%{name}-3.43-9C.tar.gz
Patch0: %{name}-%{version}-desktop.patch
Patch1: %{name}-%{version}-utf-8.patch
Patch2: %{name}-%{version}-openssl.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# Add explicit dependency on openssl library with soname we dlopen
%if %{__isa_bits} == 64
%define reqsuffix ()(64bit)
%endif
Requires: libssl.so.10%{?reqsuffix}
Requires: xdg-utils
BuildRequires: desktop-file-utils
BuildRequires: dos2unix
BuildRequires: libtool
BuildRequires: zlib-devel
%description
HTTrack is a free and easy-to-use offline browser utility.
It allows the user to download a World Wide Web site from the Internet to a
local directory, building recursively all directories, getting HTML, images,
and other files from the server to your computer. HTTrack arranges the
original site's relative link-structure. HTTrack can also update an existing
mirrored site, and resume interrupted downloads. HTTrack is fully
configurable, and has an integrated help system.
%package devel
Summary: Development files for %{name}
Group: Applications/Internet
Requires: %{name} = %{version}-%{release}
%description devel
This package contains development files for %{name}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
# Suppress rpmlint error.
iconv --from-code ISO8859-1 --to-code UTF-8 ./html/contact.html \
--output contact.utf-8 && mv contact.utf-8 ./html/contact.html
%build
%configure --disable-static
# Remove rpaths.
rm -f ./libtool
cp %{_bindir}/libtool .
# Omit unused direct shared library dependencies.
sed --in-place --expression 's! -shared ! -Wl,--as-needed\0!g' libtool
# Parallel make does not work.
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -delete
find $RPM_BUILD_ROOT -type f -name "*.a" -delete
# Remove generic header from /usr/include/httrack.
rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h
# Remove unnecessary dynamic libraries from /usr/lib/httrack.
rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}
# There are symbolic links in /usr/share/doc/httrack.
# Use %doc instead.
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
# Move libtest and templates from /usr/share/httrack to RPM_BUILD_DIR.
# To be later listed against %doc.
rm -rf ./libtest ./templates
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/libtest .
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/templates .
# We need to have a copy of html in /usr/share/httrack.
# The other is to be listed against %doc.
rm -rf ./html
cp -pr $RPM_BUILD_ROOT%{_datadir}/%{name}/html .
# icon
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/icons/webhttrack.xpm \
$RPM_BUILD_ROOT%{_datadir}/pixmaps
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/icons
desktop-file-install %{?_remove_encoding} --vendor fedora --delete-original \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/WebHTTrack.desktop
desktop-file-install %{?_remove_encoding} --vendor fedora --delete-original \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/WebHTTrack-Websites.desktop
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS
%doc COPYING
%doc README
%doc gpl.txt
%doc gpl-fr.txt
%doc greetings.txt
%doc history.txt
%doc html
%doc license.txt
%doc %{name}-doc.html
%doc templates
%doc %{_mandir}/man1/htsserver.1*
%doc %{_mandir}/man1/%{name}.1*
%doc %{_mandir}/man1/proxytrack.1*
%doc %{_mandir}/man1/webhttrack.1*
%{_bindir}/htsserver
%{_bindir}/%{name}
%{_bindir}/proxytrack
%{_bindir}/webhttrack
%{_datadir}/applications/fedora-WebHTTrack.desktop
%{_datadir}/applications/fedora-WebHTTrack-Websites.desktop
%{_datadir}/pixmaps/%{name}.xpm
%{_datadir}/pixmaps/webhttrack.xpm
%{_libdir}/libhtsjava.so.*
%{_libdir}/libhttrack.so.*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%files devel
%defattr(-,root,root,-)
%doc libtest
%{_libdir}/libhtsjava.so
%{_libdir}/libhttrack.so
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%changelog
* Mon Jun 7 2010 Tomas Mraz <tmraz@redhat.com> - 3.43.9-2
- Use libssl soname for openssl dlopen and dependency
* Mon Mar 22 2010 Debarshi Ray <rishi@fedoraproject.org> - 3.43.9-1
- Version bump to 3.42.93. (Red Hat Bugzilla #512420)
* Fixed: application/xhtml+xml not seen as "html"
* Fixed: URL encoding bugs with filenames containing '%' characters
* Fixed: Flash link extraction has been improved
* Fixed: "Open error when decompressing" errors due to temporary file
generation problems
* Fixed: code tag handling bug in certain cases leading to produce invalid
links
* Fixed: horrible SSL slowdowns due to bogus select() calls
* Fixed: Konqueror fixes
* Updated: Portugues-Brasil language file
- Updated the openssl patch to consume newer sonames.
* Tue Sep 01 2009 Jesse Keating <jkeating@redhat.com> - 3.43.2-5
- Bumped to consume new openssl soname.
* Fri Jul 24 2009 Release Engineering <rel-eng@fedoraproject.org> - 3.43.2-4
- Autorebuild for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Mar 31 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 3.43.2-3
- Updated 'Requires: openssl = 0.9.8k'
* Tue Feb 24 2009 Release Engineering <rel-eng@fedoraproject.org> - 3.43.2-2
- Autorebuild for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Jan 20 2009 Debarshi Ray <rishi@fedoraproject.org> - 3.43.2-1
- Version bump to 3.43.2. (Red Hat Bugzilla #476110)
- Updated 'Requires: openssl = 0.9.8j' and fixed the sources for Rawhide.
* Tue Sep 09 2008 Debarshi Ray <rishi@fedoraproject.org> - 3.42.93-1
- Version bump to 3.42.93. (Red Hat Bugzilla #457523 (CVE-2008-3429), #460529)
- Use of generic macros in the publicly exposed API fixed by upstream.
- Use of xdg-open now added by upstream.
- OpenSSL version updated by upstream.
- Linkage issues in libhtsjava.so fixed by upstream.
* Thu Feb 21 2008 Debarshi Ray <rishi@fedoraproject.org> - 3.42-10
- Fixed runtime problems with --excludedocs.
- Omitted unused direct shared library dependencies.
* Tue Feb 19 2008 Release Engineering <rel-eng@fedoraproject.org> - 3.42-9
- Autorebuild for gcc-4.3.
* Thu Dec 13 2007 Debarshi Ray <rishi@fedoraproject.org> - 3.42-8
- Added 'BuildRequires: chrpath' for removing rpaths.
* Sun Dec 09 2007 Debarshi Ray <rishi@fedoraproject.org> - 3.42-7
- Updated 'Requires: openssl = 0.9.8g' and fixed the sources for Rawhide.
* Fri Dec 07 2007 Release Engineering <rel-eng@fedoraproject.org> - 3.42-6
- Rebuild for deps.
* Tue Nov 27 2007 Debarshi Ray <rishi@fedoraproject.org> - 3.42-4
- Removed Encoding from Desktop Entry for all distributions, except Fedora 7.
* Fri Nov 23 2007 Debarshi Ray <rishi@fedoraproject.org> - 3.42-3
- Mentioned openssl version explicitly as 0.9.8b.
* Fri Nov 23 2007 Debarshi Ray <rishi@fedoraproject.org> - 3.42-2
- Fixed undefined non-weak symbols and unused direct shared library
dependencies in libhtsjava.so.2.
- Fixed location of some documentation files.
* Sun Nov 18 2007 Debarshi Ray <rishi@fedoraproject.org> - 3.42-1
- Version bump to 3.42.
- Fixed header files to not use generic headers and macros in the publicly
exposed API.
- Removed Encoding from Desktop Entry.
* Mon Nov 12 2007 Debarshi Ray <rishi@fedoraproject.org> - 3.41.3-2
- Added 'Requires: openssl' and fixed the sources.
- Added 'Requires: xdg-utils' and fixed the sources.
- Removed 'Requires: openssl-devel' from -devel.
- Removed unnecessary dynamic libraries.
* Mon Oct 29 2007 Debarshi Ray <rishi@fedoraproject.org> - 3.41.3-1
- Initial build. Imported SPEC written by Yves Cluckers.
- Disabled parallel make to prevent failure with -j3.
- Changed character encodings from ISO8859-1 to UTF-8.
- Fixed .desktop files to comply with http://www.freedesktop.org/standards/.