Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapcraft: do not build embedded doc for LXD if arch is riscv #146

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 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,13 @@ 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.
# Some python dependencies are not available for riscv64 or just require a build from source.
# Not worth the effort for now.
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