debian/rules: Source cargo env before calling cargo - Add `. "$HOME/.cargo/env"` to override_dh_auto_build build-alpine.sh: Use /home/builduser for all paths - PKGDIR=/home/builduser/apk-package (accessible by builduser) - WORKSPACE_DIR=/home/builduser (for APKBUILD package function) - Removed duplicate else line build-arch.sh: Copy repo to accessible directory - Copy repo contents to /home/builduser/repo before makepkg - Run makepkg in /home/builduser/repo (not act cache path)
33 lines
1.1 KiB
Makefile
33 lines
1.1 KiB
Makefile
#!/usr/bin/make -f
|
|
# debian/rules for linux-patch-api
|
|
|
|
export DEB_CARGO_PACKAGE=linux-patch-api
|
|
export DEB_CARGO_BUILD_FLAGS=--release
|
|
|
|
%:
|
|
dh $@
|
|
|
|
override_dh_auto_build:
|
|
. "$HOME/.cargo/env"
|
|
cargo build --release --target x86_64-unknown-linux-gnu
|
|
|
|
override_dh_auto_install:
|
|
dh_auto_install
|
|
# Create installation directories in debian/tmp
|
|
mkdir -p debian/tmp/usr/bin
|
|
mkdir -p debian/tmp/etc/linux_patch_api
|
|
mkdir -p debian/tmp/lib/systemd/system
|
|
mkdir -p debian/tmp/var/log/linux_patch_api
|
|
mkdir -p debian/tmp/var/lib/linux_patch_api
|
|
# Install binary
|
|
cp target/x86_64-unknown-linux-gnu/release/linux-patch-api debian/tmp/usr/bin/
|
|
chmod 755 debian/tmp/usr/bin/linux-patch-api
|
|
# Install systemd service
|
|
cp configs/linux-patch-api.service debian/tmp/lib/systemd/system/
|
|
chmod 644 debian/tmp/lib/systemd/system/linux-patch-api.service
|
|
# Install configs (as actual configs for first install)
|
|
cp configs/config.yaml.example debian/tmp/etc/linux_patch_api/config.yaml
|
|
cp configs/whitelist.yaml.example debian/tmp/etc/linux_patch_api/whitelist.yaml
|
|
chmod 644 debian/tmp/etc/linux_patch_api/*.yaml
|
|
|