← luna

Commit fff4ca4

7
files
+225
added
-0
deleted
@@ -0,0 +1,2 @@
1 +out/
2 +*.tar.gz
0 3 new file mode 100644
@@ -0,0 +1,59 @@
1 +# Receptury PaganOS dla libLuna i Selene
2 +
3 +**English** — `PAGBUILD.yaml` recipes for the **PaganOS** build system (`pagbuild`/`pag`),
4 +packaging **libLuna** (the GUI toolkit) and **Selene** (the Wayland compositor). They follow
5 +the conventions of the central `recipes` repo (`https://git.paganlinux.eu/recipes.git`):
6 +a local source tarball, `cargo build --release --locked`, files installed into `${PKGDIR}`.
7 +
8 +**Polski** — receptury `PAGBUILD.yaml` dla systemu budowania **PaganOS** (`pagbuild`/`pag`),
9 +pakietujące **libLunę** (toolkit GUI) oraz **Selene** (kompozytor Wayland). Trzymają się
10 +konwencji centralnego repo `recipes`: lokalny tarball źródła, `cargo build --release --locked`,
11 +pliki instalowane do `${PKGDIR}`.
12 +
13 +## Zawartość
14 +
15 +| Plik | Rola |
16 +| --- | --- |
17 +| `de/libluna/PAGBUILD.yaml` | pakiet `libluna` — demo (`luna-demo`) + galeria (`luna-gallery`), tłumaczenia, przykładowe motywy |
18 +| `de/selene/PAGBUILD.yaml` | pakiet `selene` — binarka kompozytora, skrypt sesji i wpis sesji Wayland |
19 +| `de/selene/luna-session` | launcher sesji (ustawia `XDG_*` i `SELENE_BACKEND`) |
20 +| `de/selene/selene.desktop` | wpis do `/usr/share/wayland-sessions` |
21 +| `make-tarball.sh` | generuje tarball i składa gotowy katalog `out/` z uzupełnionymi sha256 |
22 +
23 +Oba pakiety budują się z **tego samego** tarballa (wspólny workspace). Katalog w tarballu to
24 +`luna-${pkgver}/`, stąd `cd luna-${pkgver}` w fazach `build:`.
25 +
26 +## Jak zrobić wydanie receptur
27 +
28 +```sh
29 +# 1) Zapisz stan, który chcesz spakować (receptury biorą `git archive HEAD`).
30 +git add -A && git commit -m "release: 0.0.1"
31 +
32 +# 2) Wygeneruj tarball + uzupełnij sha256 (powstaje packaging/paganos/out/).
33 +packaging/paganos/make-tarball.sh
34 +
35 +# 3) Skopiuj do centralnego repo receptur i zbuduj.
36 +cp -r packaging/paganos/out/de/libluna <recipes>/de/libluna
37 +cp -r packaging/paganos/out/de/selene <recipes>/de/selene
38 +pagbuild <recipes>/de/libluna/PAGBUILD.yaml
39 +pagbuild <recipes>/de/selene/PAGBUILD.yaml
40 +```
41 +
42 +Szablony w `de/*/PAGBUILD.yaml` mają tokeny (`__TARBALL_SHA256__` itd.) i **nie** zawierają
43 +sum — te wpisuje dopiero skrypt, bo zależą od konkretnego commita/taga.
44 +
45 +## Zależności
46 +
47 +- **runtime:** `libxkbcommon` (linkowane dynamicznie — potwierdzone `ldd`) oraz `dejavu-ttf`
48 + (toolkit ładuje `DejaVuSans.ttf` z `/usr/share/fonts`; jeśli jest `adwaita-fonts`, użyje go
49 + jako pierwszego).
50 +- **build:** `rustc` (dostarcza `cargo`). Crates pobiera `cargo`; brak `-sys` wymagających
51 + `pkg-config` (wayland-client buduje się z czysto-rdzeniowym backendem — brak `libwayland.so`).
52 +
53 +## Uwagi
54 +
55 +- `Selene` to kompozytor Wayland; wpis sesji startuje na DRM/KMS (`SELENE_BACKEND=drm`).
56 + Gdy master DRM trzyma inna sesja, Selene **bezpiecznie** spada do wyjścia nested.
57 +- Wejście w trybie DRM (evdev) to kolejny krok — póki go nie ma, sesja jest „podglądowa”.
58 +- `selene` nie deklaruje zależności od pakietu `libluna`, bo linkuje toolkit statycznie
59 + (Rust) — zależność nie jest potrzebna w runtime.
0 60 new file mode 100644
@@ -0,0 +1,44 @@
1 +# Receptura PaganOS (pagbuild) — libLuna (toolkit GUI).
2 +# Target w repo receptur: de/libluna/PAGBUILD.yaml
3 +#
4 +# Źródło: lokalny tarball całego workspace'u (konwencja „fork-first" — build bez sieci),
5 +# generowany skryptem packaging/paganos/make-tarball.sh. Katalog w tarballu: luna-${pkgver}/
6 +
7 +pkgname: libluna
8 +pkgver: '0.0.1'
9 +pkgrel: 1
10 +pkgdesc: 'libLuna — lekki toolkit GUI w Rust (alternatywa dla GTK4/libadwaita): widgety, render software, i18n; demo + galeria'
11 +url: 'https://git.paganlinux.eu/luna.git'
12 +arch: x86_64
13 +license:
14 +- MPL-2.0
15 +depends:
16 +- libxkbcommon
17 +- dejavu-ttf
18 +makedepends:
19 +- rustc
20 +source:
21 +- luna-${pkgver}.tar.gz
22 +sha256sums:
23 +- __TARBALL_SHA256__
24 +build: |
25 + cd luna-${pkgver}
26 +
27 + # Build tylko pakietu demo (nie ciągniemy kompozytora Selene).
28 + cargo build --release --locked -p luna-demo
29 +
30 + install -Dm755 target/release/luna-demo "${PKGDIR}/usr/bin/luna-demo"
31 + install -Dm755 target/release/gallery "${PKGDIR}/usr/bin/luna-gallery"
32 +
33 + # Katalogi tłumaczeń (doładowywane w runtime z /usr/share/luna/i18n).
34 + install -d "${PKGDIR}/usr/share/luna/i18n"
35 + install -m644 crates/libluna-i18n/i18n/*.lang "${PKGDIR}/usr/share/luna/i18n/"
36 +
37 + # Przykładowe motywy (nakładki na motyw bazowy).
38 + install -d "${PKGDIR}/usr/share/luna/themes"
39 + install -m644 examples/luna/themes/*.theme "${PKGDIR}/usr/share/luna/themes/"
40 +
41 + install -Dm644 LICENSE "${PKGDIR}/usr/share/licenses/${pkgname}/LICENSE"
42 + install -Dm644 README.md "${PKGDIR}/usr/share/doc/${pkgname}/README.md"
43 +package: |
44 + true
0 45 new file mode 100644
@@ -0,0 +1,46 @@
1 +# Receptura PaganOS (pagbuild) — Selene (kompozytor Wayland środowiska Luna).
2 +# Target w repo receptur: de/selene/PAGBUILD.yaml
3 +#
4 +# Buduje się z TEGO SAMEGO tarballa co libluna (wspólny workspace), więc `source`
5 +# wskazuje ten sam plik `luna-${pkgver}.tar.gz` — w repo receptur trzymamy jego kopię
6 +# również w tym katalogu (pagbuild kopiuje pliki z katalogu receptury do katalogu budowy).
7 +
8 +pkgname: selene
9 +pkgver: '0.0.1'
10 +pkgrel: 1
11 +pkgdesc: 'Selene — kompozytor Wayland środowiska Luna (czysty Rust, bez smithay): xdg-shell, layer-shell, SSD, DRM/KMS, schowek, DnD'
12 +url: 'https://git.paganlinux.eu/luna.git'
13 +arch: x86_64
14 +license:
15 +- MPL-2.0
16 +depends:
17 +- libxkbcommon
18 +- dejavu-ttf
19 +makedepends:
20 +- rustc
21 +source:
22 +- luna-${pkgver}.tar.gz
23 +- luna-session
24 +- selene.desktop
25 +sha256sums:
26 +- __TARBALL_SHA256__
27 +- __SESSION_SHA256__
28 +- __DESKTOP_SHA256__
29 +build: |
30 + cd luna-${pkgver}
31 +
32 + cargo build --release --locked -p selene
33 + install -Dm755 target/release/selene "${PKGDIR}/usr/bin/selene"
34 +
35 + # Skrypt sesji + wpis wyboru sesji (SDDM/GDM → /usr/share/wayland-sessions).
36 + install -Dm755 ../luna-session "${PKGDIR}/usr/bin/luna-session"
37 + install -Dm644 ../selene.desktop "${PKGDIR}/usr/share/wayland-sessions/selene.desktop"
38 +
39 + # Tłumaczenia kompozytora (doładowywane w runtime z /usr/share/luna/i18n).
40 + install -d "${PKGDIR}/usr/share/luna/i18n"
41 + install -m644 crates/libluna-i18n/i18n/*.lang "${PKGDIR}/usr/share/luna/i18n/"
42 +
43 + install -Dm644 LICENSE "${PKGDIR}/usr/share/licenses/${pkgname}/LICENSE"
44 + install -Dm644 README.md "${PKGDIR}/usr/share/doc/${pkgname}/README.md"
45 +package: |
46 + true
0 47 new file mode 100755
@@ -0,0 +1,15 @@
1 +#!/bin/sh
2 +# Sesja środowiska Luna — uruchamia kompozytor Selene.
3 +#
4 +# Domyślnie startujemy na DRM/KMS. Gdy master DRM trzyma inna sesja, Selene sam
5 +# zgłosi to i spadnie do wyjścia nested — ustaw wtedy SELENE_BACKEND=nested.
6 +set -eu
7 +
8 +export XDG_CURRENT_DESKTOP=Luna
9 +export XDG_SESSION_TYPE=wayland
10 +export XDG_SESSION_DESKTOP=Luna
11 +
12 +: "${SELENE_BACKEND:=drm}"
13 +export SELENE_BACKEND
14 +
15 +exec selene
0 16 new file mode 100644
@@ -0,0 +1,9 @@
1 +[Desktop Entry]
2 +Type=Application
3 +Name=Luna
4 +Name[pl]=Luna
5 +Comment=Luna desktop — Selene Wayland compositor
6 +Comment[pl]=Środowisko Luna — kompozytor Wayland Selene
7 +Exec=luna-session
8 +TryExec=selene
9 +DesktopNames=Luna
0 10 new file mode 100755
@@ -0,0 +1,50 @@
1 +#!/usr/bin/env bash
2 +# Generuje lokalny tarball workspace'u libLuna (dla receptur PaganOS) i składa gotowy
3 +# do wysłania katalog `out/de/{libluna,selene}/` z uzupełnionymi sumami sha256.
4 +#
5 +# Szablony w de/*/PAGBUILD.yaml zostają nietknięte (mają tokeny __*_SHA256__).
6 +set -euo pipefail
7 +
8 +here="$(cd "$(dirname "$0")" && pwd)"
9 +root="$(git -C "$here" rev-parse --show-toplevel)"
10 +ver="$(grep -m1 '^version =' "$root/Cargo.toml" | sed -E 's/.*"([^"]+)".*/\1/')"
11 +tarball="luna-${ver}.tar.gz"
12 +
13 +out="$here/out/de"
14 +rm -rf "$here/out"
15 +mkdir -p "$out/libluna" "$out/selene"
16 +
17 +# Tarball z bieżącego HEAD (tylko pliki zacommitowane), katalog nadrzędny: luna-${ver}/
18 +git -C "$root" archive --format=tar.gz --prefix="luna-${ver}/" \
19 + -o "$out/libluna/$tarball" HEAD
20 +cp -f "$out/libluna/$tarball" "$out/selene/$tarball"
21 +
22 +sha_tar="$(sha256sum "$out/libluna/$tarball" | cut -d' ' -f1)"
23 +sha_ses="$(sha256sum "$here/de/selene/luna-session" | cut -d' ' -f1)"
24 +sha_desk="$(sha256sum "$here/de/selene/selene.desktop" | cut -d' ' -f1)"
25 +
26 +sed "s/__TARBALL_SHA256__/$sha_tar/" \
27 + "$here/de/libluna/PAGBUILD.yaml" > "$out/libluna/PAGBUILD.yaml"
28 +
29 +sed -e "s/__TARBALL_SHA256__/$sha_tar/" \
30 + -e "s/__SESSION_SHA256__/$sha_ses/" \
31 + -e "s/__DESKTOP_SHA256__/$sha_desk/" \
32 + "$here/de/selene/PAGBUILD.yaml" > "$out/selene/PAGBUILD.yaml"
33 +
34 +cp -f "$here/de/selene/luna-session" "$here/de/selene/selene.desktop" "$out/selene/"
35 +
36 +cat <<EOF
37 +libLuna/Selene ${ver} — gotowe do wysłania w: packaging/paganos/out/
38 +
39 + sha256 tarball : $sha_tar
40 + sha256 session : $sha_ses
41 + sha256 desktop : $sha_desk
42 +
43 +Skopiuj zawartość do repo receptur:
44 + packaging/paganos/out/de/libluna/ -> de/libluna/
45 + packaging/paganos/out/de/selene/ -> de/selene/
46 +
47 +Test lokalny (gdy masz pagbuild):
48 + pagbuild packaging/paganos/out/de/libluna/PAGBUILD.yaml
49 + pagbuild packaging/paganos/out/de/selene/PAGBUILD.yaml
50 +EOF