Skip to content

Commit

Permalink
Mosh: add libutempter (#4667)
Browse files Browse the repository at this point in the history
* added libutempter
mosh now builds against libutempter, this is a requirement for adding support for displaying detached sessions.
* updated libutempter to 1.1.6
* libutempter: fixed helper binary so that it runs under DSM
* update libutempter to 1.2.1
- redesign an rename patch
- avoid libutempter_post_patch
* fix bild of cross/protobuf for DSM7
* mosh: fix build with utempter
* cpp code optimization
* Add Perl dependency for advanced customization and scripting
* update changelog
* remove duplicate definition
Co-authored-by: Adrian Carpenter <adrian.carpenter@me.com>
Co-authored-by: Yves Martin <ymartin1040@gmail.com>
  • Loading branch information
hgy59 authored Oct 28, 2021
1 parent 1aa8cc1 commit a368386
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 4 deletions.
16 changes: 16 additions & 0 deletions cross/libutempter/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PKG_NAME = libutempter
PKG_VERS = 1.2.1
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = ftp://ftp.altlinux.org/pub/people/ldv/utempter/
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

HOMEPAGE = http://freshmeat.sourceforge.net/projects/libutempter
COMMENT = libutempter provides a library interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files.
LICENSE = LGPLv2

CONFIGURE_TARGET = nop

include ../../mk/spksrc.cross-cc.mk
3 changes: 3 additions & 0 deletions cross/libutempter/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lnk:lib/libutempter.so
lnk:lib/libutempter.so.0
lib:lib/libutempter.so.1.2.1
3 changes: 3 additions & 0 deletions cross/libutempter/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
libutempter-1.2.1.tar.gz SHA1 f5787a80e87619ec2b45e7e2aadb8c20be55f099
libutempter-1.2.1.tar.gz SHA256 967fef372f391de501843ad87570c6cf5dabd9651f00f1783090fbc12b2a34cb
libutempter-1.2.1.tar.gz MD5 afe828ce87262d7e043770553004e162
20 changes: 20 additions & 0 deletions cross/libutempter/patches/001-Makefile-configurable-prefix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# make prefix configurable
#
--- Makefile.orig 2020-07-06 08:00:00.000000000 +0000
+++ Makefile 2021-05-16 23:32:38.309124941 +0000
@@ -30,10 +30,11 @@
TARGETS = $(PROJECT) $(SHAREDLIB) $(STATICLIB)

INSTALL = install
-libdir = /usr/lib
-libexecdir = /usr/lib
-includedir = /usr/include
-mandir = /usr/share/man
+prefix ?= /usr
+libdir = $(prefix)/lib
+libexecdir = $(prefix)/lib
+includedir = $(prefix)/include
+mandir = $(prefix)/share/man
man3dir = $(mandir)/man3
DESTDIR =

4 changes: 2 additions & 2 deletions cross/mosh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/mobile-shell/mosh/releases/download/$(PKG_NAME)-$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

BUILD_DEPENDS = native/protoc
DEPENDS = cross/zlib cross/openssl cross/protobuf cross/ncurses
DEPENDS = cross/zlib cross/openssl cross/protobuf cross/ncurses cross/libutempter

HOMEPAGE = https://mosh.org
COMMENT = Mosh: the mobile shell
Expand All @@ -15,6 +14,7 @@ LICENSE = GPLv3+
GNU_CONFIGURE = 1
# avoid warning: _FORTIFY_SOURCE requires compiling with optimization (-O)
ADDITIONAL_CPPFLAGS = -O2
CONFIGURE_ARGS += --with-utempter

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

Expand Down
7 changes: 7 additions & 0 deletions cross/protobuf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ CONFIGURE_ARGS = cross_compiling=yes --with-protoc=$(NATIVE_PROTOC)

PRE_COMPILE_TARGET = protobuf_pre_compile


include ../../mk/spksrc.common.mk
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
# fix compilation with newer compilers
ADDITIONAL_CXXFLAGS = -D_GLIBCXX_USE_C99_MATH=1
endif

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

.PHONY: protobuf_pre_compile
Expand Down
8 changes: 6 additions & 2 deletions spk/mosh/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
SPK_NAME = mosh
SPK_VERS = 1.3.2
SPK_REV = 1
SPK_REV = 2
SPK_ICON = src/mosh.png

DEPENDS = cross/$(SPK_NAME)

SPK_DEPENDS = "Perl>=5.14"

MAINTAINER = SynoCommunity
DESCRIPTION = Mosh: the mobile shell
DESCRIPTION = mosh, the mobile shell is a remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes. Mosh is a replacement for interactive SSH terminals. It's more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.

DISPLAY_NAME = mosh
STARTABLE = no
CHANGELOG = "1. Add libutempter to show detached sessions.<br/>2. Update openssl to v1.1.1l.<br/>3. Add Perl dependency for advanced customization and scripting."

HOMEPAGE = https://mosh.org
LICENSE = GPLv3+
Expand Down

0 comments on commit a368386

Please sign in to comment.