Skip to content

Commit

Permalink
synocli-file: add nnn file manager (#5003)
Browse files Browse the repository at this point in the history
* nnn: initial diyspk package
- add nnn package to manually build in diyspk
* add nnn to synocli-file
  • Loading branch information
hgy59 authored Jan 24, 2022
1 parent a925578 commit db6ef8e
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 2 deletions.
24 changes: 24 additions & 0 deletions cross/nnn/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
PKG_NAME = nnn
PKG_VERS = 4.4
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/jarun/nnn/releases/download/v$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/ncursesw cross/readline

# compiler too old (-std=c11 required)
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCS) $(ARMv5_ARCHS)

HOMEPAGE = https://github.com/jarun/nnn
COMMENT = n³ The unorthodox terminal file manager.
LICENSE = 2-clause BSD

CONFIGURE_TARGET = nop
INSTALL_TARGET = nnn_install

include ../../mk/spksrc.cross-cc.mk

.PHONY: nnn_install
nnn_install:
@$(RUN) $(MAKE) install DESTDIR=$(INSTALL_DIR) PREFIX=$(INSTALL_PREFIX)
2 changes: 2 additions & 0 deletions cross/nnn/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin:bin/nnn

3 changes: 3 additions & 0 deletions cross/nnn/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nnn-v4.4.tar.gz SHA1 5ff16a0513a3f1ad0000cf0d4fb8c5677b73629d
nnn-v4.4.tar.gz SHA256 e04a3f0f0c2af1e18cb6f005d18267c7703644274d21bb93f03b30e4fd3d1653
nnn-v4.4.tar.gz MD5 3f5d7734648c9c0993131efe4158f1b8
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# older toolchains do not support _FILE_OFFSET_BITS=64 for 32-bit archs,
# only DSM 7+ toolchains do.
#
# /sysroot/usr/include/fts.h:41:3: error: #error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
#
--- src/nnn.c.orig 2021-11-23 13:03:45.000000000 +0000
+++ src/nnn.c 2021-12-16 19:45:28.030685890 +0000
@@ -33,9 +33,6 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
-#if defined(__arm__) || defined(__i386__)
-#define _FILE_OFFSET_BITS 64 /* Support large files on 32-bit */
-#endif
#if defined(__linux__)
#include <sys/inotify.h>
#define LINUX_INOTIFY
19 changes: 19 additions & 0 deletions diyspk/nnn/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SPK_NAME = nnn
SPK_VERS = 4.4
SPK_REV = 1
SPK_ICON = src/nnn.png

DEPENDS = cross/nnn

MAINTAINER = SynoCommunity
DESCRIPTION = n³ The unorthodox terminal file manager.
DISPLAY_NAME = n³
STARTABLE = no
CHANGELOG = "Initial package release"

HOMEPAGE = https://github.com/jarun/nnn
LICENSE = 2-clause BSD

SPK_COMMANDS = bin/nnn

include ../../mk/spksrc.spk.mk
Binary file added diyspk/nnn/src/nnn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions spk/synocli-file/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ DEPENDS += cross/detox
DEPENDS += cross/lzip cross/plzip
DEPENDS += cross/mg
DEPENDS += cross/jupp
DEPENDS += cross/nnn

OPTIONAL_DEPENDS = cross/rmlint cross/rnm cross/micro cross/fzf cross/ripgrep cross/fd cross/bat cross/exa

Expand Down Expand Up @@ -60,9 +61,9 @@ endif
PCRE2_CLI_FULL = 1
export PCRE2_CLI_FULL

DESCRIPTION = "SynoCli File Tools provides a set of small command-line utilities: less, tree, ncdu, jdupes, fdupes, rhash, mc \(midnight commander\), mg \(emacs-like text editor\), nano, jupp \(based on JOE - Joe\'s Own Editor 3.1\), file, detox, pcre2, zstd, lzip, plzip, detox$(OPTIONAL_DESC)."
DESCRIPTION = "SynoCli File Tools provides a set of small command-line utilities: less, tree, ncdu, jdupes, fdupes, rhash, mc \(midnight commander\), nnn (n³), mg \(emacs-like text editor\), nano, jupp \(based on JOE - Joe\'s Own Editor 3.1\), file, detox, pcre2, zstd, lzip, plzip, detox$(OPTIONAL_DESC)."
STARTABLE = no
CHANGELOG = "1. Add jupp editor."
CHANGELOG = "1. Add jupp editor.<br/>2. Add nnn (n³) file manager."

SERVICE_SETUP = src/service-setup.sh

Expand Down Expand Up @@ -91,6 +92,7 @@ SPK_COMMANDS += bin/mg
SPK_COMMANDS += bin/bat
SPK_COMMANDS += bin/exa
SPK_COMMANDS += bin/jmacs bin/joe bin/jpico bin/jstar bin/jupp bin/rjoe
SPK_COMMANDS += bin/nnn

SPK_COMMANDS += bin/rhash
SPK_COMMANDS += bin/ed2k-link
Expand Down

0 comments on commit db6ef8e

Please sign in to comment.