1name: flatbuffers 2base: core18 3adopt-info: flatc 4summary: FlatBuffers compiler 5description: | 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 17grade: stable 18confinement: strict 19 20parts: 21 flatc: 22 plugin: cmake 23 source: . 24 configflags: 25 - -GUnix Makefiles 26 - -DCMAKE_BUILD_TYPE=Release 27 build-packages: 28 - g++ 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 43 44apps: 45 flatc: 46 command: bin/flatc 47 plugs: 48 - home 49 - removable-media 50