diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..f898702 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="containers/netavark" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 6a6e43e..4f29c43 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,6 @@ name: netavark description: Container network stack -version: 1.13.0 -revision: 2 +version: 1.16.1 url: https://github.com/containers/netavark license: Apache-2.0 architecture: any diff --git a/source.sh b/source.sh index 87191a3..8b5d46a 100644 --- a/source.sh +++ b/source.sh @@ -10,12 +10,14 @@ FILENAME="${DOWNLOAD##*/}" prepare() { wget "$DOWNLOAD" tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" + + cd "$BPM_SOURCE" + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } # The build function is executed in the source directory # This function is used to compile the source code build() { - sed "s|@@NETAVARK@@|/usr/lib/podman/netavark|" contrib/systemd/system/netavark-dhcp-proxy.service.in > contrib/systemd/system/netavark-dhcp-proxy.service cargo build --frozen --release --all-features } @@ -29,8 +31,7 @@ check() { # This function is used to move the compiled files into the output directory package() { install -Dm755 target/release/netavark "$BPM_OUTPUT"/usr/libexec/podman/netavark - install -Dm644 contrib/systemd/system/*.{service,socket} -t "$BPM_OUTPUT"/usr/lib/systemd/system/ - install -Dm644 README.md "$BPM_OUTPUT"/usr/share/doc/netavark/README.md + # Install package license install -Dm644 LICENSE "$BPM_OUTPUT"/usr/share/licenses/netavark/LICENSE }