File httrack.spec of Package httrack

#
# spec file for package httrack
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Malcolm Lewis malcolmlewis@opensuse.org
#
# 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:           httrack
Version:        3.46.1
Release:        0
Summary:        Offline browser utility
License:        GPL-3.0+
Group:          Productivity/Networking/Web/Utilities
Url:            http://www.httrack.com/page/1/en/index.html
Source0:        http://download.httrack.com/httrack-%{version}.tar.gz
# PATCH-FIX-OPENSUSE httrack-fix-desktop.patch malcolmlewis@opensuse.org -- Fix desktop files to conform to openSUSE requirements
Patch0:         httrack-fix-desktop.patch
# PATCH-FIX-OPENSUSE httrack-fix-desktop.patch  malcolmlewis@opensuse.org -- Add -fno-strict-aliasing to DEFAULT_CFLAGS
Patch1:         httrack-fix-strict-aliasing-punning.patch
%if 0%{?sles_version} < 11
%else
BuildRequires:  fdupes
%endif
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
HTTrack is a free (GPL, libre/free software) and easy-to-use offline
browser utility.

It allows you 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. Simply open a page
of the "mirrored" website in your browser, and you can browse the site
from link to link, as if you were viewing it online. 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 httrack
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}

%description devel
This package contains the header and library files for httrack.

%package -n libhttrack2
Summary:        Shared library for httrack
Group:          Development/Libraries/Other

%description -n libhttrack2
This package contains the httrack shared libraries

%prep
%setup -q
%patch0
%patch1

%build
%configure --disable-static --disable-debug
make

%install
make install DESTDIR=%{buildroot}
%suse_update_desktop_file WebHTTrack-Websites
%suse_update_desktop_file WebHTTrack
# Remove generic header and libtool files
find %{buildroot} -name 'config.h' -exec rm {} \;
find %{buildroot} -name '*.la' -exec rm {} \;
# Clean up docs and icons
pushd %{buildroot}%{_datadir}/doc
rm -rf %{name}
cd ../%{name}
mv icons/*.xpm ../pixmaps/
rm -rf ./icons
popd
# For moving to docdir
rm -rf ./libtest ./templates
mv %{buildroot}%{_datadir}/%{name}/libtest .
mv %{buildroot}%{_datadir}/%{name}/templates .
%if 0%{?sles_version} < 11
%else
%fdupes %{buildroot}
%endif

%post -n libhttrack2 -p /sbin/ldconfig
%postun -n libhttrack2 -p /sbin/ldconfig

%clean
%{?buildroot:rm -rf %{buildroot}}

%files
%defattr(644,root,root,755)
%doc AUTHORS COPYING license.txt gpl-fr.txt
%doc httrack-doc.html templates
%defattr(-,root,root,-)
%{_bindir}/htsserver
%{_bindir}/httrack
%{_bindir}/proxytrack
%{_bindir}/webhttrack
%dir %{_libdir}/%{name}
%{_datadir}/applications/WebHTTrack-Websites.desktop
%{_datadir}/applications/WebHTTrack.desktop
%{_datadir}/pixmaps/*.xpm
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/
%{_mandir}/man1/*.gz
%exclude %{_libdir}/*.so
%exclude %{_libdir}/%{name}/*.so
%exclude %{_includedir}/%{name}/

%files devel
%defattr(-,root,root)
%doc libtest
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%{_libdir}/*.so
%{_libdir}/%{name}/*.so

%files -n libhttrack2
%defattr(-,root,root,-)
%{_libdir}/%{name}/*.so.*
%{_libdir}/*.so.*

%changelog
openSUSE Build Service is sponsored by