Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: ly-git #6972

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ lunacy-deb
lunarclient-app
lutris-deb
lutris-git
ly-git
lyrebird-git
lyx
mailspring-deb
Expand Down
24 changes: 24 additions & 0 deletions packages/ly-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pkgbase = ly-git
gives = ly
pkgver = 1.0.2
pkgdesc = TUI display manager
url = https://github.com/fairyglade/ly
priority = required
arch = any
depends = systemd
makedepends = build-essential
makedepends = libpam0g-dev
makedepends = libxcb-xkb-dev
pacdeps = zig-bin
conflicts = ly
replaces = lightdm
replaces = sddm
license = WTFPL
maintainer = villamorrd <villamorrd@students.nu-moa.edu.ph>
repology = project: ly
source = https://github.com/fairyglade/ly.git
source = config_dir-fix.patch
sha256sums = SKIP
sha256sums = SKIP

pkgname = ly-git
31 changes: 31 additions & 0 deletions packages/ly-git/config_dir-fix.patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who made this patch file, and also can this be put outside the repository?

Copy link
Contributor Author

@villamorrd villamorrd Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote the patch after investigating a problem with how it creates the configuration files which occurs when changing the install destination folder.

I'm not sure where else to put this patch file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that this is a git package and you have a build patch, which while it may work right now, could fail in the future when upstream decides to change something in build.zig.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I'll instead submit a pacscript for the stable release in the meantime while I try to get the patch merged upstream for now.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/build.zig b/build.zig
index f0e9074..0fcc2d5 100644
--- a/build.zig
+++ b/build.zig
@@ -31,7 +31,6 @@ pub fn build(b: *std.Build) !void {
executable_name = b.option([]const u8, "name", "Specify installed executable file name (default is ly)") orelse "ly";

const bin_directory = try b.allocator.dupe(u8, config_directory);
- config_directory = try std.fs.path.join(b.allocator, &[_][]const u8{ dest_directory, config_directory });

const build_options = b.addOptions();
const version_str = try getVersionStr(b, "ly", ly_version);
@@ -222,15 +221,15 @@ pub fn ServiceInstaller(comptime init_system: InitSystem) type {
}

fn install_ly(allocator: std.mem.Allocator, install_config: bool) !void {
- const ly_config_directory = try std.fs.path.join(allocator, &[_][]const u8{ config_directory, "/ly" });
+ const ly_config_directory = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, config_directory, "/ly" });

std.fs.cwd().makePath(ly_config_directory) catch {
std.debug.print("warn: {s} already exists as a directory.\n", .{ly_config_directory});
};

- const ly_lang_path = try std.fs.path.join(allocator, &[_][]const u8{ config_directory, "/ly/lang" });
+ const ly_lang_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, config_directory, "/ly/lang" });
std.fs.cwd().makePath(ly_lang_path) catch {
- std.debug.print("warn: {s} already exists as a directory.\n", .{config_directory});
+ std.debug.print("warn: {s} already exists as a directory.\n", .{ ly_lang_path });
};

{
48 changes: 48 additions & 0 deletions packages/ly-git/ly-git.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
pkgname=("ly-git")
repology=("project: ly")
arch=('any')
pkgver="1.0.2"
url='https://github.com/fairyglade/ly'
source=(
"https://github.com/fairyglade/ly.git"
"config_dir-fix.patch"
)
sha256sums=(
'SKIP'
'SKIP'
)
depends=("systemd")
makedepends=("build-essential" "libpam0g-dev" "libxcb-xkb-dev")
pacdeps=("zig-bin")
gives="ly"
conflicts=("${gives}")
replaces=("lightdm" "sddm")
pkgdesc="TUI display manager"
priority='required'
maintainer=("villamorrd <villamorrd@students.nu-moa.edu.ph>")
license=('WTFPL')
external_connection=true

prepare() {
mkdir -p "${pkgdir}/usr"
mkdir -p "${pkgdir}/etc"
}

build() {
cd "ly"

# Without this patch, the config directory is set as ${pkgdir}/ly-git/etc when it should be /etc/ly-git
patch build.zig "${srcdir}"/config_dir-fix.patch

zig build
}

package() {
cd "ly"
zig build -Ddest_directory="${pkgdir}" installsystemd
}

post_install() {
systemctl enable ly.service
systemctl disable getty@tty2.service
}
villamorrd marked this conversation as resolved.
Show resolved Hide resolved
25 changes: 25 additions & 0 deletions srclist
Original file line number Diff line number Diff line change
Expand Up @@ -6715,6 +6715,31 @@ pkgbase = lutris-git

pkgname = lutris-git
---
pkgbase = ly-git
gives = ly
pkgver = 1.0.2
pkgdesc = TUI display manager
url = https://github.com/fairyglade/ly
priority = required
arch = any
depends = systemd
makedepends = build-essential
makedepends = libpam0g-dev
makedepends = libxcb-xkb-dev
pacdeps = zig-bin
conflicts = ly
replaces = lightdm
replaces = sddm
license = WTFPL
maintainer = villamorrd <villamorrd@students.nu-moa.edu.ph>
repology = project: ly
source = https://github.com/fairyglade/ly.git
source = config_dir-fix.patch
sha256sums = SKIP
sha256sums = SKIP

pkgname = ly-git
---
pkgbase = lyrebird-git
gives = lyrebird
pkgver = 1.1.0
Expand Down
Loading