net-im/tencent-qq: bump version to 3.2.15_p241224
[gentoo-zh.git] / x11-misc / ly / ly-1.0.2.ebuild
blob1496951985f64d1a9ed2e858478588acd8741531
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit systemd
8 DESCRIPTION="Ly - a TUI display manager"
9 HOMEPAGE="https://github.com/nullgemm/ly"
11 CLAP="0.9.1"
12 ZIGINI="0bba97a12582928e097f4074cc746c43351ba4c8"
13 ZIGLIBINI="e18d36665905c1e7ba0c1ce3e8780076b33e3002"
15 SRC_URI="
16 https://github.com/nullgemm/ly/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
17 https://github.com/Hejsil/zig-clap/archive/refs/tags/${CLAP}.tar.gz -> zig-clap.tar.gz
18 https://github.com/Kawaii-Ash/zigini/archive/${ZIGINI}.tar.gz -> zigini.tar.gz
19 https://github.com/ziglibs/ini/archive/${ZIGLIBINI}.tar.gz -> ziglibini.tar.gz
21 LICENSE="WTFPL-2"
22 SLOT="0"
23 KEYWORDS="~amd64"
25 EZIG_MIN="0.12"
26 DEPEND="
27 || ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} )
28 sys-libs/pam
29 x11-libs/libxcb
32 RDEPEND="
33 x11-base/xorg-server
34 x11-apps/xauth
35 sys-libs/ncurses
38 RES="${S}/res"
40 PATCHES=(
41 "${FILESDIR}/${PN}-build-zig-zon.patch"
42 "${FILESDIR}/${PN}-zigini-build-zig-zon.patch"
45 src_unpack() {
46 default
48 # create a subdir for deps
49 mkdir "${S}/deps" || die
51 # move all deps to the subdir
52 mv "zig-clap-${CLAP}" "${S}/deps/zig-clap" || die
53 mv "zigini-${ZIGINI}" "${S}/deps/zigini" || die
54 mv "ini-${ZIGLIBINI}" "${S}/deps/zigini/ini" || die
57 src_compile() {
58 zig build || die "Zig build failed"
61 src_install(){
62 dobin "${S}/zig-out/bin/${PN}"
63 newinitd "${RES}/${PN}-openrc" ly
64 systemd_dounit "${RES}/${PN}.service"
67 pkg_postinst() {
68 systemd_reenable "${PN}.service"
70 ewarn
71 ewarn "The init scripts are installed only for systemd/openrc"
72 ewarn "If you are using something else like runit etc."
73 ewarn "Please check upstream for get some help"
74 ewarn "You may need to take a look at /etc/ly/config.ini"
75 ewarn "If you are using a window manager as DWM"
76 ewarn "Please make sure there is a .desktop file in /usr/share/xsessions for it"