diff options
author | Damian Perticone <mjolnirdam@gmail.com> | 2022-09-27 03:26:48 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-10-01 09:01:13 +0700 |
commit | 7c5c0df2a20112be62d0577e486cba77550b3389 (patch) | |
tree | e5866b7774dad5a0f0883847555e0bfc37852a64 /system/lf | |
parent | cb36075e230b7c183ddb29d2b2af1e0ceedba053 (diff) |
system/lf: Added (terminal file manager written in Go)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/lf')
-rw-r--r-- | system/lf/README | 22 | ||||
-rw-r--r-- | system/lf/lf.SlackBuild | 116 | ||||
-rw-r--r-- | system/lf/lf.info | 28 | ||||
-rw-r--r-- | system/lf/modules.txt | 60 | ||||
-rw-r--r-- | system/lf/slack-desc | 19 |
5 files changed, 245 insertions, 0 deletions
diff --git a/system/lf/README b/system/lf/README new file mode 100644 index 000000000000..e88412aa2653 --- /dev/null +++ b/system/lf/README @@ -0,0 +1,22 @@ +lf (as in "list files") is a terminal file manager written in Go with +a heavy inspiration from ranger file manager. + +Features: + +•Cross-platform (Linux, MacOS, BSDs, Windows) +•Single binary without any runtime dependencies +•Fast startup and low memory footprint due to native code and static + binaries +•Asynchronous IO operations to avoid UI locking +•Server/client architecture and remote commands to manage multiple + instances +•Extendable and configurable with shell commands +•Customizable keybindings (vi and readline defaults) +•A reasonable set of other features + +Usage: + +After the installation lf command should start the application in the +current directory. +Run lf -help to see command line options. +Run lf -doc diff --git a/system/lf/lf.SlackBuild b/system/lf/lf.SlackBuild new file mode 100644 index 000000000000..ec1264205640 --- /dev/null +++ b/system/lf/lf.SlackBuild @@ -0,0 +1,116 @@ +#!/bin/bash + +# Slackware build script for lf + +# Copyright 2022, Damian Perticone, Berisso, Argentina +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=lf +VERSION=${VERSION:-r27} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION + +mkdir -p vendor +cat $CWD/modules.txt > vendor/modules.txt +for DIR in $(grep -o "^# .* " vendor/modules.txt | cut -d' ' -f2) +do + NAME=$(echo $DIR | sed 's/[./]v[0-9]\+$//' | xargs basename) + DIR=vendor/$DIR + tar xvf $CWD/$NAME-*.tar.gz + mkdir -p $(dirname $DIR) + mv $NAME-* $DIR +done + +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CGO_CFLAGS="$SLKCFLAGS" \ +CGO_CXXFLAGS="$SLKCFLAGS" \ +go build -mod vendor + +# install the binary +install -sDm 0755 lf -t $PKG/usr/bin +# vim integration +install -vDm644 etc/lf.vim -t $PKG/usr/share/vim/vimfiles/syntax +install -vDm644 etc/lf.vim -t $PKG/usr/share/vim/vimfiles/ftdetect +# shell integrations +install -vDm644 etc/*.{sh,csh} -t $PKG/etc/profile.d +install -vDm644 etc/lfcd.fish -t $PKG/usr/share/fish/vendor_functions.d +# shell completions +install -vDm644 etc/lf.bash $PKG/usr/share/bash/bash-completion/completions/lf +install -vDm644 etc/lf.fish $PKG/usr/share/fish/vendor_completions.d/lf.fish +install -vDm644 etc/lf.zsh $PKG/usr/share/zsh/site-functions/_lf + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/lf/lf.info b/system/lf/lf.info new file mode 100644 index 000000000000..43218ef4eee0 --- /dev/null +++ b/system/lf/lf.info @@ -0,0 +1,28 @@ +PRGNAM="lf" +VERSION="r27" +HOMEPAGE="https://github.com/gokcehan/lf" +DOWNLOAD="https://github.com/gokcehan/lf/archive/r27/lf-r27.tar.gz \ + https://github.com/gdamore/encoding/archive/v1.0.0/encoding-1.0.0.tar.gz \ + https://github.com/gdamore/tcell/archive/v2.3.1/tcell-2.3.1.tar.gz \ + https://github.com/lucasb-eyer/go-colorful/archive/v1.0.3/go-colorful-1.0.3.tar.gz \ + https://github.com/mattn/go-runewidth/archive/v0.0.10/go-runewidth-0.0.10.tar.gz \ + https://github.com/rivo/uniseg/archive/v0.1.0/uniseg-0.1.0.tar.gz \ + https://github.com/golang/sys/archive/3681064/sys-3681064d51587c1db0324b3d5c23c2ddbcff6e8f.tar.gz \ + https://github.com/golang/term/archive/6a3ed07/term-6a3ed077a48de71621ad530f9078fffa0bc0ce3223.tar.gz \ + https://github.com/golang/text/archive/v0.3.0/text-0.3.0.tar.gz \ + https://github.com/djherbis/times/archive/v1.2.0/times-1.2.0.tar.gz" +MD5SUM="d66e29ae9802f085dd6d2fcc58e6828e \ + fbadc383bc1ace79fa769fe2de36b87b \ + 8eab14d0753c02958e8045a934fde30f \ + 2a1b88991050673c3928342c11d404ae \ + e281e1ebbc883373e70c1e1086352dd8 \ + 011091eb1591edeab5930738dde793bc \ + 406355209c54747f022e04bbd2983c91 \ + c1bc1286e1f84a217d4531ef3869962b \ + 3cc27641fa0f4cbcf3c8497b1c823d7d \ + 47b93f96cb258822a3d73d3332731919" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="google-go-lang" +MAINTAINER="Damian Perticone" +EMAIL="mjolnirdam@gmail.com" diff --git a/system/lf/modules.txt b/system/lf/modules.txt new file mode 100644 index 000000000000..19e1fc4082b0 --- /dev/null +++ b/system/lf/modules.txt @@ -0,0 +1,60 @@ +# github.com/gdamore/encoding v1.0.0 +github.com/gdamore/encoding +# github.com/gdamore/tcell/v2 v2.3.1 +github.com/gdamore/tcell/v2 +github.com/gdamore/tcell/v2/terminfo +github.com/gdamore/tcell/v2/terminfo/a/aixterm +github.com/gdamore/tcell/v2/terminfo/a/alacritty +github.com/gdamore/tcell/v2/terminfo/a/ansi +github.com/gdamore/tcell/v2/terminfo/b/beterm +github.com/gdamore/tcell/v2/terminfo/base +github.com/gdamore/tcell/v2/terminfo/c/cygwin +github.com/gdamore/tcell/v2/terminfo/d/dtterm +github.com/gdamore/tcell/v2/terminfo/dynamic +github.com/gdamore/tcell/v2/terminfo/e/emacs +github.com/gdamore/tcell/v2/terminfo/extended +github.com/gdamore/tcell/v2/terminfo/g/gnome +github.com/gdamore/tcell/v2/terminfo/h/hpterm +github.com/gdamore/tcell/v2/terminfo/k/konsole +github.com/gdamore/tcell/v2/terminfo/k/kterm +github.com/gdamore/tcell/v2/terminfo/l/linux +github.com/gdamore/tcell/v2/terminfo/p/pcansi +github.com/gdamore/tcell/v2/terminfo/r/rxvt +github.com/gdamore/tcell/v2/terminfo/s/screen +github.com/gdamore/tcell/v2/terminfo/s/simpleterm +github.com/gdamore/tcell/v2/terminfo/s/sun +github.com/gdamore/tcell/v2/terminfo/t/termite +github.com/gdamore/tcell/v2/terminfo/t/tmux +github.com/gdamore/tcell/v2/terminfo/v/vt100 +github.com/gdamore/tcell/v2/terminfo/v/vt102 +github.com/gdamore/tcell/v2/terminfo/v/vt220 +github.com/gdamore/tcell/v2/terminfo/v/vt320 +github.com/gdamore/tcell/v2/terminfo/v/vt400 +github.com/gdamore/tcell/v2/terminfo/v/vt420 +github.com/gdamore/tcell/v2/terminfo/v/vt52 +github.com/gdamore/tcell/v2/terminfo/w/wy50 +github.com/gdamore/tcell/v2/terminfo/w/wy60 +github.com/gdamore/tcell/v2/terminfo/w/wy99_ansi +github.com/gdamore/tcell/v2/terminfo/x/xfce +github.com/gdamore/tcell/v2/terminfo/x/xterm +github.com/gdamore/tcell/v2/terminfo/x/xterm_kitty +github.com/gdamore/tcell/v2/terminfo/x/xterm_termite +# github.com/lucasb-eyer/go-colorful v1.0.3 +github.com/lucasb-eyer/go-colorful +# github.com/mattn/go-runewidth v0.0.10 +github.com/mattn/go-runewidth +# github.com/rivo/uniseg v0.1.0 +github.com/rivo/uniseg +# golang.org/x/sys v0.0.0-20220209214540-3681064d5158 +golang.org/x/sys/internal/unsafeheader +golang.org/x/sys/plan9 +golang.org/x/sys/unix +golang.org/x/sys/windows +# golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d +golang.org/x/term +# golang.org/x/text v0.3.0 +golang.org/x/text/encoding +golang.org/x/text/encoding/internal/identifier +golang.org/x/text/transform +# gopkg.in/djherbis/times.v1 v1.2.0 +gopkg.in/djherbis/times.v1 diff --git a/system/lf/slack-desc b/system/lf/slack-desc new file mode 100644 index 000000000000..a911f530cfc0 --- /dev/null +++ b/system/lf/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +lf: lf (terminal file manager written in Go) +lf: +lf: Lf as in "list files" is a terminal file manager written in Go with +lf: a heavy inspiration from ranger file manager. +lf: +lf: +lf: +lf: +lf: +lf: Home: https://github.com/gokcehan/lf +lf: |