public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/httrack] f44: spec cleanup and modernization
@ 2026-06-20 22:43 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-06-20 22:43 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/httrack
Branch : f44
Commit : 8fd56bc73c7d6a17fadd8b2dfaf2971b2f243b2a
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date   : 2026-06-06T23:48:18-03:00
Stats  : +9/-43 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/httrack/c/8fd56bc73c7d6a17fadd8b2dfaf2971b2f243b2a?branch=f44

Log:
spec cleanup and modernization

---
diff --git a/httrack.spec b/httrack.spec
index 5d6365b..91f67b1 100644
--- a/httrack.spec
+++ b/httrack.spec
@@ -2,16 +2,15 @@ Name:           httrack
 Version:        3.49.2
 Release:        %autorelease
 Summary:        Website copier and offline browser
-# Automatically converted from old format: GPLv2+ - review is highly recommended.
-License:        GPL-2.0-or-later
+License:        GPL-3.0-or-later WITH OpenSSL-exception
 URL:            http://www.httrack.com
-Source0:        http://mirror.httrack.com/historical/%{name}-%{version}.tar.gz
-Patch0: httrack-configure-c99.patch
+Source:         http://mirror.httrack.com/historical/%{name}-%{version}.tar.gz
+Patch:          httrack-configure-c99.patch
 BuildRequires:  desktop-file-utils
 BuildRequires:  libtool
+BuildRequires:  make
 BuildRequires:  openssl-devel
 BuildRequires:  zlib-devel
-BuildRequires: make
 Requires:       hicolor-icon-theme
 Requires:       xdg-utils
 
@@ -43,7 +42,6 @@ iconv --from-code ISO8859-1 --to-code UTF-8 ./html/contact.html \
   --output contact.utf-8 && mv contact.utf-8 ./html/contact.html
 
 %build
- %{!?_pkgdocdir: %global _pkgdocdir /usr/share/doc/httrack}
 %configure  --disable-static \
             --disable-online-unit-tests \
             --htmldir=%{_pkgdocdir}/html \
@@ -53,7 +51,7 @@ iconv --from-code ISO8859-1 --to-code UTF-8 ./html/contact.html \
 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}
+%make_build
 
 %install
 %make_install
@@ -72,6 +70,10 @@ mv %{buildroot}%{_datadir}/%{name}/templates %{buildroot}%{_pkgdocdir}/templates
 # Now packaged in %%license
 rm %{buildroot}%{_pkgdocdir}/html/license.txt
 
+# Replace absolute symlink with a relative one to avoid rpmbuild warning
+rm %{buildroot}%{_datadir}/%{name}/html
+ln -s ../doc/%{name}/html %{buildroot}%{_datadir}/%{name}/html
+
 desktop-file-install --delete-original \
   --dir %{buildroot}%{_datadir}/applications \
   %{buildroot}%{_datadir}/applications/WebHTTrack.desktop
@@ -84,43 +86,7 @@ desktop-file-install --delete-original \
 export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
 make check -C tests
 
-%pretrans -p <lua>
---[[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
-
-%ldconfig_scriptlets
-
 %files
-%{!?_licensedir:%global license %doc}
 %{_pkgdocdir}
 %exclude %{_pkgdocdir}/libtest
 %license COPYING license.txt

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-20 22:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-20 22:43 [rpms/httrack] f44: spec cleanup and modernization Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox