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-misc: add zramctl and uhubctl #5833

Merged
merged 5 commits into from
Aug 4, 2023
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
13 changes: 10 additions & 3 deletions cross/misc-util-linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ LICENSE = GPLv2

GNU_CONFIGURE = 1

POST_INSTALL_TARGET = misc-util-linux_post_install

ADDITIONAL_CFLAGS = -Wno-unused-parameter
CONFIGURE_ARGS = --without-python

Expand Down Expand Up @@ -61,11 +63,16 @@ ifeq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --disable-scriptutils
CONFIGURE_ARGS += --disable-libblkid --disable-blkid
PLIST_TRANSFORM = sed -e 's|bin/lsblk|d'
else
# for lsblk: ncurses must be built with tinfo
endif

# for lsblk and others: ncurses must be built with tinfo
# this seems to be a bug in util-linux, as most of other libraries fail to find ncurses/termlib
# dependencies when ncurses is build with lib tinfo
export NCURSES_WITH_TINFO=yes
endif

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

.PHONY: misc-util-linux_post_install
misc-util-linux_post_install:
@$(MSG) Use tools in bin for DSM 7 compatibility
@install -m 755 $(STAGING_INSTALL_PREFIX)/sbin/zramctl $(STAGING_INSTALL_PREFIX)/bin/zramctl
1 change: 1 addition & 0 deletions cross/misc-util-linux/PLIST
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bin:bin/lsirq
bin:bin/rev
bin:bin/wall
bin:bin/whereis
bin:bin/zramctl
lnk:lib/libsmartcols.so
lnk:lib/libsmartcols.so.1
lib:lib/libsmartcols.so.1.1.0
29 changes: 29 additions & 0 deletions cross/uhubctl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
PKG_NAME = uhubctl
PKG_VERS = 2.5.0
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/mvp/uhubctl/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/libusb

HOMEPAGE = https://github.com/mvp/uhubctl
COMMENT = USB hub per-port power control.
LICENSE = GPLv2

CONFIGURE_TARGET = nop
POST_INSTALL_TARGET = uhubctl_post_install

# Remarks:
# The following error comes from "git describe --match "v[0-9]*" --abbrev=8 --dirty --tags"
# and can be ignored, because we are not in uhubctl repo and GIT_VERSION is taken from VERSION file instead:
# fatal: No names found, cannot describe anything.

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

.PHONY: uhubctl_post_install
uhubctl_post_install:
@$(MSG) Create link in bin folder for DSM 7 resources to work
@install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin
@cd $(STAGING_INSTALL_PREFIX)/bin && ln -sf ../sbin/uhubctl .
2 changes: 2 additions & 0 deletions cross/uhubctl/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin:sbin/uhubctl
lnk:bin/uhubctl
3 changes: 3 additions & 0 deletions cross/uhubctl/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uhubctl-2.5.0.tar.gz SHA1 806235017a3f1cc2feb66983ca5fa8909760bd4b
uhubctl-2.5.0.tar.gz SHA256 d4452252f7862f7a45dd9c62f2ea7cd3a57ab5f5ab0e54a857d4c695699bbba3
uhubctl-2.5.0.tar.gz MD5 e4e66d445ba8fda181ce4aa4abcd4247
16 changes: 16 additions & 0 deletions diyspk/uhubctl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SPK_NAME = uhubctl
SPK_VERS = 2.5.0
SPK_REV = 1

DEPENDS = cross/uhubctl

MAINTAINER = SynoCommunity
DESCRIPTION = USB hub per-port power control.
STARTABLE = no

HOMEPAGE = https://github.com/mvp/uhubctl
LICENSE = GPLv2

SPK_COMMANDS = bin/uhubctl

include ../../mk/spksrc.spk.mk
14 changes: 9 additions & 5 deletions spk/synocli-misc/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
SPK_NAME = synocli-misc
SPK_VERS = 1.0
SPK_REV = 2
SPK_VERS = 1.1
SPK_REV = 3
SPK_ICON = src/synocli-misc.png

DEPENDS = cross/bc cross/moreutils cross/misc-util-linux
DEPENDS = cross/bc cross/moreutils cross/misc-util-linux cross/uhubctl

MAINTAINER = SynoCommunity
DISPLAY_NAME = SynoCli misc. Tools

DESCRIPTION = "SynoCli misc. Tools provide a set of miscellaneous small command-line utilities: bc, errno, ifdata, ifne, isutf8, lckdo, mispipe, parallel, pee, sponge, cal, col, colcrt, colrm, column, hexdump, lscpu, lsipc, lsirq, rev, wall, whereis."
DESCRIPTION = "SynoCli misc. Tools provide a set of miscellaneous small command-line utilities: bc, errno, ifdata, ifne, isutf8, lckdo, mispipe, parallel, pee, sponge, cal, col, colcrt, colrm, column, hexdump, lsblk, lscpu, lsipc, lsirq, rev, wall, whereis, zramctl, uhubctl."
STARTABLE = no
CHANGELOG = "Add lsblk from util-linux."
CHANGELOG = "1. Add zramctl from util-linux.<br/>2. Add uhubctl."

HOMEPAGE = https://github.com/SynoCommunity/spksrc/wiki/FAQ-SynoCliMisc
LICENSE = Each tool is licensed under it's respective license.
Expand Down Expand Up @@ -44,5 +44,9 @@ SPK_COMMANDS += bin/lsirq
SPK_COMMANDS += bin/rev
SPK_COMMANDS += bin/wall
SPK_COMMANDS += bin/whereis
SPK_COMMANDS += bin/zramctl

# uhubctl
SPK_COMMANDS += bin/uhubctl

include ../../mk/spksrc.spk.mk