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

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. # Maintainer: Pekka Helenius <fincer89 [at] hotmail [dot] com>
  2. # Contributor: Iwan Timmer <irtimmer@gmail.com>
  3. pkgname=('anbox-git' 'anbox-modules-dkms-git')
  4. _pkgname=anbox
  5. pkgver=r1213.c898810
  6. pkgrel=1
  7. epoch=1
  8. arch=('x86_64')
  9. url="http://anbox.io/"
  10. license=('GPL3')
  11. install=${_pkgname}.install
  12. makedepends=('cmake' 'git' 'glm' 'lxc' 'sdl2_image' 'protobuf' 'boost' 'properties-cpp' 'gtest' 'python')
  13. patches=(
  14. 'patch_audio01_timing.patch'
  15. 'patch_audio02_pass-messenger.patch'
  16. 'patch_python3.patch'
  17. 'patch_cm-helpmenu-unhidden.patch'
  18. 'patch_cm-privileged-warn.patch'
  19. 'patch_bytesize-to-bytesizelong.patch'
  20. 'patch_remove-unknown-opt.patch'
  21. 'patch_window-restored.patch'
  22. 'patch_window-icons.patch'
  23. 'patch_fix-webview.patch'
  24. )
  25. source=("git+https://github.com/anbox/anbox.git"
  26. "git+https://github.com/anbox/anbox-modules.git"
  27. 'anbox-container-manager.service'
  28. 'anbox-session-manager.service'
  29. '99-anbox.rules'
  30. 'anbox.conf'
  31. 'anbox.desktop'
  32. 'anbox-bridge.network'
  33. 'anbox-bridge.netdev'
  34. )
  35. source+=(${source[@]} ${patches[@]})
  36. sha256sums=('SKIP'
  37. 'SKIP'
  38. '08b50aa85859715fdb6835a26c6e6efceab0ef8746fd5053a0e04fc0cb742c7f'
  39. 'aefae0f50ccaa66b291bb4636f06103f25deee8d6f64e3e6b9e414a5a6cec2a0'
  40. 'ff4b449950916925c6d3bdfa55a81a0a944deaeb020de9bffc5f3ec923fdf396'
  41. '3e07dc524a827c1651857cce28a06c1565bc5188101c140ed213bbafedc5abff'
  42. '7332d09865be553a259a53819cebddd21f661c7a251d78c2f46acd75c66676b6'
  43. '2186a2a1c445b0eef40b96b508a3b158931bad2677fd4adbbe5c3a9db05553df'
  44. '559190df4d6d595480b30d8b13b862081fc4aac52790e33eb24cf7fbcb8003b8'
  45. 'SKIP'
  46. 'SKIP'
  47. '08b50aa85859715fdb6835a26c6e6efceab0ef8746fd5053a0e04fc0cb742c7f'
  48. 'aefae0f50ccaa66b291bb4636f06103f25deee8d6f64e3e6b9e414a5a6cec2a0'
  49. 'ff4b449950916925c6d3bdfa55a81a0a944deaeb020de9bffc5f3ec923fdf396'
  50. '3e07dc524a827c1651857cce28a06c1565bc5188101c140ed213bbafedc5abff'
  51. '7332d09865be553a259a53819cebddd21f661c7a251d78c2f46acd75c66676b6'
  52. '2186a2a1c445b0eef40b96b508a3b158931bad2677fd4adbbe5c3a9db05553df'
  53. '559190df4d6d595480b30d8b13b862081fc4aac52790e33eb24cf7fbcb8003b8'
  54. 'ebc76f847e95fa2b8c1c16faed4e541f3dbdedb320a9e63f361b16c3c9f5ca9f'
  55. '7c0fd2b44f6934f528287836ddc54d6c4988c0aa3939ff1742a8f540d369ad7a'
  56. '3f254676e21a0d73d0266a1281b56997f2a21d6e4bba0ab2d144d03dced86e7d'
  57. '5d6184f4e2f8b680a176fe9125bf7e1d34bfdc0f3a114ade94bb1d9269cf9c79'
  58. '7430e889f1a882b7393896baaaf1a22650d770ed810182def364fde9d8682223'
  59. 'bf751d44500c3689a3fd56c757d59632441bee78d1857bef84319f38da1a33ba'
  60. 'b96eedc64972c671a57052c53760b60aac00e95c80a7020818582957d247558f'
  61. '926e13e113baf307cc1556e11e0b621e5fae455f9a02eb3cc0a75c6584dd27a2'
  62. 'ccea9d574da7861a9a1978e6dec2f8d47ef751acde874fd75f041076ae8cce58'
  63. '03f81f644003689038dce53b8006c46d02a25056c1e3380d883680f0a9b5a500')
  64. pkgver() {
  65. cd "$srcdir/$_pkgname"
  66. ( set -o pipefail
  67. git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
  68. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  69. )
  70. }
  71. prepare() {
  72. cd "$srcdir/${_pkgname}"
  73. # Don't build tests
  74. truncate -s 0 cmake/FindGMock.cmake
  75. truncate -s 0 tests/CMakeLists.txt
  76. for p in ${patches[@]}; do
  77. patch -Np1 -i ../${p}
  78. done
  79. }
  80. build() {
  81. mkdir -p "$srcdir/${_pkgname}/build"
  82. cd "$srcdir/${_pkgname}/build"
  83. cmake .. -DCMAKE_INSTALL_LIBDIR=/usr/lib \
  84. -DCMAKE_INSTALL_PREFIX=/usr \
  85. -DCMAKE_CXX_FLAGS="-Wno-error=implicit-fallthrough -Wno-error=missing-field-initializers" \
  86. -DCMAKE_BUILD_TYPE=Release
  87. make
  88. }
  89. package_anbox-git() {
  90. depends=('lxc' 'sdl2_image' 'protobuf' 'anbox-image' 'libsystemd' 'boost-libs')
  91. optdepends=('anbox-modules-dkms-git: Required Android kernel modules')
  92. pkgdesc="Container solution to run a full Android system"
  93. cd "$srcdir/${_pkgname}"
  94. make -C build DESTDIR="$pkgdir" install
  95. install -Dm 644 -t $pkgdir/usr/lib/systemd/system $srcdir/anbox-container-manager.service
  96. install -Dm 644 -t $pkgdir/usr/lib/systemd/user $srcdir/anbox-session-manager.service
  97. install -Dm 644 $srcdir/anbox-bridge.network $pkgdir/usr/lib/systemd/network/80-anbox-bridge.network
  98. install -Dm 644 $srcdir/anbox-bridge.netdev $pkgdir/usr/lib/systemd/network/80-anbox-bridge.netdev
  99. install -Dm 644 -t $pkgdir/usr/lib/udev/rules.d $srcdir/99-anbox.rules
  100. install -Dm 644 -t $pkgdir/usr/share/applications $srcdir/anbox.desktop
  101. install -Dm 644 snap/gui/icon.png $pkgdir/usr/share/pixmaps/anbox.png
  102. }
  103. package_anbox-modules-dkms-git() {
  104. pkgdesc="Kernel modules for Anbox (DKMS)"
  105. depends=('dkms')
  106. arch=('any')
  107. cd "$srcdir/anbox-modules"
  108. modules=(ashmem binder)
  109. for mod in "${modules[@]}"; do
  110. install -dm 755 $pkgdir/usr/src
  111. cp -a $mod $pkgdir/usr/src/anbox-modules-$mod-$pkgver
  112. done;
  113. install -Dm 644 -t $pkgdir/usr/lib/modules-load.d $srcdir/anbox.conf
  114. }