Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synocli-file: add rust tools 'bat' and 'exa' #4942

Merged
merged 3 commits into from
Oct 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions cross/bat/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
PKG_NAME = bat
PKG_VERS = 0.18.3
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/sharkdp/bat/archive/refs/tags
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/zlib-ng

# git2 package not supported
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS)

HOMEPAGE = https://github.com/sharkdp/bat
COMMENT = A cat(1) clone with wings.
LICENSE = MIT or Apache 2.0

include ../../mk/spksrc.cross-rust.mk
1 change: 1 addition & 0 deletions cross/bat/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin:bin/bat
3 changes: 3 additions & 0 deletions cross/bat/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bat-0.18.3.tar.gz SHA1 7dd2945af10ba8570b4a9b7418ba8353fd64f9d8
bat-0.18.3.tar.gz SHA256 dff7fa5222f40c7b3c783d3ceb0c3ffb35662f1198b00d785f80f3f1523399dd
bat-0.18.3.tar.gz MD5 df1b1e7cc3ea8922f6a287b5c2abb413
18 changes: 18 additions & 0 deletions cross/exa/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
PKG_NAME = exa
PKG_VERS = 0.10.1
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/ogham/exa/archive/refs/tags
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/zlib-ng

# git2 package not supported
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS)

HOMEPAGE = https://the.exa.website/
COMMENT = A modern replacement for ‘ls’.
LICENSE = MIT

include ../../mk/spksrc.cross-rust.mk
1 change: 1 addition & 0 deletions cross/exa/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin:bin/exa
3 changes: 3 additions & 0 deletions cross/exa/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exa-0.10.1.tar.gz SHA1 2a0645a9bcf63fd52cbd73213628b835dc20b14c
exa-0.10.1.tar.gz SHA256 ff0fa0bfc4edef8bdbbb3cabe6fdbd5481a71abbbcc2159f402dea515353ae7c
exa-0.10.1.tar.gz MD5 01f0ac8192de592f8db0acc99c101429
24 changes: 24 additions & 0 deletions cross/zlib-ng/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
PKG_NAME = zlib-ng
PKG_VERS = 2.0.5
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/zlib-ng/zlib-ng/archive/refs/tags
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

# ARMv5_ARCHS might get fixed (see https://github.com/zlib-ng/zlib-ng/issues/1054)
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS)

include ../../mk/spksrc.archs.mk

ifneq ($(findstring $(ARCH),$(DSM_ARMv7_ARCHS)),$(ARCH))
CMAKE_ARGS += -DWITH_ACLE=no
endif

HOMEPAGE = https://github.com/zlib-ng/zlib-ng
COMMENT = zlib replacement with optimizations for "next generation" systems.
LICENSE = zlib-license

include ../../mk/spksrc.cross-cmake.mk
3 changes: 3 additions & 0 deletions cross/zlib-ng/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lnk:lib/libz-ng.so
lnk:lib/libz-ng.so.2
lib:lib/libz-ng.so.2.0.5
3 changes: 3 additions & 0 deletions cross/zlib-ng/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
zlib-ng-2.0.5.tar.gz SHA1 66560fe2c3517d797fff1d1e28c4386c0e9c1f39
zlib-ng-2.0.5.tar.gz SHA256 eca3fe72aea7036c31d00ca120493923c4d5b99fe02e6d3322f7c88dbdcd0085
zlib-ng-2.0.5.tar.gz MD5 6c17fa8456627d60dd1332a32d8e98bb
19 changes: 19 additions & 0 deletions diyspk/bat/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SPK_NAME = bat
SPK_VERS = 13.0.0
SPK_REV = 1

DEPENDS = cross/$(SPK_NAME)

UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS)

MAINTAINER = SynoCommunity
DESCRIPTION = A cat(1) clone with wings.
DISPLAY_NAME = bat
STARTABLE = no

SPK_COMMANDS = bin/bat

HOMEPAGE = https://github.com/sharkdp/bat
LICENSE = MIT or Apache 2.0

include ../../mk/spksrc.spk.mk
Empty file added diyspk/bat/PLIST
Empty file.
19 changes: 19 additions & 0 deletions diyspk/exa/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SPK_NAME = exa
SPK_VERS = 0.10.1
SPK_REV = 1

DEPENDS = cross/$(SPK_NAME)

UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS)

MAINTAINER = SynoCommunity
DESCRIPTION = A modern replacement for ‘ls’.
DISPLAY_NAME = exa
STARTABLE = no

SPK_COMMANDS = bin/exa

HOMEPAGE = https://the.exa.website/
LICENSE = MIT

include ../../mk/spksrc.spk.mk
Empty file added diyspk/exa/PLIST
Empty file.
2 changes: 1 addition & 1 deletion mk/spksrc.cross-rust.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ifeq ($(findstring $(ARCH), $(ARMv5_ARCHS)),$(ARCH))
# may be not supported for cargo
RUST_TARGET=armv5te-unknown-linux-gnueabi
endif
ifeq ($(findstring $(ARCH), $(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH))
ifeq ($(findstring $(ARCH), $(ARMv7_ARCHS)),$(ARCH))
RUST_TARGET=armv7-unknown-linux-gnueabihf
endif
ifeq ($(findstring $(ARCH), $(ARMv7L_ARCHS)),$(ARCH))
Expand Down
30 changes: 22 additions & 8 deletions spk/synocli-file/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
SPK_NAME = synocli-file
SPK_VERS = 2.3
SPK_REV = 11
SPK_VERS = 2.4
SPK_REV = 12
SPK_ICON = src/synocli-file.png

DEPENDS = cross/less cross/tree cross/ncdu cross/jdupes cross/rhash cross/mc cross/nano cross/file
DEPENDS += cross/detox cross/pcre2
DEPENDS += cross/zstd cross/lzip cross/plzip
DEPENDS += cross/fdupes
# packages depending on cross/zlib must be defined later, see below
DEPENDS = cross/less cross/tree cross/ncdu cross/jdupes cross/rhash cross/nano cross/file
DEPENDS += cross/detox
DEPENDS += cross/lzip cross/plzip
DEPENDS += cross/mg
OPTIONAL_DEPENDS = cross/rmlint cross/rnm cross/micro cross/fzf cross/ripgrep cross/fd

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

MAINTAINER = SynoCommunity
DISPLAY_NAME = SynoCli File Tools
Expand All @@ -17,6 +18,17 @@ OPTIONAL_DESC =

include ../../mk/spksrc.archs.mk

# build rust tools before packages depending on cross/zlib
# These tools must use cross/zlib-ng instead of cross/zlib, otherwise will fail to find zlib (x64 only)
ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS) $(ARMv5_ARCHS)),$(ARCH))
DEPENDS += cross/bat cross/exa
OPTIONAL_DESC := $(OPTIONAL_DESC)", bat, exa"
endif

# packages depending on cross/zlib
DEPENDS += cross/mc cross/pcre2 cross/fdupes cross/zstd


# PPC archs except QorIQ
ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
DEPENDS += cross/rmlint
Expand Down Expand Up @@ -49,7 +61,7 @@ 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, file, detox, pcre2, zstd, lzip, plzip, detox$(OPTIONAL_DESC)."
STARTABLE = no
CHANGELOG = "1. Fix ripgrep<br>2. Fix mc for comcerto2k"
CHANGELOG = "1. Add rust tools 'bat' and 'exa' for supported archs.<br>2. Update openssl to v1.1.1l."

HOMEPAGE = https://github.com/SynoCommunity/spksrc/wiki/FAQ-SynoCliFile
LICENSE = Each tool is licensed under it's respective license.
Expand All @@ -73,6 +85,8 @@ SPK_COMMANDS += bin/fzf
SPK_COMMANDS += bin/rg
SPK_COMMANDS += bin/fd
SPK_COMMANDS += bin/mg
SPK_COMMANDS += bin/bat
SPK_COMMANDS += bin/exa

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