[packages/lesspipe] - patch to fix bash completions dir, package completions
qboosh
qboosh at pld-linux.org
Sun Mar 23 12:59:40 CET 2025
commit 1561866c2291428ba1b8aeb6cb8a22e253f48ea6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 23 12:07:23 2025 +0100
- patch to fix bash completions dir, package completions
lesspipe-completionsdir.patch | 15 +++++++++++++++
lesspipe.spec | 15 ++++++++++-----
2 files changed, 25 insertions(+), 5 deletions(-)
---
diff --git a/lesspipe.spec b/lesspipe.spec
index 26ac9cd..9830e2f 100644
--- a/lesspipe.spec
+++ b/lesspipe.spec
@@ -7,11 +7,15 @@ Version: 2.18
Release: 1
License: GPL v2
Group: Applications/Text
+#Source0Download: https://github.com/wofr06/lesspipe/releases
+# TODO: use named tarballs:
+#Source0: https://github.com/wofr06/lesspipe/archive/v%{version}/%{name}-%{version}.tar.gz
Source0: https://github.com/wofr06/lesspipe/archive/refs/tags/v%{version}.tar.gz
# Source0-md5: f0619d594621a27ed84c4136f14d412f
+Patch0: %{name}-completionsdir.patch
URL: https://www-zeuthen.desy.de/~friebel/unix/lesspipe.html
BuildRequires: perl-base
-BuildRequires: rpmbuild(macros) >= 1.316
+BuildRequires: rpmbuild(macros) >= 1.719
Suggests: file
Suggests: gnupg
Suggests: highlight >= 3.0
@@ -44,6 +48,7 @@ różnych archiwów w sposób czytelny dla człowieka.
%prep
%setup -q
+%patch -P0 -p1
%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
archive_color \
@@ -70,7 +75,6 @@ różnych archiwów w sposób czytelny dla człowieka.
%install
rm -rf $RPM_BUILD_ROOT
-
install -d $RPM_BUILD_ROOT/etc/env.d
%{__make} install \
@@ -92,12 +96,13 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/%{name}.sh
%attr(755,root,root) %{_bindir}/archive_color
%attr(755,root,root) %{_bindir}/code2color
%attr(755,root,root) %{_bindir}/lesscomplete
+%attr(755,root,root) %{_bindir}/lesspipe.sh
%attr(755,root,root) %{_bindir}/sxw2txt
%attr(755,root,root) %{_bindir}/vimcolor
-#%{_datadir}/bash-completion/less_completion
%{_mandir}/man1/lesspipe.1*
-%config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/*
+%config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/LESSOPEN
+%{bash_compdir}/less_completion
+%{zsh_compdir}/_less
diff --git a/lesspipe-completionsdir.patch b/lesspipe-completionsdir.patch
new file mode 100644
index 0000000..52c7ccb
--- /dev/null
+++ b/lesspipe-completionsdir.patch
@@ -0,0 +1,15 @@
+--- lesspipe-2.18/configure.orig 2025-02-16 21:25:26.000000000 +0100
++++ lesspipe-2.18/configure 2025-03-23 12:04:07.106017531 +0100
+@@ -141,10 +141,10 @@ install:
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
+ mkdir -p $(DESTDIR)$(PREFIX)/share/zsh/site-functions
+- mkdir -p $(DESTDIR)$(PREFIX)/share/bash-completion/
++ mkdir -p $(DESTDIR)$(PREFIX)/share/bash-completion/completions
+ cp ./code2color ./sxw2txt ./archive_color ./lesspipe.sh ./vimcolor ./lesscomplete $(DESTDIR)$(PREFIX)/bin
+ cp ./lesspipe.1 $(DESTDIR)$(PREFIX)/share/man/man1
+- cp ./less_completion $(DESTDIR)$(PREFIX)/share/bash-completion/
++ cp ./less_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions
+ cp ./_less $(DESTDIR)$(PREFIX)/share/zsh/site-functions
+ chmod 0755 $(DESTDIR)$(PREFIX)/bin/lesspipe.sh
+ chmod 0755 $(DESTDIR)$(PREFIX)/bin/sxw2txt
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lesspipe.git/commitdiff/1561866c2291428ba1b8aeb6cb8a22e253f48ea6
More information about the pld-cvs-commit
mailing list