[packages/lesspipe] Switch to maintained lesspipe. Version 2.07
arekm
arekm at pld-linux.org
Thu Jun 8 15:58:33 CEST 2023
commit 8d50801607c24c5e34d52a719a1432b8af4104c1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Jun 8 15:58:07 2023 +0200
Switch to maintained lesspipe. Version 2.07
lesspipe.spec | 51 +++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 43 insertions(+), 8 deletions(-)
---
diff --git a/lesspipe.spec b/lesspipe.spec
index 76ed4b7..45898f8 100644
--- a/lesspipe.spec
+++ b/lesspipe.spec
@@ -1,15 +1,16 @@
-# TODO
-# - consider this version (with code2color etc.):
-# http://www-zeuthen.desy.de/~friebel/unix/lesspipe.html
+%bcond_without tests
#
Summary: Input preprocessor for less
Summary(pl.UTF-8): Preprocesor wejścia dla narzędzia less
Name: lesspipe
-Version: 1.57
-Release: 4
+Version: 2.07
+Release: 1
License: GPL v2
Group: Applications/Text
-Source0: %{name}.sh
+Source0: https://github.com/wofr06/lesspipe/archive/refs/tags/v%{version}.tar.gz
+# Source0-md5: 37325c7c0f3e43791882774f5b60bb9a
+URL: https://www-zeuthen.desy.de/~friebel/unix/lesspipe.html
+BuildRequires: perl-base
BuildRequires: rpmbuild(macros) >= 1.316
Suggests: file
Suggests: gnupg
@@ -42,11 +43,38 @@ Ten pakiet zawiera skrypt z PLD Linuksa wyświetlający zawartość
różnych archiwów w sposób czytelny dla człowieka.
%prep
+%setup -q
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
+ archive_color \
+ code2color \
+ sxw2txt \
+ vimcolor
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\1,' \
+ lesscomplete
+
+%build
+./configure \
+ --prefix=%{_prefix} \
+ --shell=/bin/bash
+
+%{__make}
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\1,' \
+ lesspipe.sh
+
+%if %{with tests}
+%{__make} test
+%endif
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},/etc/env.d}
-install -p %{SOURCE0} $RPM_BUILD_ROOT%{_bindir}
+
+install -d $RPM_BUILD_ROOT/etc/env.d
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
# Prepare env file
cat > $RPM_BUILD_ROOT/etc/env.d/LESSOPEN <<'EOF'
@@ -65,4 +93,11 @@ 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}/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/*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lesspipe.git/commitdiff/8d50801607c24c5e34d52a719a1432b8af4104c1
More information about the pld-cvs-commit
mailing list