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.

115 lines
4.2 KiB

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