From 37aedd0f88d73db697cdb841aa5a26480e3df4d6 Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Mar 12 2016 19:53:59 +0000 Subject: Merge branch 'master' into el6 --- diff --git a/.gitignore b/.gitignore index 9d97248..34ba46f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ httrack-3.43-9C.tar.gz /httrack-3.48.17.tar.gz /httrack-3.48.18.tar.gz /httrack-3.48.19.tar.gz +/httrack-3.48.20.tar.gz +/httrack-3.48.21.tar.gz diff --git a/httrack.spec b/httrack.spec index 14c60ae..22b30bc 100644 --- a/httrack.spec +++ b/httrack.spec @@ -1,10 +1,10 @@ Name: httrack -Version: 3.48.19 -Release: 2%{?dist} +Version: 3.48.21 +Release: 1%{?dist} Summary: Website copier and offline browser License: GPLv2+ URL: http://www.httrack.com -Source0: http://mirror.httrack.com/%{name}-%{version}.tar.gz +Source0: http://mirror.httrack.com/historical/%{name}-%{version}.tar.gz BuildRequires: desktop-file-utils BuildRequires: libtool BuildRequires: openssl-devel @@ -38,37 +38,32 @@ 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 --disable-online-unit-tests -# Remove rpaths. -rm -f ./libtool -cp %{_bindir}/libtool . +%configure --disable-static \ + --disable-online-unit-tests \ + --htmldir=%{_pkgdocdir}/html -# Omit unused direct shared library dependencies. -sed --in-place --expression 's! -shared ! -Wl,--as-needed\0!g' libtool +# Remove rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} %install %make_install +# Remove static libraries. find %{buildroot} -type f -name "*.*a" -delete -print -# Remove unnecessary dynamic libraries from %%{_libdir}/httrack. +# Remove unnecessary dynamic libraries from %%{_libdir}/httrack. These come +# from libtest, just a sample project from upstream. rm -frv %{buildroot}%{_libdir}/%{name} -# Use %%doc instead. -rm -frv %{buildroot}%{_docdir}/%{name} +# Move libtest and templates from %%{_datadir}/httrack into %%{_pkgdocdir}. +mv %{buildroot}%{_datadir}/%{name}/libtest %{buildroot}%{_pkgdocdir}/libtest +mv %{buildroot}%{_datadir}/%{name}/templates %{buildroot}%{_pkgdocdir}/templates -# Move libtest and templates from %%{_datadir}/httrack to RPM_BUILD_DIR. -# To be later listed against %%doc. -rm -rf ./libtest ./templates -mv %{buildroot}%{_datadir}/%{name}/libtest . -mv %{buildroot}%{_datadir}/%{name}/templates . - -# We need to have a copy of html in %%{_datadir}/httrack. -# The other is to be listed against %%doc. -rm -rf ./html -cp -ar %{buildroot}%{_datadir}/%{name}/html . +# Now packaged in %%license +rm %{buildroot}%{_pkgdocdir}/html/license.txt desktop-file-install --delete-original \ --dir %{buildroot}%{_datadir}/applications \ @@ -79,15 +74,41 @@ desktop-file-install --delete-original \ %{buildroot}%{_datadir}/applications/WebHTTrack-Websites.desktop %check -make -C tests/ check - -%pretrans -if [ $1 = 0 ]; then - # workaround rpm bug (replacing directory with symlink fails) - [ ! -h %{_datadir}/%{name}/html -a -d %{_datadir}/%{name}/html ] && \ - rm -rf %{_datadir}/%{name}/html - exit 0 -fi +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +make check -C tests + +%pretrans -p +--[[Script below fixes some crufts introduced in httrack < 3.47.26-1, to +cleanup wrong symlinks in old httrack packages. +In the past it's a shell script, it worked but another problem came in, +as if users are installing a fresh Fedora then they will fail at here. +This is because coreutils is not installed in pretrans stage although +fresh Fedora doesn't contain directory we want to remove. + +https://fedoraproject.org/wiki/Packaging:Directory_Replacement +]] +require "os" +require "posix" + +local path1 = "%{_datadir}/httrack/html" +local st1 = posix.stat(path1) +if st1 and st1.type == "directory" then + local status1 = os.rename(path1, path1..".rpmmoved") + if not status1 then + local suffix1 = 0 + while not status1 do + suffix1 = suffix1 + 1 + status1 = os.rename(path1..".rpmmoved", path1..".rpmmoved."..suffix1) + end + os.rename(path1, path1..".rpmmoved") + end +end + +local path2 = "%{_pkgdocdir}/html" +local st2 = posix.stat(path2) +if st2 and st2.type == "link" then + os.remove(path2) +end %post /sbin/ldconfig @@ -100,12 +121,17 @@ if [ $1 -eq 0 ] ; then gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi -%posttrans -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +%posttrans -p +require "os" + +local path1 = "%{_datadir}/httrack/html" +os.execute("gtk-update-icon-cache".." %{_datadir}/icons/hicolor ".."&>/dev/null ".."|| "..":") +os.execute("rm".." -fr".." "..path1..".rpmmoved*") %files -%doc AUTHORS COPYING README *.txt -%doc html %{name}-doc.html templates +%{_pkgdocdir} +%exclude %{_pkgdocdir}/libtest +%license COPYING license.txt %{_bindir}/htsserver %{_bindir}/%{name} %{_bindir}/proxytrack @@ -123,12 +149,37 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_mandir}/man1/webhttrack.1* %files devel -%doc libtest/ +%{_pkgdocdir}/libtest/ %{_includedir}/%{name}/ %{_libdir}/libhtsjava.so %{_libdir}/libhttrack.so %changelog +* Sat Mar 12 2016 Fabio Alessandro Locati - 3.48.21-1 +- Bump to 3.48.21 + +* Wed Mar 09 2016 Ralf Corsépius - 3.48.20-5 +- Don't use relative %%doc, install into %%{_pkgdocdir} directly + (Fix F24FTBFS, RHBZ#1307626). +- Rework libtool/rpath handling. +- Reflect Source0-URL having changed. + +* Wed Feb 03 2016 Fedora Release Engineering - 3.48.20-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 3.48.20-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Mar 02 2015 Christopher Meng - 3.48.20-2 +- Fix %%pretrans scriptlet bug again. + +* Tue Feb 24 2015 Christopher Meng - 3.48.20-1 +- Update to 3.48.20 +- Fix %%pretrans scriptlet bug. + +* Sat Aug 16 2014 Fedora Release Engineering - 3.48.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Fri Aug 08 2014 Christopher Meng - 3.48.19-2 - Fix -devel package dependency(missing openssl-devel) diff --git a/sources b/sources index c8d6f52..1dcd5f6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -db07a1a3e41eff1123606c444f8f267d httrack-3.48.19.tar.gz +c2a2f44da400fe18fad6f98bac49a987 httrack-3.48.21.tar.gz