commit: 445930e95a6c06cba66da3b395ab3c322e893b9b Author: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com> AuthorDate: Mon Feb 19 12:32:34 2024 +0000 Commit: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com> CommitDate: Mon Feb 19 12:39:20 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=445930e9
gui-apps/ReGreet: drop 0.1.1-r4, add 0.1.1-r5 * update elog to readme.gentoo-r1 * add tmpfiles eclass * fix QA error Closes: https://bugs.gentoo.org/924820 Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail.com> gui-apps/ReGreet/Manifest | 2 +- ...eet-0.1.1-r4.ebuild => ReGreet-0.1.1-r5.ebuild} | 41 ++-- gui-apps/ReGreet/ReGreet-9999.ebuild | 253 +++++++++++++++++++-- gui-apps/ReGreet/files/README.gentoo | 41 ++++ 4 files changed, 294 insertions(+), 43 deletions(-) diff --git a/gui-apps/ReGreet/Manifest b/gui-apps/ReGreet/Manifest index 2c5eef90f7..b36b892f35 100644 --- a/gui-apps/ReGreet/Manifest +++ b/gui-apps/ReGreet/Manifest @@ -1,4 +1,4 @@ -DIST >ReGreet.tar.gz 62289 BLAKE2B 3ef05c0da2c8974dbdbfa6a73a3be96340d517f2510c075e2587f977a6a16125d40815a8d837e54ad0b08f968124861911ed424ff1eba662141608aebca03169 SHA512 c2276c9ee3699974a5ebdefe811bfdb15d5642f6d3d20f6ea6b4f5ce3b40a9691ed42441e50f506a503ef523b894ff28d1746844b26bc32dff5db18a1d5e8150 +DIST ReGreet.tar.gz 62289 BLAKE2B 3ef05c0da2c8974dbdbfa6a73a3be96340d517f2510c075e2587f977a6a16125d40815a8d837e54ad0b08f968124861911ed424ff1eba662141608aebca03169 SHA512 c2276c9ee3699974a5ebdefe811bfdb15d5642f6d3d20f6ea6b4f5ce3b40a9691ed42441e50f506a503ef523b894ff28d1746844b26bc32dff5db18a1d5e8150 DIST addr2line-0.21.0.crate 40807 BLAKE2B 9796b9a1177a299797902b7f64247d81d63d3f7e0dcc1256990628e84c5f92e3094ee8d753d9b72187b9aaa73b7ca67c0217899f2226ebd1076f8d25b458475b SHA512 afde7660dda30dee240e79df1fb5b92d4572520bf17a134ef3765e2a077af9e13713952d52e27fae420109b40f6e24dbce1056687dbcbead858ffc21cc7dc69b DIST adler-1.0.2.crate 12778 BLAKE2B a1dc17786adae945ac09d3525e609ed944e6465690787bbb831a1b9d53793cba1989793d0a5606d5d23ee20d36457923d451b1b3530c9ec7072a487aa3e55bbd SHA512 7ab190d31890fc05b0b55d8e2c6527a505e06793d5496be0b3831e0513412f9ba97f8148f6f68ed0770fa9cd980a5092d885e058becf1d5506b7c74b82674aa1 DIST ahash-0.8.7.crate 42894 BLAKE2B 56f4b2f577eb2752e675fa2b3191c65e0bb88575f92e8d906714296fca1daace46e93256672fce08cc5b4ac11d40a690a06b32a99fb50fd0df4f042773c33b6c SHA512 2c9eaa22f7bda47a781994c769d4a2ef15ba0f511fdd4ec4680c13d4c1809f1ce01adecc3b3776793158062d28ad9e5f0b1d1c0a9429e43dd07cd99540eae7a6 diff --git a/gui-apps/ReGreet/ReGreet-0.1.1-r4.ebuild b/gui-apps/ReGreet/ReGreet-0.1.1-r5.ebuild similarity index 88% rename from gui-apps/ReGreet/ReGreet-0.1.1-r4.ebuild rename to gui-apps/ReGreet/ReGreet-0.1.1-r5.ebuild index 1e466f52f3..758f05e784 100644 --- a/gui-apps/ReGreet/ReGreet-0.1.1-r4.ebuild +++ b/gui-apps/ReGreet/ReGreet-0.1.1-r5.ebuild @@ -206,7 +206,7 @@ CRATES=" [email protected] " -inherit cargo +inherit cargo readme.gentoo-r1 tmpfiles DESCRIPTION="A clean and customizable GTK-based greetd greeter written in Rust" HOMEPAGE="https://github.com/rharish101/ReGreet" @@ -215,7 +215,7 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/rharish101/${PN}.git" else SRC_URI=" - https://github.com/rharish101/${PN}/archive/refs/tags/${PV}.tar.gz -> >${PN}.tar.gz + https://github.com/rharish101/${PN}/archive/refs/tags/${PV}.tar.gz -> ${PN}.tar.gz ${CARGO_CRATE_URIS} " KEYWORDS="~amd64" @@ -239,6 +239,18 @@ IUSE="systemd openrc" PATCHES="${FILESDIR}/ReGreet-0.1.1-cargo-lock-fix.diff" +QA_FLAGS_IGNORED="usr/bin/regreet" + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + cargo_live_src_unpack + else + unpack "${PN}.tar.gz" + cargo_src_unpack + fi +} + src_configure() { local myfeatures=( gtk4_8 @@ -271,7 +283,7 @@ src_install() { cargo_src_install if use systemd; then - insinto /etc/tmpfiles.d/ && newins "${WORKDIR}/${P}/systemd-tmpfiles.conf" regreet.conf + newtmpfiles "${WORKDIR}/${P}/systemd-tmpfiles.conf" regreet.conf elif use openrc; then keepdir /var/log/regreet fowners greetd:greetd /var/log/regreet @@ -284,29 +296,20 @@ src_install() { # Install ReGreet template config file as a doc dodoc "${WORKDIR}/${P}/regreet.sample.toml" + # Create README.gentoo doc file + readme.gentoo_create_doc + elog "ReGreet sample config file available on: /usr/share/doc/${P}/regreet.sample.toml.bz2" elog "To use decompress it to /etc/greetd/regreet.toml" - elog "To configure greetd config.toml to use ReGreet use the ReGreet Readme" - elog "Or the greetd gentoo wiki page" - elog "" - elog "/etc/greetd/config.toml - Exemple ReGreet config using cage" - elog "-----------------------------------------------------------" - elog "[terminal]" - elog "vt = 7" - elog "" - elog "[default_session]" - elog "command = \"cage -s -- regreet\"" - elog "user = \"greetd\"" - elog "" - elog "Notes:" - elog "1 - On single user system you can change user to your home user" - elog "2 - For sway config refer to the Readme for more info" } src_post_install () { if use systemd; then # Run systemd-tmpfiles to create the log and cache folder - systemd-tmpfiles --create "$PWD/systemd-tmpfiles.conf" + tmpfiles_process regreet.conf fi + + # Print README.gentoo file in the elog + readme.gentoo_print_elog } diff --git a/gui-apps/ReGreet/ReGreet-9999.ebuild b/gui-apps/ReGreet/ReGreet-9999.ebuild index b91e4cea79..758f05e784 100644 --- a/gui-apps/ReGreet/ReGreet-9999.ebuild +++ b/gui-apps/ReGreet/ReGreet-9999.ebuild @@ -1,9 +1,212 @@ -# Copyright 2023-2024 Gentoo Authors +# Copyright 2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit cargo +CRATES=" + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected]+wasi-snapshot-preview1 + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] +" + +inherit cargo readme.gentoo-r1 tmpfiles DESCRIPTION="A clean and customizable GTK-based greetd greeter written in Rust" HOMEPAGE="https://github.com/rharish101/ReGreet" @@ -12,7 +215,7 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/rharish101/${PN}.git" else SRC_URI=" - https://github.com/rharish101/${PN}/archive/refs/tags/${PV}.tar.gz -> >${PN}.tar.gz + https://github.com/rharish101/${PN}/archive/refs/tags/${PV}.tar.gz -> ${PN}.tar.gz ${CARGO_CRATE_URIS} " KEYWORDS="~amd64" @@ -34,6 +237,20 @@ BDEPEND=" " IUSE="systemd openrc" +PATCHES="${FILESDIR}/ReGreet-0.1.1-cargo-lock-fix.diff" + +QA_FLAGS_IGNORED="usr/bin/regreet" + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + cargo_live_src_unpack + else + unpack "${PN}.tar.gz" + cargo_src_unpack + fi +} + src_configure() { local myfeatures=( gtk4_8 @@ -42,9 +259,8 @@ src_configure() { cargo_src_configure } -src_unpack() { - git-r3_src_unpack - cargo_live_src_unpack +src_prepare() { + default } src_compile() { @@ -67,7 +283,7 @@ src_install() { cargo_src_install if use systemd; then - insinto /etc/tmpfiles.d/ && newins "${WORKDIR}/${P}/systemd-tmpfiles.conf" regreet.conf + newtmpfiles "${WORKDIR}/${P}/systemd-tmpfiles.conf" regreet.conf elif use openrc; then keepdir /var/log/regreet fowners greetd:greetd /var/log/regreet @@ -80,29 +296,20 @@ src_install() { # Install ReGreet template config file as a doc dodoc "${WORKDIR}/${P}/regreet.sample.toml" + # Create README.gentoo doc file + readme.gentoo_create_doc + elog "ReGreet sample config file available on: /usr/share/doc/${P}/regreet.sample.toml.bz2" elog "To use decompress it to /etc/greetd/regreet.toml" - elog "To configure greetd config.toml to use ReGreet use the ReGreet Readme" - elog "Or the greetd gentoo wiki page" - elog "" - elog "/etc/greetd/config.toml - Exemple ReGreet config using cage" - elog "-----------------------------------------------------------" - elog "[terminal]" - elog "vt = 7" - elog "" - elog "[default_session]" - elog "command = \"cage -s -- regreet\"" - elog "user = \"greetd\"" - elog "" - elog "Notes:" - elog "1 - On single user system you can change user to your home user" - elog "2 - For sway config refer to the Readme for more info" } src_post_install () { if use systemd; then # Run systemd-tmpfiles to create the log and cache folder - systemd-tmpfiles --create "$PWD/systemd-tmpfiles.conf" + tmpfiles_process regreet.conf fi + + # Print README.gentoo file in the elog + readme.gentoo_print_elog } diff --git a/gui-apps/ReGreet/files/README.gentoo b/gui-apps/ReGreet/files/README.gentoo new file mode 100644 index 0000000000..bc19715e12 --- /dev/null +++ b/gui-apps/ReGreet/files/README.gentoo @@ -0,0 +1,41 @@ +## Configuration + +To configure greetd config.toml to use ReGreet use the [ReGreet Readme](https://github.com/rharish101/ReGreet/blob/main/README.md) +Or the [greetd gentoo wiki page](https://wiki.gentoo.org/wiki/Greetd) + +Exemple configuration: +1 - Cage + +```bash +/etc/greetd/config.toml - Exemple ReGreet config using cage +----------------------------------------------------------- +[terminal] +vt = 7 + +[default_session] +command = "cage -s -- regreet" +user = "greetd" +``` + +2 - Sway + +```bash +/etc/greetd/sway-config - Exemple Sway config (needed) +----------------------------------------------------------- +exec "regreet; swaymsg exit" +include /etc/sway/config.d/* +``` + +```bash +/etc/greetd/config.toml - Exemple ReGreet config using sway +----------------------------------------------------------- +[terminal] +vt = 7 + +[default_session] +command = "sway --config /path/to/custom/sway/config" +user = "greetd" +``` + +Note: On single user system you can change user to your home user +Advanced configuration go the [Project README](https://github.com/rharish101/ReGreet/blob/main/README.md)
