snapcraft.yaml 1.9 KB
Newer Older
sangshuduo's avatar
sangshuduo 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
name: tdengine
base: core18 # the base snap is the execution environment for this snap
version: '2.0.0.6' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
  TDengine is an open-source big data platform designed and optimized for Internet of Things (IoT), Connected Vehicles, and Industrial IoT. Besides the 10x faster time-series database, it provides caching, stream computing, message queuing and other functionalities to reduce the complexity and costs of development and operations.

grade: stable
confinement: strict

apps:
  tdengine:
    command: launcher.sh
    daemon: simple
    restart-condition: always
    plugs:
      - network
      - network-bind
      - systemfiles

  taos:
    command: usr/bin/taos
    plugs:
      - network
      - systemfiles

plugs:
  systemfiles:
    interface: system-files
    read:
      - /etc/taos
      - /var/lib/taos
    write:
      - /var/log/taos
      - /var/lib/taos

parts:
  script:
    plugin: dump
    source: snap/local/
    prime:
      - launcher.sh

  tdengine:
    source: .
    source-type: local
    plugin: cmake
    build-packages:
      - gcc
      - g++
      - make
      - cmake
    override-build: |
      snapcraftctl build
      if [ ! -d $SNAPCRAFT_STAGE/usr ]; then
        mkdir $SNAPCRAFT_STAGE/usr
      fi
      if [ ! -d $SNAPCRAFT_STAGE/etc/taos ]; then
        mkdir -p $SNAPCRAFT_STAGE/etc/taos
      fi
      cp $SNAPCRAFT_PART_BUILD/build/* -rf $SNAPCRAFT_STAGE/usr/
      cp $SNAPCRAFT_PART_SRC/packaging/cfg/taos.cfg -rf $SNAPCRAFT_STAGE/etc/taos/

    prime:
      - etc/taos/taos.cfg
      - usr/bin/taosd
      - usr/bin/taos
      - usr/bin/taosdemo
      - usr/lib/libtaos.so.2.0.0.6
      - usr/lib/libtaos.so.1
      - usr/lib/libtaos.so


    #layout:
    #  usr/bin/taosd:
    #bind-file: debug/build/bin/taosd