Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 1 | name: flatbuffers |
| 2 | base: core18 |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 3 | adopt-info: flatc |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 4 | summary: FlatBuffers compiler |
| 5 | description: | |
| 6 | FlatBuffers compiler |
| 7 | |
| 8 | NOTE: This snap also ships the necessary header files required to compile |
| 9 | projects using flatbuffers, however, for the compilation to work, you have |
| 10 | to manually add the following path in your project's configuration: |
| 11 | |
| 12 | /snap/flatbuffers/current/include |
| 13 | |
| 14 | If you need to use flatbuffers headers from a location other than the above |
| 15 | path, it is recommended to not use this snap as that could cause a mismatch. |
| 16 | |
| 17 | grade: stable |
| 18 | confinement: strict |
| 19 | |
| 20 | parts: |
| 21 | flatc: |
| 22 | plugin: cmake |
| 23 | source: . |
| 24 | configflags: |
| 25 | - -GUnix Makefiles |
| 26 | - -DCMAKE_BUILD_TYPE=Release |
| 27 | build-packages: |
| 28 | - g++ |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 29 | - git |
| 30 | override-pull: | |
| 31 | snapcraftctl pull |
| 32 | tag=$(git describe --tags --abbrev=0) |
| 33 | count=$(git rev-list $tag.. --count) |
| 34 | if [ "$count" = 0 ]; |
| 35 | then |
| 36 | version=$tag |
| 37 | else |
| 38 | hash=$(git rev-parse --short HEAD) |
| 39 | version=$tag+git$count.$hash |
| 40 | fi |
| 41 | snapcraftctl set-version $version |
| 42 | |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 43 | |
| 44 | apps: |
| 45 | flatc: |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 46 | command: bin/flatc |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 47 | plugs: |
| 48 | - home |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 49 | - removable-media |