aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Reva <denis7774@gmail.com>2022-12-28 15:22:57 +0500
committerDenis Reva <denis7774@gmail.com>2022-12-28 15:23:05 +0500
commit8dad56e14f2339e25ca28be2268428d0228a7451 (patch)
tree08a32b098fb7eefc9d62f3e75d49cef1ca665fa8 /app-containers
parentapp-containers/waydroid: deleted accidently added file from index (diff)
downloadguru-8dad56e14f2339e25ca28be2268428d0228a7451.tar.gz
guru-8dad56e14f2339e25ca28be2268428d0228a7451.tar.bz2
guru-8dad56e14f2339e25ca28be2268428d0228a7451.zip
app-containers/waydroid: added openrc daemon and emerge --config
Signed-off-by: Denis Reva <denis7774@gmail.com>
Diffstat (limited to 'app-containers')
-rwxr-xr-xapp-containers/waydroid/files/waydroid9
-rw-r--r--app-containers/waydroid/waydroid-1.3.4-r6.ebuild (renamed from app-containers/waydroid/waydroid-1.3.4-r5.ebuild)19
2 files changed, 27 insertions, 1 deletions
diff --git a/app-containers/waydroid/files/waydroid b/app-containers/waydroid/files/waydroid
new file mode 100755
index 000000000..82aba2c4e
--- /dev/null
+++ b/app-containers/waydroid/files/waydroid
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Waydroid Container Manager"
+command="/usr/bin/waydroid"
+command_args="container start"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
diff --git a/app-containers/waydroid/waydroid-1.3.4-r5.ebuild b/app-containers/waydroid/waydroid-1.3.4-r6.ebuild
index df767cedc..d38d51203 100644
--- a/app-containers/waydroid/waydroid-1.3.4-r5.ebuild
+++ b/app-containers/waydroid/waydroid-1.3.4-r6.ebuild
@@ -42,16 +42,25 @@ ERROR_ANDROID_BINDER_IPC="CONFIG_ANDROID_BINDER_IPC: need for creating Android-s
ERROR_MEMFD_CREATE="CONFIG_MEMFD_CREATE: it completely replaced deprecated ISHMEM drivers,
therefore it's vital for android-specific memory management"
+
+src_compile(){
+ einfo "Nothing to compile"
+}
+
src_install() {
python_fix_shebang waydroid.py
emake install DESTDIR="${D}" USE_NFTABLES=1 USE_SYSTEMD=$(usex systemd 1 0)
+ if ! use systemd; then
+ elog "Installing waydroid OpenRC daemon"
+ doinitd "${FILESDIR}"/waydroid
+ fi
}
pkg_postinst() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
- if not use apparmor; then
+ if ! use apparmor; then
ewarn "If you use app-containers/lxc without apparmor, make sure you deleted or commented out in waydroid LXC config"
ewarn "(generated after waydroid init) in /var/lib/waydroid/lxc/waydroid/config the following string:"
ewarn "lxc.apparmor.profile = unconfined"
@@ -62,6 +71,10 @@ pkg_postinst() {
fi
ewarn "Make sure you have NFTABLES up and running in your kernel. See"
ewarn "https://wiki.gentoo.org/wiki/Nftables for how-to details"
+ einfo "After package installation run ether 'emerge --config app-containers/waydroid'"
+ einfo "or 'waydroid init' from root shell to install android container runtime"
+ einfo "To run waydroid, 1. Start container: 'rc-service waydroid start'"
+ einfo "2. start wayland channel (from user shell) 'waydroid session start'"
einfo "Contact https://docs.waydro.id/usage/install-on-desktops for how-to guides"
einfo "(does not cover Gentoo-specific things sadly)"
}
@@ -70,3 +83,7 @@ pkg_postrm() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
}
+
+pkg_config() {
+ "${ROOT}"/usr/bin/waydroid init
+}