Skip to content

ly #10

Description

@sofijacom

The versions are somehow disorganized, or Void lags behind new versions. Compilation requires zig-0.16.0; Void has zig-0.13.0.

Dependencies
Compile-time:

zig 0.16.x (you must use a release version of zig; check that zig version does not have a -dev* suffix)

  • libc
  • pam
  • xcb (optional, required by default; needed for X11 support)

Runtime (with default config):

  • xorg
  • xorg-xauth
  • shutdown
  • brightnessctl

zig-0.16 zig

# Template file for 'zig-0.16'

pkgname=zig-0.16
version=0.16.0
revision=1
archs="x86_64"
short_desc="Programming language designed for robustness, optimality, and clarity"
maintainer="Sofiya <sofiya@v.org>"
license="MIT"
homepage="https://ziglang.org"
distfiles="https://ziglang.org/download/${version}/zig-x86_64-linux-${version}.tar.xz"
checksum=70e49664a74374b48b51e6f3fdfbf437f6395d42509050588bd49abe52ba3d00
nostrip=yes
conflicts="zig>=0"
replaces="zig>=0"

do_install() {
	vbin zig
	vmkdir usr/lib/zig
	vcopy ./lib/* usr/lib/zig
	vmkdir usr/share/doc/zig
	vcopy ./doc/* usr/share/doc/zig
	vlicense LICENSE
}

template

# Template file for 'ly'
pkgname=ly
version=1.4.1
revision=1
archs="i686 x86_64"
build_style=zig-build
conf_files="/etc/ly/config.ini"
hostmakedepends="pkg-config git zig-0.16"
makedepends="pam-devel libxcb-devel glibc-devel"
depends="util-linux xorg-server xauth brightnessctl"
short_desc="Ly is a lightweight TUI (ncurses-like) display manager for Linux and BSD."
maintainer="Rickard <@>"
license="WTFPL-2.0"
homepage="https://codeberg.org/fairyglade/ly"
changelog="https://codeberg.org/fairyglade/ly/releases/"
distfiles="https://codeberg.org/fairyglade/ly/archive/v${version}.tar.gz"
checksum=16fe5f07cc7a23930880b14d905883644cdc4b574d1c146629f6b98ee8fbbab9
# nopie_files=/usr/bin/ly
nopie=yes

do_build() {
	zig build installexe -Dinit_system=runit
}

do_install() {
  vbin zig-out/usr/bin/ly
  vmkdir etc/ly/lang
  vcopy res/config.ini etc/ly
  vcopy res/setup.sh etc/ly
  vcopy res/lang etc/ly
  vmkdir etc/pam.d
  vinstall res/pam.d/ly 0644 etc/pam.d
  vmkdir etc/sv/ly
  for FILE in res/ly-runit-service/*; do
    vinstall ${FILE} 0755 etc/sv/ly
  done
}

post_install() {
  vlicense license.md
}

update

#!/bin/bash

set -euo pipefail

REPO="fairyglade/ly"
TPL="srcpkgs/ly/template"

echo "### Checking for ly updates..."

LATEST_VERSION=$(curl -s "https://codeberg.org/api/v1/repos/${REPO}/releases/latest" | jq -r ".tag_name")

export VERSION=${LATEST_VERSION#"v"}
CURRENT_VERSION=$(grep '^version=' "$TPL" | cut -d= -f2)

printf "Latest version is: %s\nLatest built version is: %s\n" "${VERSION}" "${CURRENT_VERSION}"
[ "${CURRENT_VERSION}" = "${VERSION}" ] && printf "No new version to release\n" && exit 0

if [ -z "$VERSION" ]; then
    echo "Error: Failed to fetch latest version."
    exit 1
fi

if [ "$VERSION" = "$CURRENT_VERSION" ]; then
    echo "No update required. Current version: $CURRENT_VERSION"
    exit 0
fi

echo "Update found: $CURRENT_VERSION -> $VERSION"

URL_X86="https://codeberg.org/fairyglade/ly/archive/$LATEST_VERSION.tar.gz"

echo "Calculating checksum..."
CHK=$(curl -L -s "$URL_X86" | sha256sum | awk '{print $1}')

if [ -z "$CHK" ]; then
    echo "Error: Failed to fetch checksum."
    exit 1
fi

echo "Checksum: $CHK"

sed -i "s/^version=.*/version=$VERSION/" "$TPL"
sed -i "s/^checksum=.*/checksum=\"$CHK\"/" "$TPL"

echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
echo "### Done! ly updated to $VERSION"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions