Dave Barach | 6d97e62 | 2020-03-18 10:14:40 -0400 | [diff] [blame] | 1 | name: vpp |
Dave Barach | 832a316 | 2021-01-26 10:51:13 -0500 | [diff] [blame] | 2 | base: core20 |
| 3 | version: '21.01' |
Dave Barach | 6d97e62 | 2020-03-18 10:14:40 -0400 | [diff] [blame] | 4 | summary: Vector Packet Processor |
| 5 | description: | |
| 6 | High performance user-mode network stack |
| 7 | |
| 8 | grade: devel |
| 9 | confinement: classic |
| 10 | |
| 11 | parts: |
| 12 | vpp: |
| 13 | source-type: tar |
| 14 | source: vpp.tgz |
| 15 | plugin: nil |
| 16 | build-packages: |
| 17 | - gcc-8 |
| 18 | - make |
| 19 | - libnuma-dev |
Dave Barach | 832a316 | 2021-01-26 10:51:13 -0500 | [diff] [blame] | 20 | - libpcap-dev |
Dave Barach | 6d97e62 | 2020-03-18 10:14:40 -0400 | [diff] [blame] | 21 | stage-packages: |
| 22 | # For the dpdk plugin |
| 23 | - libnuma1 |
| 24 | override-build: | |
Dave Barach | 832a316 | 2021-01-26 10:51:13 -0500 | [diff] [blame] | 25 | dpkg -i vpp-ext-deps*.deb || true |
| 26 | UNATTENDED=y make install-dep install-ext-deps build-release |
Dave Barach | 6d97e62 | 2020-03-18 10:14:40 -0400 | [diff] [blame] | 27 | override-prime: | |
Dave Barach | 832a316 | 2021-01-26 10:51:13 -0500 | [diff] [blame] | 28 | # Copy the build result into SNAPCRAFT_PRIME |
| 29 | cd $SNAPCRAFT_PART_SRC/../build/build-root/install-vpp-native |
Dave Barach | 6d97e62 | 2020-03-18 10:14:40 -0400 | [diff] [blame] | 30 | tar cf - . | (cd $SNAPCRAFT_PRIME ; tar xf -) |
| 31 | # Copy staged libraries into SNAPCRAFT_PRIME |
| 32 | cp $SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/lib* $SNAPCRAFT_PRIME/vpp/lib |
| 33 | # Strip (unneeded) symbols |
| 34 | cd $SNAPCRAFT_PRIME |
| 35 | find . -type f -exec strip --strip-unneeded '{}' ';' 2> /dev/null || true |
| 36 | |
| 37 | apps: |
| 38 | vpp: |
| 39 | command: vpp/bin/vpp -c $SNAP/vpp/etc/vpp/startup.conf |
| 40 | daemon: simple |
| 41 | environment: |
| 42 | "LD_LIBRARY_PATH": "$SNAP/vpp/lib:$SNAP/vpp/lib/vpp_plugins:$SNAP/vpp/lib/vpp_api_test_plugins" |
| 43 | |
| 44 | vppctl: |
| 45 | command: vpp/bin/vppctl |
| 46 | environment: |
| 47 | "LD_LIBRARY_PATH": "$SNAP/vpp/lib" |
| 48 | |
| 49 | vpp-api-test: |
| 50 | command: vpp/bin/vpp_api_test |
| 51 | environment: |
| 52 | "LD_LIBRARY_PATH": "$SNAP/vpp/lib" |
| 53 | |
| 54 | svmtool: |
| 55 | command: vpp/bin/svmtool |
| 56 | environment: |
| 57 | "LD_LIBRARY_PATH": "$SNAP/vpp/lib" |