Custom Anbox installation files & patches, including patched Android OS image file.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

133 lines
4.9 KiB

# Maintainer: Pekka Helenius <fincer89 [at] hotmail [dot] com>
# Contributor: Iwan Timmer <irtimmer@gmail.com>
pkgname=('anbox-git' 'anbox-modules-dkms-git')
_pkgname=anbox
pkgver=r1213.c898810
pkgrel=1
epoch=1
arch=('x86_64')
url="http://anbox.io/"
license=('GPL3')
install=${_pkgname}.install
makedepends=('cmake' 'git' 'glm' 'lxc' 'sdl2_image' 'protobuf' 'boost' 'properties-cpp' 'gtest' 'python')
patches=(
'patch_audio01_timing.patch'
'patch_audio02_pass-messenger.patch'
'patch_python3.patch'
'patch_cm-helpmenu-unhidden.patch'
'patch_cm-privileged-warn.patch'
'patch_bytesize-to-bytesizelong.patch'
'patch_remove-unknown-opt.patch'
'patch_window-restored.patch'
'patch_window-icons.patch'
'patch_fix-webview.patch'
)
source=("git+https://github.com/anbox/anbox.git"
"git+https://github.com/anbox/anbox-modules.git"
'anbox-container-manager.service'
'anbox-session-manager.service'
'99-anbox.rules'
'anbox.conf'
'anbox.desktop'
'anbox-bridge.network'
'anbox-bridge.netdev'
)
source+=(${source[@]} ${patches[@]})
sha256sums=('SKIP'
'SKIP'
'08b50aa85859715fdb6835a26c6e6efceab0ef8746fd5053a0e04fc0cb742c7f'
'aefae0f50ccaa66b291bb4636f06103f25deee8d6f64e3e6b9e414a5a6cec2a0'
'ff4b449950916925c6d3bdfa55a81a0a944deaeb020de9bffc5f3ec923fdf396'
'3e07dc524a827c1651857cce28a06c1565bc5188101c140ed213bbafedc5abff'
'7332d09865be553a259a53819cebddd21f661c7a251d78c2f46acd75c66676b6'
'2186a2a1c445b0eef40b96b508a3b158931bad2677fd4adbbe5c3a9db05553df'
'559190df4d6d595480b30d8b13b862081fc4aac52790e33eb24cf7fbcb8003b8'
'SKIP'
'SKIP'
'08b50aa85859715fdb6835a26c6e6efceab0ef8746fd5053a0e04fc0cb742c7f'
'aefae0f50ccaa66b291bb4636f06103f25deee8d6f64e3e6b9e414a5a6cec2a0'
'ff4b449950916925c6d3bdfa55a81a0a944deaeb020de9bffc5f3ec923fdf396'
'3e07dc524a827c1651857cce28a06c1565bc5188101c140ed213bbafedc5abff'
'7332d09865be553a259a53819cebddd21f661c7a251d78c2f46acd75c66676b6'
'2186a2a1c445b0eef40b96b508a3b158931bad2677fd4adbbe5c3a9db05553df'
'559190df4d6d595480b30d8b13b862081fc4aac52790e33eb24cf7fbcb8003b8'
'ebc76f847e95fa2b8c1c16faed4e541f3dbdedb320a9e63f361b16c3c9f5ca9f'
'7c0fd2b44f6934f528287836ddc54d6c4988c0aa3939ff1742a8f540d369ad7a'
'3f254676e21a0d73d0266a1281b56997f2a21d6e4bba0ab2d144d03dced86e7d'
'5d6184f4e2f8b680a176fe9125bf7e1d34bfdc0f3a114ade94bb1d9269cf9c79'
'7430e889f1a882b7393896baaaf1a22650d770ed810182def364fde9d8682223'
'bf751d44500c3689a3fd56c757d59632441bee78d1857bef84319f38da1a33ba'
'b96eedc64972c671a57052c53760b60aac00e95c80a7020818582957d247558f'
'926e13e113baf307cc1556e11e0b621e5fae455f9a02eb3cc0a75c6584dd27a2'
'ccea9d574da7861a9a1978e6dec2f8d47ef751acde874fd75f041076ae8cce58'
'03f81f644003689038dce53b8006c46d02a25056c1e3380d883680f0a9b5a500')
pkgver() {
cd "$srcdir/$_pkgname"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
prepare() {
cd "$srcdir/${_pkgname}"
# Don't build tests
truncate -s 0 cmake/FindGMock.cmake
truncate -s 0 tests/CMakeLists.txt
for p in ${patches[@]}; do
patch -Np1 -i ../${p}
done
}
build() {
mkdir -p "$srcdir/${_pkgname}/build"
cd "$srcdir/${_pkgname}/build"
cmake .. -DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_FLAGS="-Wno-error=implicit-fallthrough -Wno-error=missing-field-initializers" \
-DCMAKE_BUILD_TYPE=Release
make
}
package_anbox-git() {
depends=('lxc' 'sdl2_image' 'protobuf' 'anbox-image' 'libsystemd' 'boost-libs')
optdepends=('anbox-modules-dkms-git: Required Android kernel modules')
pkgdesc="Container solution to run a full Android system"
cd "$srcdir/${_pkgname}"
make -C build DESTDIR="$pkgdir" install
install -Dm 644 -t $pkgdir/usr/lib/systemd/system $srcdir/anbox-container-manager.service
install -Dm 644 -t $pkgdir/usr/lib/systemd/user $srcdir/anbox-session-manager.service
install -Dm 644 $srcdir/anbox-bridge.network $pkgdir/usr/lib/systemd/network/80-anbox-bridge.network
install -Dm 644 $srcdir/anbox-bridge.netdev $pkgdir/usr/lib/systemd/network/80-anbox-bridge.netdev
install -Dm 644 -t $pkgdir/usr/lib/udev/rules.d $srcdir/99-anbox.rules
install -Dm 644 -t $pkgdir/usr/share/applications $srcdir/anbox.desktop
install -Dm 644 snap/gui/icon.png $pkgdir/usr/share/pixmaps/anbox.png
}
package_anbox-modules-dkms-git() {
pkgdesc="Kernel modules for Anbox (DKMS)"
depends=('dkms')
arch=('any')
cd "$srcdir/anbox-modules"
modules=(ashmem binder)
for mod in "${modules[@]}"; do
install -dm 755 $pkgdir/usr/src
cp -a $mod $pkgdir/usr/src/anbox-modules-$mod-$pkgver
done;
install -Dm 644 -t $pkgdir/usr/lib/modules-load.d $srcdir/anbox.conf
}