diff options
author | Robosky | 2019-02-05 18:02:29 +0800 |
---|---|---|
committer | Robosky | 2019-02-05 18:02:29 +0800 |
commit | 1352d1933ec43874f794ebec26676c25ad4ef6f1 (patch) | |
tree | 61ea36d09372213f615eb838d0432e4300177826 | |
download | aur-1352d1933ec43874f794ebec26676c25ad4ef6f1.tar.gz |
First Push
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | anbox-bridge.c | 13 | ||||
-rw-r--r-- | anbox-bridge.desktop | 9 | ||||
-rw-r--r-- | anbox-bridge.install | 3 |
5 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3f0c73043e53 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = anbox-bridge + pkgdesc = Script to enable network for anbox + pkgver = 1 + pkgrel = 1 + url = https://anbox.io + install = anbox-bridge.install + arch = x86_64 + license = custom + depends = anbox-git + source = https://raw.githubusercontent.com/anbox/anbox/master/scripts/anbox-bridge.sh + source = anbox-bridge.c + source = anbox-bridge.desktop + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + +pkgname = anbox-bridge + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..37d356cdc8bc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +pkgname=anbox-bridge +pkgver=1 +pkgrel=1 +pkgdesc="Script to enable network for anbox" +depends=('anbox-git') +arch=('x86_64') +url="https://anbox.io" +license=('custom') +source=("https://raw.githubusercontent.com/anbox/anbox/master/scripts/anbox-bridge.sh" + "anbox-bridge.c" + "anbox-bridge.desktop") +md5sums=('SKIP' + 'SKIP' + 'SKIP') +install="${pkgname}.install" + +build() { + cd "${srcdir}" + gcc -o anbox-bridge ./anbox-bridge.c +} + +package() { + cd "${srcdir}" + + install -d "${pkgdir}/"usr/lib/anbox + install -m755 anbox-bridge.sh "${pkgdir}/"usr/lib/anbox/ + + install -d "${pkgdir}/"usr/bin + install anbox-bridge "${pkgdir}/"usr/bin/ + + chmod u+s "${pkgdir}/"usr/bin/anbox-bridge + + install -d "${pkgdir}/"usr/share/applications + install -m644 anbox-bridge.desktop "${pkgdir}/"usr/share/applications/ +} diff --git a/anbox-bridge.c b/anbox-bridge.c new file mode 100644 index 000000000000..5077f03eb3ca --- /dev/null +++ b/anbox-bridge.c @@ -0,0 +1,13 @@ +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> +#include <errno.h> + +int main(void) +{ + setuid(0); + + char buf[512]; + sprintf(buf, "/usr/lib/anbox/anbox-bridge.sh %s", "start"); + system((char *)buf); +} diff --git a/anbox-bridge.desktop b/anbox-bridge.desktop new file mode 100644 index 000000000000..f88a6d406017 --- /dev/null +++ b/anbox-bridge.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=anbox-bridge +Exec=/usr/bin/anbox-bridge +Terminal=false +Categories=System;Utility; +Comment=Start Anbox Network +Icon=anbox +GenericName=Anbox Network diff --git a/anbox-bridge.install b/anbox-bridge.install new file mode 100644 index 000000000000..142db7da47fb --- /dev/null +++ b/anbox-bridge.install @@ -0,0 +1,3 @@ +post_install() { + echo -e "\n===> You should add it to autostart to make sure the network can be use\n" +} |