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.

131 lines
4.8 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 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. )
  24. source=("git+https://github.com/anbox/anbox.git"
  25. "git+https://github.com/anbox/anbox-modules.git"
  26. 'anbox-container-manager.service'
  27. 'anbox-session-manager.service'
  28. '99-anbox.rules'
  29. 'anbox.conf'
  30. 'anbox.desktop'
  31. 'anbox-bridge.network'
  32. 'anbox-bridge.netdev'
  33. )
  34. source+=(${source[@]} ${patches[@]})
  35. sha256sums=('SKIP'
  36. 'SKIP'
  37. '08b50aa85859715fdb6835a26c6e6efceab0ef8746fd5053a0e04fc0cb742c7f'
  38. 'aefae0f50ccaa66b291bb4636f06103f25deee8d6f64e3e6b9e414a5a6cec2a0'
  39. 'ff4b449950916925c6d3bdfa55a81a0a944deaeb020de9bffc5f3ec923fdf396'
  40. '3e07dc524a827c1651857cce28a06c1565bc5188101c140ed213bbafedc5abff'
  41. '7332d09865be553a259a53819cebddd21f661c7a251d78c2f46acd75c66676b6'
  42. '2186a2a1c445b0eef40b96b508a3b158931bad2677fd4adbbe5c3a9db05553df'
  43. '559190df4d6d595480b30d8b13b862081fc4aac52790e33eb24cf7fbcb8003b8'
  44. 'SKIP'
  45. 'SKIP'
  46. '08b50aa85859715fdb6835a26c6e6efceab0ef8746fd5053a0e04fc0cb742c7f'
  47. 'aefae0f50ccaa66b291bb4636f06103f25deee8d6f64e3e6b9e414a5a6cec2a0'
  48. 'ff4b449950916925c6d3bdfa55a81a0a944deaeb020de9bffc5f3ec923fdf396'
  49. '3e07dc524a827c1651857cce28a06c1565bc5188101c140ed213bbafedc5abff'
  50. '7332d09865be553a259a53819cebddd21f661c7a251d78c2f46acd75c66676b6'
  51. '2186a2a1c445b0eef40b96b508a3b158931bad2677fd4adbbe5c3a9db05553df'
  52. '559190df4d6d595480b30d8b13b862081fc4aac52790e33eb24cf7fbcb8003b8'
  53. 'ebc76f847e95fa2b8c1c16faed4e541f3dbdedb320a9e63f361b16c3c9f5ca9f'
  54. '7c0fd2b44f6934f528287836ddc54d6c4988c0aa3939ff1742a8f540d369ad7a'
  55. '3f254676e21a0d73d0266a1281b56997f2a21d6e4bba0ab2d144d03dced86e7d'
  56. '5d6184f4e2f8b680a176fe9125bf7e1d34bfdc0f3a114ade94bb1d9269cf9c79'
  57. '7430e889f1a882b7393896baaaf1a22650d770ed810182def364fde9d8682223'
  58. 'bf751d44500c3689a3fd56c757d59632441bee78d1857bef84319f38da1a33ba'
  59. 'b96eedc64972c671a57052c53760b60aac00e95c80a7020818582957d247558f'
  60. '926e13e113baf307cc1556e11e0b621e5fae455f9a02eb3cc0a75c6584dd27a2'
  61. 'ccea9d574da7861a9a1978e6dec2f8d47ef751acde874fd75f041076ae8cce58')
  62. pkgver() {
  63. cd "$srcdir/$_pkgname"
  64. ( set -o pipefail
  65. git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
  66. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  67. )
  68. }
  69. prepare() {
  70. cd "$srcdir/${_pkgname}"
  71. # Don't build tests
  72. truncate -s 0 cmake/FindGMock.cmake
  73. truncate -s 0 tests/CMakeLists.txt
  74. for p in ${patches[@]}; do
  75. patch -Np1 -i ../${p}
  76. done
  77. }
  78. build() {
  79. mkdir -p "$srcdir/${_pkgname}/build"
  80. cd "$srcdir/${_pkgname}/build"
  81. cmake .. -DCMAKE_INSTALL_LIBDIR=/usr/lib \
  82. -DCMAKE_INSTALL_PREFIX=/usr \
  83. -DCMAKE_CXX_FLAGS="-Wno-error=implicit-fallthrough -Wno-error=missing-field-initializers" \
  84. -DCMAKE_BUILD_TYPE=Release
  85. make
  86. }
  87. package_anbox-git() {
  88. depends=('lxc' 'sdl2_image' 'protobuf' 'anbox-image' 'libsystemd' 'boost-libs')
  89. optdepends=('anbox-modules-dkms-git: Required Android kernel modules')
  90. pkgdesc="Container solution to run a full Android system"
  91. cd "$srcdir/${_pkgname}"
  92. make -C build DESTDIR="$pkgdir" install
  93. install -Dm 644 -t $pkgdir/usr/lib/systemd/system $srcdir/anbox-container-manager.service
  94. install -Dm 644 -t $pkgdir/usr/lib/systemd/user $srcdir/anbox-session-manager.service
  95. install -Dm 644 $srcdir/anbox-bridge.network $pkgdir/usr/lib/systemd/network/80-anbox-bridge.network
  96. install -Dm 644 $srcdir/anbox-bridge.netdev $pkgdir/usr/lib/systemd/network/80-anbox-bridge.netdev
  97. install -Dm 644 -t $pkgdir/usr/lib/udev/rules.d $srcdir/99-anbox.rules
  98. install -Dm 644 -t $pkgdir/usr/share/applications $srcdir/anbox.desktop
  99. install -Dm 644 snap/gui/icon.png $pkgdir/usr/share/pixmaps/anbox.png
  100. }
  101. package_anbox-modules-dkms-git() {
  102. pkgdesc="Kernel modules for Anbox (DKMS)"
  103. depends=('dkms')
  104. arch=('any')
  105. cd "$srcdir/anbox-modules"
  106. modules=(ashmem binder)
  107. for mod in "${modules[@]}"; do
  108. install -dm 755 $pkgdir/usr/src
  109. cp -a $mod $pkgdir/usr/src/anbox-modules-$mod-$pkgver
  110. done;
  111. install -Dm 644 -t $pkgdir/usr/lib/modules-load.d $srcdir/anbox.conf
  112. }