Przeglądaj źródła

package/libutempter: new package

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Adam Duskett 1 rok temu
rodzic
commit
02c818bc5c

+ 1 - 0
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/

+ 1 - 0
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"

+ 36 - 0
package/libutempter/0001-force-symlink-creation.patch

@@ -0,0 +1,36 @@
+From 13e0a4ca67d860bc8f1e3b2ad6a3926758d76b47 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <adam.duskett@amarulasolutions.com>
+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 <adam.duskett@amarulasolutions.com>
+---
+ 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
+

+ 11 - 0
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

+ 3 - 0
package/libutempter/libutempter.hash

@@ -0,0 +1,3 @@
+# Locally computed
+sha256  967fef372f391de501843ad87570c6cf5dabd9651f00f1783090fbc12b2a34cb  libutempter-1.2.1.tar.gz
+sha256  ce64d5f7b49ea6d80fdb6d4cdee6839d1a94274f7493dc797c3b55b65ec8e9ed  COPYING

+ 27 - 0
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))