From e51c0ae763b1aaa477d45d41806df79e5a759907 Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Tue, 4 Aug 2020 00:41:29 -0400 Subject: [PATCH] New package: ly-0.5.2 --- srcpkgs/ly/INSTALL.msg | 1 + srcpkgs/ly/files/ly/conf | 14 +++++++ srcpkgs/ly/files/ly/finish | 4 ++ srcpkgs/ly/files/ly/run | 15 +++++++ srcpkgs/ly/patches/config.c.patch | 12 ++++++ srcpkgs/ly/patches/config.ini.patch | 12 ++++++ srcpkgs/ly/patches/makefile.patch | 27 ++++++++++++ srcpkgs/ly/template | 64 +++++++++++++++++++++++++++++ 8 files changed, 149 insertions(+) create mode 100644 srcpkgs/ly/INSTALL.msg create mode 100644 srcpkgs/ly/files/ly/conf create mode 100755 srcpkgs/ly/files/ly/finish create mode 100755 srcpkgs/ly/files/ly/run create mode 100644 srcpkgs/ly/patches/config.c.patch create mode 100644 srcpkgs/ly/patches/config.ini.patch create mode 100644 srcpkgs/ly/patches/makefile.patch create mode 100644 srcpkgs/ly/template diff --git a/srcpkgs/ly/INSTALL.msg b/srcpkgs/ly/INSTALL.msg new file mode 100644 index 00000000000..32e01462159 --- /dev/null +++ b/srcpkgs/ly/INSTALL.msg @@ -0,0 +1 @@ +ly requires either xinit or sx to be available. diff --git a/srcpkgs/ly/files/ly/conf b/srcpkgs/ly/files/ly/conf new file mode 100644 index 00000000000..1fea45318e6 --- /dev/null +++ b/srcpkgs/ly/files/ly/conf @@ -0,0 +1,14 @@ +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + if [ "${tty}" = "tty1" ]; then + GETTY_ARGS="--noclear" + fi +fi + +BAUD_RATE=38400 +TERM_NAME=linux + +StandardInput=tty +TTYPath=/dev/tty7 +TTYReset=yes +TTYVHangup=yes diff --git a/srcpkgs/ly/files/ly/finish b/srcpkgs/ly/files/ly/finish new file mode 100755 index 00000000000..e758d36fe52 --- /dev/null +++ b/srcpkgs/ly/files/ly/finish @@ -0,0 +1,4 @@ +#!/bin/sh + +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/srcpkgs/ly/files/ly/run b/srcpkgs/ly/files/ly/run new file mode 100755 index 00000000000..74f5613ca03 --- /dev/null +++ b/srcpkgs/ly/files/ly/run @@ -0,0 +1,15 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} -nl /usr/bin/ly tty7 "${BAUD_RATE}" "${TERM_NAME}" diff --git a/srcpkgs/ly/patches/config.c.patch b/srcpkgs/ly/patches/config.c.patch new file mode 100644 index 00000000000..ddc60056cac --- /dev/null +++ b/srcpkgs/ly/patches/config.c.patch @@ -0,0 +1,12 @@ +Change default tty to 7 +--- src/config.c 2020-07-28 11:35:08.000000000 -0400 ++++ "src/config copy.c" 2020-08-02 21:36:05.334018482 -0400 +@@ -288,7 +288,7 @@ + config.service_name = strdup("ly"); + config.shutdown_cmd = strdup("/sbin/shutdown -a now"); + config.term_reset_cmd = strdup("/usr/bin/tput reset"); +- config.tty = 2; ++ config.tty = 7; + config.wayland_cmd = strdup(DATADIR "/wsetup.sh"); + config.wayland_specifier = false; + config.waylandsessions = strdup("/usr/share/wayland-sessions"); diff --git a/srcpkgs/ly/patches/config.ini.patch b/srcpkgs/ly/patches/config.ini.patch new file mode 100644 index 00000000000..aec293c5f3b --- /dev/null +++ b/srcpkgs/ly/patches/config.ini.patch @@ -0,0 +1,12 @@ +Change default tty to 7 +--- res/config.ini 2020-07-28 11:35:08.000000000 -0400 ++++ "res/config copy.ini" 2020-08-02 21:37:52.572343702 -0400 +@@ -79,7 +79,7 @@ + #term_reset_cmd = /usr/bin/tput reset + + # tty in use +-#tty = 2 ++#tty = 7 + + # wayland setup command + #wayland_cmd = /etc/ly/wsetup.sh diff --git a/srcpkgs/ly/patches/makefile.patch b/srcpkgs/ly/patches/makefile.patch new file mode 100644 index 00000000000..8c56843ac28 --- /dev/null +++ b/srcpkgs/ly/patches/makefile.patch @@ -0,0 +1,27 @@ +Remove systemd service from install and uninstall targets +--- makefile 2020-07-28 11:35:08.000000000 -0400 ++++ "makefile copy" 2020-08-02 21:40:10.283778154 -0400 +@@ -78,7 +78,6 @@ + @install -DZ $(RESD)/wsetup.sh -t $(DATADIR) + @install -dZ $(DATADIR)/lang + @install -DZ $(RESD)/lang/* -t $(DATADIR)/lang +- @install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system + @install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d + + installnoconf: $(BIND)/$(NAME) +@@ -89,7 +88,6 @@ + @install -DZ $(RESD)/wsetup.sh -t $(DATADIR) + @install -dZ $(DATADIR)/lang + @install -DZ $(RESD)/lang/* -t $(DATADIR)/lang +- @install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system + @install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d + + uninstall: +@@ -97,7 +95,6 @@ + @rm -rf ${DESTDIR}/etc/ly + @rm -rf $(DATADIR) + @rm -f ${DESTDIR}/usr/bin/ly +- @rm -f ${DESTDIR}/usr/lib/systemd/system/ly.service + @rm -f ${DESTDIR}/etc/pam.d/ly + + clean: diff --git a/srcpkgs/ly/template b/srcpkgs/ly/template new file mode 100644 index 00000000000..6a47efc9784 --- /dev/null +++ b/srcpkgs/ly/template @@ -0,0 +1,64 @@ +# Template file for 'ly' +pkgname=ly +version=0.5.2 +revision=1 +_argoat_githash=0eb7afae7a001094c9166a8959e021375707522c +_testoasterror_githash=ee7c9d031d4632a6f381a6c174a38539bac04068 +_configator_githash=8cec1786196ae6f6a8b35e66181277457f2a2bb2 +_ctypes_githash=eb4b36559de8d17015f9416861ed085d06f5f5ed +_dragonfail_githash=0a2492c6aab3ff64e182db894ce4d40b26799fbd +_termbox_githash=23fff64470b0730959b39c70aa31fbddd776d9bc +build_style=gnu-makefile +make_build_args="FLAGS=\"$CFLAGS\"" +conf_files="/etc/ly/config.ini" +hostmakedepends="git" +makedepends="ncurses-devel pam-devel xcb-util-devel libX11-devel" +depends="pam util-linux xauth" +short_desc="TUI (ncurses-like) display manager" +maintainer="cinerea0 " +license="WTFPL" +homepage="https://github.com/nullgemm/ly" +distfiles="https://github.com/nullgemm/ly/archive/v${version}.tar.gz + https://github.com/nullgemm/argoat/archive/${_argoat_githash}.tar.gz>argoat-${_argoat_githash}.tar.gz + https://github.com/nullgemm/testoasterror/archive/${_testoasterror_githash}.tar.gz>testoasterror-${_testoasterror_githash}.tar.gz + https://github.com/nullgemm/configator/archive/${_configator_githash}.tar.gz>configator-${_configator_githash}.tar.gz + https://raw.githubusercontent.com/nullgemm/ctypes/${_ctypes_githash}/ctypes.h>ctypes-${_ctypes_githash}.h + https://github.com/nullgemm/dragonfail/archive/${_dragonfail_githash}.tar.gz>dragonfail-${_dragonfail_githash}.tar.gz + https://github.com/nullgemm/termbox_next/archive/${_termbox_githash}.tar.gz>termbox_next-${_termbox_githash}.tar.gz" +checksum="3460c2c8015add2946f9ff5d3e4bf051d7c07005698fe61279cedacd1283e010 + 65b0b5d688f8538513f335795156441365b9cb319a28d2defbb29d81ea43a188 + d627845bcece46499801bbef5b2ccf3e0bfe39493b52a16ae34478e54ab11bd6 + 2067100f9779eceb5abefa9402ed56546314ca5ad6b3d5156d3e1eb46c853679 + ef169974c68b548dc8ac83bd4714622775b024fab07dc2b7fe96e8e8f102dbab + d5cdd6d528a43c35d08e7fcac849370c07d949671ef592cfecb02b23ad3c4dad + 76d73183d2191e9e37285f39f2b1bd51f1dc2d991637902ff3c1aa35111b288d" +skip_extraction="ctypes-${_ctypes_githash}.h" + +post_extract() { + cp -rv ../argoat-${_argoat_githash}/* sub/argoat/ + cp -rv ../testoasterror-${_testoasterror_githash}/* sub/argoat/sub/testoasterror/ + cp -rv ../configator-${_configator_githash}/* sub/configator/ + cp -rv $XBPS_SRCDISTDIR/$pkgname-$version/ctypes-${_ctypes_githash}.h sub/ctypes/ctypes.h + cp -rv ../dragonfail-${_dragonfail_githash}/* sub/dragonfail/ + cp -rv ../termbox_next-${_termbox_githash}/* sub/termbox_next/ +} + +_make() { + make CC="$CC" FLAGS="$CFLAGS" +} + +pre_build() { + exit + cd sub/argoat/sub/testoasterror + _make + cd ../../ + _make +} + +do_build() { + _make +} + +post_install() { + vsv ly +}