Add ly-git

This commit is contained in:
Marty Oehme 2025-02-24 17:48:22 +01:00
parent 50f47ad1de
commit 66a92b7857
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
4 changed files with 65 additions and 0 deletions
ly-git

12
ly-git/files/ly/conf Normal file
View file

@ -0,0 +1,12 @@
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
auxtty=$(/bin/cat $CONFIG_DIRECTORY/ly/config.ini 2>/dev/null 1| /bin/sed -n 's/\(^[[:space:]]*tty[[:space:]]*=[[:space:]]*\)\([[:digit:]][[:digit:]]*\)\(.*\)/\2/p')
TTY=tty${auxtty:-$DEFAULT_TTY}

4
ly-git/files/ly/finish Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
[ -r conf ] && . ./conf
exec utmpset -w ${TTY}

13
ly-git/files/ly/run Normal file
View file

@ -0,0 +1,13 @@
#!/bin/sh
[ -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 $PREFIX_DIRECTORY/bin/$EXECUTABLE_NAME "${TTY}" "${BAUD_RATE}" "${TERM_NAME}"

36
ly-git/template Normal file
View file

@ -0,0 +1,36 @@
# Template file for 'ly'
pkgname=ly-git
version=20241012
revision=1
_commit=e125d8f1aa1544a6a106047c0acd7a7d2e0ff16c
archs="x86_64"
build_style=zig-build
configure_args="installrunit -Dpie"
hostmakedepends="git"
makedepends="pam-devel libxcb-devel"
depends=""
short_desc="Display manager with console UI"
maintainer="Marty Oehme <contact@martyoeh.me>"
license="WTFPL"
homepage="https://github.com/fairyglade/ly"
#changelog=""
distfiles="${homepage}/archive/${_commit}.tar.gz"
checksum=5c33daa89b680ebce6dd37a0edfaa9f68066c4646708bcf020233c6a58d53561
nostrip=yes
do_build() {
DESTDIR="zig-out" zig build -j"${XBPS_MAKEJOBS}" --sysroot "${XBPS_CROSS_BASE}" --search-prefix "${XBPS_CROSS_BASE}/usr" --prefix /usr --global-cache-dir /host/zig --verbose
}
do_install() {
vlicense license.md
vdoc readme.md
vbin zig-out/usr/bin/ly
vmkdir /etc/ly
vinstall res/config.ini 0644 /etc/ly
vinstall res/setup.sh 0755 /etc/ly
vinstall res/pam.d/ly 0644 /etc/pam.d
vcopy res/lang /etc/ly/lang
vsv ly
}