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.

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