public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/links] rawhide: spec cleanup and modernization
@ 2026-06-09 3:09 Filipe Rosset
0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-06-09 3:09 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/links
Branch : rawhide
Commit : 191ca09e38e6bbd495c0f9a5b96b24a2d6bf2f77
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date : 2026-06-09T00:09:10-03:00
Stats : +30/-51 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/links/c/191ca09e38e6bbd495c0f9a5b96b24a2d6bf2f77?branch=rawhide
Log:
spec cleanup and modernization
---
diff --git a/.gitignore b/.gitignore
index 7214ba7..5a6e395 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1 @@
-links-2.2.tar.bz2
-/links-2.6.tar.bz2
-/links-2.7.tar.bz2
-/links-2.8.tar.bz2
-/links-2.9.tar.bz2
-/links-2.10.tar.bz2
-/links-2.12.tar.bz2
-/links-2.13.tar.bz2
-/links-2.14.tar.bz2
-/links-2.17.tar.bz2
-/links-2.20.2.tar.bz2
-/links-2.30.tar.bz2
+/links-*.tar.bz2
diff --git a/links.desktop b/links.desktop
index 821f5e0..04718be 100644
--- a/links.desktop
+++ b/links.desktop
@@ -1,6 +1,5 @@
[Desktop Entry]
Version=1.0
-Encoding=UTF-8
Name=Links
Comment=Simple Web Browser
Exec=links2 -g %u
@@ -8,3 +7,4 @@ Icon=links
Categories=Network;WebBrowser;
Type=Application
MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
+
diff --git a/links.spec b/links.spec
index c5b6c63..db291c6 100644
--- a/links.spec
+++ b/links.spec
@@ -7,7 +7,7 @@ License: GPL-2.0-or-later
URL: https://links.twibright.com/
Source0: https://links.twibright.com/download/%{name}-%{version}.tar.bz2
Source1: links.desktop
-Patch0: links-gcc16.patch
+Patch: links-gcc16.patch
BuildRequires: autoconf
BuildRequires: automake
@@ -17,7 +17,7 @@ BuildRequires: gcc
BuildRequires: gpm-devel
BuildRequires: libavif-devel
BuildRequires: libevent-devel
-BuildRequires: libjpeg-devel
+BuildRequires: libjpeg-turbo-devel
BuildRequires: libpng-devel
BuildRequires: librsvg2-devel
BuildRequires: libtiff-devel
@@ -27,13 +27,11 @@ BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: zlib-devel
-Requires(post): %{_sbindir}/alternatives
-Requires(postun): %{_sbindir}/alternatives
-Requires(preun): %{_sbindir}/alternatives
+Requires(post): %{_sbindir}/update-alternatives
+Requires(preun): %{_sbindir}/update-alternatives
Provides: webclient
-
%description
Links is a web browser capable of running in either graphics or text mode.
It provides a pull-down menu system, renders complex pages, has partial HTML
@@ -41,58 +39,50 @@ It provides a pull-down menu system, renders complex pages, has partial HTML
and UTF-8), supports color and monochrome terminals and allows horizontal
scrolling.
-
%prep
-%autosetup
-
-
-%build
+%autosetup -p1
iconv -f ISO-8859-1 -t UTF-8 AUTHORS >converted.AUTHORS
touch -r AUTHORS converted.AUTHORS
mv converted.AUTHORS AUTHORS
+%build
%configure --enable-graphics --with-ssl
%make_build
-
%install
%make_install
-mv %{buildroot}/%{_bindir}/links $RPM_BUILD_ROOT/%{_bindir}/links2
-mv %{buildroot}/%{_mandir}/man1/links.1 $RPM_BUILD_ROOT/%{_mandir}/man1/links2.1
-desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE1}
-install -D -p Links_logo.png %{buildroot}/%{_datadir}/pixmaps/links.png
-
-
-%postun
-[ $1 = 0 ] && exit 0
-[ $(readlink %{_sysconfdir}/alternatives/links) = %{_bindir}/links2 ] &&
- %{_sbindir}/alternatives --set links %{_bindir}/links2
-exit 0
-
-
-%preun
-[ $1 = 0 ] || exit 0
-%{_sbindir}/alternatives --remove links %{_bindir}/links2
+mv %{buildroot}%{_bindir}/links %{buildroot}%{_bindir}/links2
+mv %{buildroot}%{_mandir}/man1/links.1 %{buildroot}%{_mandir}/man1/links2.1
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
+install -D -p Links_logo.png %{buildroot}%{_datadir}/pixmaps/links.png
+%check
+desktop-file-validate %{buildroot}%{_datadir}/applications/links.desktop
%post
-%{_sbindir}/alternatives \
- --install %{_bindir}/links links %{_bindir}/links2 80 \
- --slave %{_mandir}/man1/links.1.gz links-man %{_mandir}/man1/links2.1.gz
-[ $(readlink %{_sysconfdir}/alternatives/links) = %{_bindir}/links2 ] &&
- %{_sbindir}/alternatives --set links %{_bindir}/links2
-exit 0
+for ext in .gz .zst .bz2 .xz ""; do
+ if [ -f %{_mandir}/man1/links2.1${ext} ]; then
+ %{_sbindir}/update-alternatives \
+ --install %{_bindir}/links links %{_bindir}/links2 80 \
+ --slave %{_mandir}/man1/links.1${ext} links-man %{_mandir}/man1/links2.1${ext}
+ break
+ fi
+done
+%preun
+if [ $1 -eq 0 ] ; then
+ %{_sbindir}/update-alternatives --remove links %{_bindir}/links2
+fi
%files
-%doc doc/* AUTHORS KEYS README COPYING
+%license COPYING
+%doc doc/* AUTHORS KEYS README
%{_bindir}/links2
%{_mandir}/man1/links2.1*
%{_datadir}/pixmaps/links.png
%{_datadir}/applications/links.desktop
-%ghost %attr(0755,root,root) %{_bindir}/links
-%ghost %attr(0644,root,root) %{_mandir}/man1/links.1.gz
-
+%ghost %{_bindir}/links
+%ghost %{_mandir}/man1/links.1*
%changelog
%autochangelog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-09 3:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-09 3:09 [rpms/links] rawhide: 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