diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-05-07 06:01:51 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-05-07 06:01:51 -0300 |
commit | 9d145c3557f5021beb48fcd874cc015dd871c25d (patch) | |
tree | b5affcce68be0dd21f7f53e0d46c124d04545715 /libre/lesspipe-libre | |
parent | 91188d9c9957103b52a2a0acc70b23284e397b49 (diff) |
lesspipe-libre: add new package to [libre]
Diffstat (limited to 'libre/lesspipe-libre')
-rw-r--r-- | libre/lesspipe-libre/PKGBUILD | 53 | ||||
-rw-r--r-- | libre/lesspipe-libre/lesspipe.sh | 1 | ||||
-rw-r--r-- | libre/lesspipe-libre/libarchive.patch | 100 |
3 files changed, 154 insertions, 0 deletions
diff --git a/libre/lesspipe-libre/PKGBUILD b/libre/lesspipe-libre/PKGBUILD new file mode 100644 index 000000000..c42a8e976 --- /dev/null +++ b/libre/lesspipe-libre/PKGBUILD @@ -0,0 +1,53 @@ +# $Id: PKGBUILD 83837 2013-02-05 15:58:20Z spupykin $ +# Maintainer: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve> +# Contributor: solsTiCe d'Hiver <solstice.dhiver@gmail.com> +# Maintainer (Parabola): André Silva <emulatorman@parabola.nu> + +_pkgname=lesspipe +pkgname=lesspipe-libre +pkgver=1.82 +pkgrel=1 +pkgdesc='an input filter for the pager less, with libarchive support' +depends=('less') +arch=('any') +license=('GPL') +replaces=$_pkgname +conflicts=$_pkgname +provides=$_pkgname=$pkgver +optdepends=('perl' + 'rpmextract: support for rpm files' + 'fastjar: support for jar files' + 'unzip: support for zip files' + 'libarchive: support for rar files' + 'p7zip: support for 7za files' + 'cabextract: support for cab files' + 'cdrkit: support for iso files' + 'html2text: support for html files' + 'antiword: support for word file' + 'unrtf: support for rtf file' + 'imagemagick: support for some image file') +url="http://www-zeuthen.desy.de/~friebel/unix/lesspipe.html" +source=(http://downloads.sourceforge.net/project/lesspipe/lesspipe/$pkgver/lesspipe-$pkgver.tar.gz + lesspipe.sh + libarchive.patch) +md5sums=('dd6f7bc9b9f9afaf04c9aa0cdbe9fe56' + '675b56f560c600f43108adfd98222251' + 'ec452ea980d5c1e254e9775fd424c18c') + +prepare() { + cd $srcdir/$_pkgname-$pkgver + patch -Np1 -i ../libarchive.patch +} + +build() { + cd $srcdir/$_pkgname-$pkgver + ./configure --prefix=/usr --yes + make +} + +package() { + cd $srcdir/$_pkgname-$pkgver + mkdir -p $pkgdir/usr/share/man/man1 + make install PREFIX=$pkgdir/usr + install -D $srcdir/lesspipe.sh $pkgdir/etc/profile.d/lesspipe.sh +} diff --git a/libre/lesspipe-libre/lesspipe.sh b/libre/lesspipe-libre/lesspipe.sh new file mode 100644 index 000000000..ae6076f6b --- /dev/null +++ b/libre/lesspipe-libre/lesspipe.sh @@ -0,0 +1 @@ +export LESSOPEN='|/usr/bin/lesspipe.sh %s' diff --git a/libre/lesspipe-libre/libarchive.patch b/libre/lesspipe-libre/libarchive.patch new file mode 100644 index 000000000..b4fb48788 --- /dev/null +++ b/libre/lesspipe-libre/libarchive.patch @@ -0,0 +1,100 @@ +diff --git a/configure b/configure +index cbd34af..5df4a31 100755 +--- a/configure ++++ b/configure +@@ -405,8 +405,7 @@ LESS_ADVANCED_PREPROCESSOR N # always interpret textlike files (html, ...) + # compression programs + bzip2 Y # include bzip2 and unzip code, it is fairly essential + unzip Y +-rar Y +-unrar Y ++bsdtar Y # bsdtar is the best free as in freedom alternative for rar + lzip N # default for lzma, lzip, xz, 7za should probably be N + lzma Y + xz Y +diff --git a/lesspipe.sh b/lesspipe.sh +index c80c75b..262a47b 100755 +--- a/lesspipe.sh ++++ b/lesspipe.sh +@@ -276,12 +276,8 @@ get_cmd () { + cmd=(isrpm "$2" "$file2") + elif [[ "$1" = *Zip* || "$1" = *ZIP* ]] && cmd_exist unzip; then + cmd=(istemp "unzip -avp" "$2" "$file2") +- elif [[ "$1" = *RAR\ archive* ]]; then +- if cmd_exist unrar; then +- cmd=(istemp "unrar p -inul" "$2" "$file2") +- elif cmd_exist rar; then +- cmd=(istemp "rar p -inul" "$2" "$file2") +- fi ++ elif [[ "$1" = *RAR\ archive* ]] && cmd_exist bsdtar; then ++ cmd=(bsdtar xOf "$2" "$file2") + elif [[ "$1" = *7-zip\ archive* || "$1" = *7z\ archive* ]] && cmd_exist 7za; then + cmd=(istemp "7za e -so" "$2" "$file2") + elif [[ "$1" = *7-zip\ archive* || "$1" = *7z\ archive* ]] && cmd_exist 7zr; then +@@ -534,14 +530,9 @@ isfinal() { + elif [[ "$1" = *Zip* || "$1" = *ZIP* ]] && cmd_exist unzip; then + msg "use zip_file${sep}contained_file to view a file in the archive" + istemp "unzip -lv" "$2" +- elif [[ "$1" = *RAR\ archive* ]]; then +- if cmd_exist unrar; then +- msg "use rar_file${sep}contained_file to view a file in the archive" +- istemp "unrar v" "$2" +- elif cmd_exist rar; then +- msg "use rar_file${sep}contained_file to view a file in the archive" +- istemp "rar v" "$2" +- fi ++ elif [[ "$1" = *RAR\ archive* ]] && cmd_exist bsdtar; then ++ msg "use rar_file${sep}contained_file to view a file in the archive" ++ bsdtar tf "$2" + elif [[ "$1" = *7-zip\ archive* || "$1" = *7z\ archive* ]] && cmd_exist 7za; then + typeset res + res=$(istemp "7za l" "$2") +diff --git a/lesspipe.sh.in b/lesspipe.sh.in +index 407bc7d..753f3c5 100755 +--- a/lesspipe.sh.in ++++ b/lesspipe.sh.in +@@ -323,17 +323,10 @@ get_cmd () { + elif [[ "$1" = *Zip* || "$1" = *ZIP* ]] && cmd_exist unzip; then + set -A cmd istemp "unzip -avp" "$2" "$file2" + #endif +-#ifdef unrar +- elif [[ "$1" = *RAR\ archive* ]]; then +- if cmd_exist unrar; then +- set -A cmd istemp "unrar p -inul" "$2" "$file2" +- elif cmd_exist rar; then +- set -A cmd istemp "rar p -inul" "$2" "$file2" +- fi +-#elif rar +- elif [[ "$1" = *RAR\ archive* ]] && cmd_exist rar; then +- set -A cmd istemp "rar p -inul" "$2" "$file2" +-#endif ++#ifdef bsdtar ++ elif [[ "$1" = *RAR\ archive* ]] && cmd_exist bsdtar; then ++ set -A cmd bsdtar xOf "$2" "$file2" ++#endif + #ifdef 7za + elif [[ "$1" = *7-zip\ archive* || "$1" = *7z\ archive* ]] && cmd_exist 7za; then + set -A cmd istemp "7za e -so" "$2" "$file2" +@@ -705,19 +698,10 @@ isfinal() { + msg "use zip_file${sep}contained_file to view a file in the archive" + istemp "unzip -lv" "$2" + #endif +-#ifdef unrar +- elif [[ "$1" = *RAR\ archive* ]]; then +- if cmd_exist unrar; then +- msg "use rar_file${sep}contained_file to view a file in the archive" +- istemp "unrar v" "$2" +- elif cmd_exist rar; then +- msg "use rar_file${sep}contained_file to view a file in the archive" +- istemp "rar v" "$2" +- fi +-#elif rar +- elif [[ "$1" = *RAR\ archive* ]] && cmd_exist rar; then ++#ifdef bsdtar ++ elif [[ "$1" = *RAR\ archive* ]] && cmd_exist bsdtar; then + msg "use rar_file${sep}contained_file to view a file in the archive" +- istemp "rar v" "$2" ++ bsdtar tf "$2" + #endif + #ifdef 7za + elif [[ "$1" = *7-zip\ archive* || "$1" = *7z\ archive* ]] && cmd_exist 7za; then |