wok-current rev 25549

created recipe for lesspipe
author Hans-G?nter Theisgen
date Mon Apr 03 06:53:23 2023 +0100 (20 months ago)
parents 8655cec97854
children f40d97a52c42
files lesspipe/description.txt lesspipe/receipt lesspipe/stuff/patches/lesspipe.sh
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lesspipe/description.txt	Mon Apr 03 06:53:23 2023 +0100
     1.3 @@ -0,0 +1,12 @@
     1.4 +lesspipe.sh is an input filter for the pager less.
     1.5 +It is able to process a wide variety of file formats.
     1.6 +It enables users to deeply inspect archives and to
     1.7 +display the contents of files in archives without
     1.8 +having to unpack them before. That means file contents
     1.9 +can be properly interpreted even if the files are
    1.10 +compressed and contained in a hierarchy of archives
    1.11 +(often found in RPM or DEB archives containing source
    1.12 +tarballs).
    1.13 +The filter is easily extensible for new formats.
    1.14 +The input filter is a bash script, but works as well
    1.15 +as a zsh script.
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/lesspipe/receipt	Mon Apr 03 06:53:23 2023 +0100
     2.3 @@ -0,0 +1,41 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="lesspipe"
     2.7 +VERSION="2.07"
     2.8 +CATEGORY="utilities"
     2.9 +TAGS="less"
    2.10 +SHORT_DESC="Input filter for less to better display files."
    2.11 +MAINTAINER="maintainer@slitaz.org"
    2.12 +LICENSE="GPL"
    2.13 +WEB_SITE="https://github.com/wofr06/lesspipe"
    2.14 +
    2.15 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.16 +WGET_URL="$WEB_SITE/archive/refs/tags/v$VERSION.tar.gz"
    2.17 +
    2.18 +SUGGESTED="bash"
    2.19 +DEPENDS="less"		# busybox less ignores LESSOPEN variable
    2.20 +
    2.21 +HOST_ARCH="any"
    2.22 +
    2.23 +# Rules to configure and make the package.
    2.24 +compile_rules()
    2.25 +{
    2.26 +	# busybox rpm has no option v
    2.27 +	patch --strip=0 --input=$stuff/patches/lesspipe.sh
    2.28 +
    2.29 +	mkdir -p $install/usr/bin
    2.30 +	cp	lesspipe.sh	$install/usr/bin/lesspipe
    2.31 +}
    2.32 +
    2.33 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.34 +genpkg_rules()
    2.35 +{
    2.36 +	cook_copy_folders	bin
    2.37 +}
    2.38 +
    2.39 +post_install()
    2.40 +{
    2.41 +	echo "
    2.42 +To activate lesspipe enter:
    2.43 +export LESSOPEN='|lesspipe %s'"
    2.44 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/lesspipe/stuff/patches/lesspipe.sh	Mon Apr 03 06:53:23 2023 +0100
     3.3 @@ -0,0 +1,11 @@
     3.4 +--- lesspipe.sh.orig
     3.5 ++++ lesspipe.sh
     3.6 +@@ -668,7 +668,7 @@
     3.7 + isrpm () {
     3.8 + 	if [[ -z "$2" ]]; then
     3.9 + 		if has_cmd rpm; then
    3.10 +-			istemp "rpm -qivp" "$1"
    3.11 ++			istemp "rpm -qip" "$1"
    3.12 + 			contentline
    3.13 + 			[[ $1 == - ]] && set "$t" "$1"
    3.14 + 		fi