snapcraft.yaml 2.8 KB
Newer Older
S
Simon Fels 已提交
1
name: anbox
2
version: 1-dev
S
Simon Fels 已提交
3 4 5 6 7 8
summary: Android in a Box
description: |
  Runtime for Android applications which runs a full Android system
  in a container using Linux namespaces (user, ipc, net, mount) to
  separate the Android system fully from the host.
confinement: devmode
9
grade: devel
S
Simon Fels 已提交
10 11

apps:
12
  anbox:
13
    command: bin/anbox-wrapper.sh
14
  container-manager:
15 16
    command: bin/container-manager.sh start
    stop-command: bin/container-manager.sh stop
S
Simon Fels 已提交
17
    daemon: simple
S
Simon Fels 已提交
18 19

parts:
20
  android-images:
21
    plugin: dump
22
    source: android-images
23
  anbox-common:
24 25 26 27 28 29 30
    plugin: dump
    source: scripts
    organize:
      snap-wrapper.sh: bin/anbox-wrapper.sh
      container-manager.sh: bin/container-manager.sh
      anbox-bridge.sh: bin/anbox-bridge.sh
    prime:
S
Simon Fels 已提交
31
      - bin/anbox-bridge.sh
32
      - bin/anbox-wrapper.sh
33
      - bin/container-manager.sh
34 35 36 37
  apparmor:
    plugin: nil
    stage-packages:
      - apparmor
38
  lxc:
39 40 41
    source: https://github.com/lxc/lxc
    source-type: git
    source-tag: lxc-2.0.7
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
    build-packages:
      - libapparmor-dev
      - libcap-dev
      - libgnutls28-dev
      - libseccomp-dev
      - pkg-config
    plugin: autotools
    configflags:
      - --disable-selinux
      - --disable-python
      - --disable-lua
      - --disable-tests
      - --disable-examples
      - --disable-doc
      - --disable-api-docs
      - --disable-bash
      - --disable-cgmanager
      - --disable-apparmor
      - --disable-seccomp
      - --enable-capabilities
      - --with-rootfs-path=/var/snap/anbox/common/lxc/
63 64 65
      - --libexecdir=/snap/anbox/current/libexec/
    organize:
      snap/anbox/current/libexec: libexec
66
    prime:
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
      - lib/liblxc.so.1
      - lib/liblxc.so.1.2.0
      - libexec/lxc/lxc-monitord
  anbox:
    plugin: cmake
    after:
      - lxc
    source: .
    configflags:
      # FIXME: Anbox currently has some paths with hard coded prefixes. Once
      # that is fixed we can avoid using a prefix here.
      - -DCMAKE_INSTALL_PREFIX:PATH=/usr
    build-packages:
      - build-essential
      - cmake
      - cmake-data
      - debhelper
      - dbus
      - google-mock
      - libboost-dev
      - libboost-filesystem-dev
      - libboost-log-dev
      - libboost-iostreams-dev
      - libboost-program-options-dev
      - libboost-system-dev
92
      - libboost-test-dev
93 94 95 96 97 98 99
      - libboost-thread-dev
      - libcap-dev
      - libdbus-1-dev
      - libdbus-cpp-dev
      - libegl1-mesa-dev
      - libgles2-mesa-dev
      - libglib2.0-dev
S
Simon Fels 已提交
100
      - libglm-dev
101 102
      - libgtest-dev
      - libprotobuf-dev
S
Simon Fels 已提交
103
      - libproperties-cpp-dev
104 105 106 107 108 109 110 111 112
      - libsdl2-dev
      - pkg-config
      - protobuf-compiler
    stage-packages:
      - libegl1-mesa
      - libgles2-mesa
      - libgl1-mesa-glx
      - libsdl2-2.0-0
      - libsdl2-gfx-1.0-0
113
    prime:
114 115
      - usr/bin/anbox
      - usr/lib/*-linux-*/