Skip to content

Commit

Permalink
snapcraft: do not build embedded doc for LXD if arch is riscv
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Mougard <[email protected]>
  • Loading branch information
gabrielmougard committed Sep 8, 2023
1 parent 3b072c1 commit 4fde4aa
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1403,12 +1403,14 @@ parts:
go build -o "${CRAFT_PART_INSTALL}/bin/lxd-benchmark" github.com/canonical/lxd/lxd-benchmark
go build -o "${CRAFT_PART_INSTALL}/bin/lxd-user" github.com/canonical/lxd/lxd-user
# Build the static website
make doc
if [ "$(uname -m)" != "riscv64" ]; then
# Build the static website
make doc
# Copy the static website
mkdir -p "${CRAFT_PART_INSTALL}/share/lxd-documentation"
cp -a doc/html/. "$CRAFT_PART_INSTALL/share/lxd-documentation/"
# Copy the static website
mkdir -p "${CRAFT_STAGE}/share/lxd-documentation"
cp -a doc/html/. "$CRAFT_STAGE/share/lxd-documentation/"
fi
# Setup bash completion
mkdir -p ${CRAFT_PART_INSTALL}/etc/bash_completion.d/
Expand Down Expand Up @@ -1437,7 +1439,6 @@ parts:
- etc/bash_completion.d/snap.lxd.lxc

- share/misc
- share/lxd-documentation*

- bin/lxc
- bin/lxc-to-lxd
Expand Down Expand Up @@ -1572,6 +1573,11 @@ parts:
strip -s ${CRAFT_PRIME}/${zfs}/bin/* ${CRAFT_PRIME}/${zfs}/lib/*
done
if [ "$(uname -m)" != "riscv64" ]; then
# Prime the documentation only if the arch is not riscv64
cp -r $CRAFT_STAGE/share/lxd-documentation $CRAFT_PRIME/share/
fi
[ -e "${CRAFT_PRIME}/criu/criu" ] && strip -s ${CRAFT_PRIME}/criu/criu
exit 0
Expand Down

0 comments on commit 4fde4aa

Please sign in to comment.