diff --git a/DEVELOPERS b/DEVELOPERS index 6e5bebeea6..874e7bd3d2 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -38,6 +38,7 @@ F: package/flutter-engine/ F: package/flutter-gallery/ F: package/flutter-pi/ F: package/flutter-sdk-bin/ +F: package/libutempter/ F: package/python-kmod/ F: package/python-versioneer/ F: package/tllist/ diff --git a/package/Config.in b/package/Config.in index ce8b8a610e..7d4d624253 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2164,6 +2164,7 @@ menu "Other" source "package/libunwind/Config.in" source "package/liburcu/Config.in" source "package/liburing/Config.in" + source "package/libutempter/Config.in" source "package/libuv/Config.in" source "package/lightning/Config.in" source "package/linux-pam/Config.in" diff --git a/package/libutempter/0001-force-symlink-creation.patch b/package/libutempter/0001-force-symlink-creation.patch new file mode 100644 index 0000000000..c30928afd5 --- /dev/null +++ b/package/libutempter/0001-force-symlink-creation.patch @@ -0,0 +1,36 @@ +From 13e0a4ca67d860bc8f1e3b2ad6a3926758d76b47 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Wed, 22 Nov 2023 14:09:13 -0700 +Subject: [PATCH] force symlink creation + +Force symlink creation to avoid errors when reinstalling + +Upstream: https://github.com/altlinux/libutempter/pull/5 +Signed-off-by: Adam Duskett +--- + Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 8c90121..1cfc627 100644 +--- a/Makefile ++++ b/Makefile +@@ -83,12 +83,12 @@ install: + $(INSTALL) -p -m644 $(PROJECT).h $(DESTDIR)$(includedir)/ + $(INSTALL) -p -m755 $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SHAREDLIB).$(VERSION) + $(INSTALL) -p -m644 $(STATICLIB) $(DESTDIR)$(libdir)/ +- ln -s $(SHAREDLIB).$(VERSION) $(DESTDIR)$(libdir)/$(SONAME) +- ln -s $(SONAME) $(DESTDIR)$(libdir)/$(SHAREDLIB) ++ ln -sf $(SHAREDLIB).$(VERSION) $(DESTDIR)$(libdir)/$(SONAME) ++ ln -sf $(SONAME) $(DESTDIR)$(libdir)/$(SHAREDLIB) + $(INSTALL) -p -m644 $(PROJECT).3 $(DESTDIR)$(man3dir)/ + for n in lib$(PROJECT) utempter_add_record utempter_remove_record \ + utempter_remove_added_record utempter_set_helper; do \ +- ln -s $(PROJECT).3 $(DESTDIR)$(man3dir)/$$n.3; \ ++ ln -sf $(PROJECT).3 $(DESTDIR)$(man3dir)/$$n.3; \ + done + + clean: +-- +2.42.0 + diff --git a/package/libutempter/Config.in b/package/libutempter/Config.in new file mode 100644 index 0000000000..a06a240418 --- /dev/null +++ b/package/libutempter/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBUTEMPTER + bool "libutempter" + help + The libutempter library provides interface for terminal + emulators such as screen and xterm to record user + sessions to utmp and wtmp files. + + http://ftp.altlinux.org/pub/people/ldv/utempter/ + +comment "libutempter needs a toolchain w/ headers >= 4.14, dynamic library" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 || BR2_STATIC_LIBS diff --git a/package/libutempter/libutempter.hash b/package/libutempter/libutempter.hash new file mode 100644 index 0000000000..53a6c6db63 --- /dev/null +++ b/package/libutempter/libutempter.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 967fef372f391de501843ad87570c6cf5dabd9651f00f1783090fbc12b2a34cb libutempter-1.2.1.tar.gz +sha256 ce64d5f7b49ea6d80fdb6d4cdee6839d1a94274f7493dc797c3b55b65ec8e9ed COPYING diff --git a/package/libutempter/libutempter.mk b/package/libutempter/libutempter.mk new file mode 100644 index 0000000000..44b0dc38b0 --- /dev/null +++ b/package/libutempter/libutempter.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libutempter +# +################################################################################ + +LIBUTEMPTER_VERSION = 1.2.1 +LIBUTEMPTER_SITE = ftp.altlinux.org/pub/people/ldv/utempter +LIBUTEMPTER_INSTALL_STAGING = YES +LIBUTEMPTER_LICENSE = LGPL-2.1 +LIBUTEMPTER_LICENSE_FILES = COPYING + +define LIBUTEMPTER_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define LIBUTEMPTER_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) DESTDIR=$(STAGING_DIR) PREFIX=/usr -C $(@D)/ install +endef + +define LIBUTEMPTER_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/ install +endef + +$(eval $(generic-package))