changeset 249:ec821c24b574

x11/sessreg: initial import, closes #1340
author David Demelier <markand@malikania.fr>
date Wed, 20 Mar 2019 23:45:00 +0100
parents d1340d83f3c9
children f89cfb8437eb
files x11/sessreg/sessreg.sh x11/sessreg/wtmpx.patch
diffstat 2 files changed, 79 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/sessreg/sessreg.sh	Wed Mar 20 23:45:00 2019 +0100
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+PKGNAME=sessreg
+PKGVERSION=1.1.1
+PKGREVISION=1
+PKGLICENSE="CUSTOM"
+PKGSUMMARY="X.Org tool to register sessions through utmp/utmpx"
+PKGDOWNLOAD="https://www.x.org/releases/individual/app/$PKGNAME-$PKGVERSION.tar.gz"
+PKGDEPENDS="x11/util-macros:build x11/xorgproto:build"
+
+: ${CHOST:=$(uname -m)-linux-musl}
+: ${CBUILD:=$(uname -m)-linux-musl}
+: ${CC:=gcc}
+: ${CFLAGS:=-O2}
+: ${LDFLAGS:=}
+: ${LIBS:=}
+
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvaf $PKGNAME-$PKGVERSION.tar.gz
+	pushd $PKGNAME-$PKGVERSION
+
+	# https://git.alpinelinux.org/aports/plain/main/sessreg/missing_path_wtmpx.patch
+	patch -p1 < ../wtmpx.patch
+
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr
+	make
+	make install DESTDIR=$DESTDIR
+
+	popd
+	rm -rf $PKGNAME-$PKGVERSION
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/sessreg/wtmpx.patch	Wed Mar 20 23:45:00 2019 +0100
@@ -0,0 +1,24 @@
+diff -Naur sessreg-1.0.8.orig/sessreg.h sessreg-1.0.8/sessreg.h
+--- sessreg-1.0.8.orig/sessreg.h	2013-02-10 21:43:50.000000000 -0500
++++ sessreg-1.0.8/sessreg.h	2014-06-18 10:02:17.769459663 -0400
+@@ -106,3 +106,8 @@
+ #ifndef UTMPX_FILE
+ # define UTMPX_FILE	_PATH_UTMPX
+ #endif
++
++#ifndef _PATH_WTMPX
++# define _PATH_WTMPX	"/var/log/wtmp"
++#endif
++
+diff --git a/sessreg.h b/sessreg.h
+index b3bbac9..d0c0105 100644
+--- a/sessreg.h
++++ b/sessreg.h
+@@ -114,3 +114,7 @@
+ # define _PATH_WTMPX	"/var/log/wtmp"
+ #endif
+ 
++#ifndef _PATH_UTMPX
++# define _PATH_UTMPX    "/var/log/utmp"
++#endif
++