diff --git a/srcpkgs/waydroid/INSTALL b/srcpkgs/waydroid/INSTALL new file mode 100644 index 00000000000..8c97144a144 --- /dev/null +++ b/srcpkgs/waydroid/INSTALL @@ -0,0 +1,6 @@ +case "$ACTION" in +post) + echo "Regenerating Waydroid configs..." + waydroid upgrade --offline + ;; +esac diff --git a/srcpkgs/waydroid/files/README.voidlinux b/srcpkgs/waydroid/files/README.voidlinux new file mode 100644 index 00000000000..196e969a36b --- /dev/null +++ b/srcpkgs/waydroid/files/README.voidlinux @@ -0,0 +1,18 @@ +To finish Waydroid installation run: + + # waydroid init + # ln -s /etc/sv/waydroid-container /var/service + +Additionally ensure 'psi=1' is present on your /proc/cmdline (unless the kernel +is configured with CONFIG_PSI_DEFAULT_DISABLED=n). + +Optionally clipboard syncing between the container and host Wayland compositor +can be enabled with: + + # xbps-install python3-pyclip wl-clipboard + +In case of graphical rendering issues etc. make sure to check the Waydroid +documentation if they have a solution: https://docs.waydro.id/ + +If not sure confirm your /proc/cpuinfo has the instruction sets required +by Android: https://developer.android.com/ndk/guides/abis#sa diff --git a/srcpkgs/waydroid/files/waydroid-container/finish b/srcpkgs/waydroid/files/waydroid-container/finish new file mode 100644 index 00000000000..73b10fd8e07 --- /dev/null +++ b/srcpkgs/waydroid/files/waydroid-container/finish @@ -0,0 +1,3 @@ +#!/bin/sh +waydroid session stop +waydroid container stop diff --git a/srcpkgs/waydroid/files/waydroid-container/run b/srcpkgs/waydroid/files/waydroid-container/run new file mode 100644 index 00000000000..b926f6c7030 --- /dev/null +++ b/srcpkgs/waydroid/files/waydroid-container/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec waydroid -w container start diff --git a/srcpkgs/waydroid/template b/srcpkgs/waydroid/template new file mode 100644 index 00000000000..acb8c2583d5 --- /dev/null +++ b/srcpkgs/waydroid/template @@ -0,0 +1,25 @@ +# Template file for 'waydroid' +pkgname=waydroid +version=1.3.0 +revision=1 +# https://developer.android.com/ndk/guides/abis#sa +archs="aarch64* armv7* i686* x86_64*" +build_style=gnu-makefile +make_install_args="USE_NFTABLES=1" +depends="python3 gbinder-python python3-gobject gtk+3 lxc dnsmasq nftables" +short_desc="Container-based approach to boot a full Android system" +maintainer="Jami Kettunen " +license="GPL-3.0-or-later" +homepage="https://waydro.id" +distfiles="https://github.com/waydroid/waydroid/archive/refs/tags/${version}.tar.gz" +checksum=1cd2ef0808820879730ddbbde08aa9bc1b16b0b320ca920a9059c2cbd92f637a + +python_version=3 +pycompile_dirs="usr/lib/waydroid" + +post_install() { + vsv waydroid-container + + # Void-specific documentation + vdoc ${FILESDIR}/README.voidlinux +}