Files
rust-socksd/debian/rules
T
Quintus LeungandCopilot b0b1b1d0e2 Fix Debian amd64 build OpenSSL dependency issue
- Add libssl3 and libpam0g to runtime dependencies in debian/control
- Install libssl3 and libpam0g in GitHub Actions workflow for dpkg-shlibdeps
- For cross-compilation, add architecture-specific library installation
- Add dh_shlibdeps override in debian/rules to help locate libraries

Fixes dpkg-shlibdeps errors when building Debian packages:
- 'cannot find library libssl.so.1.0.0'
- 'cannot find library libcrypto.so.1.0.0'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-18 18:18:26 +01:00

58 lines
1.7 KiB
Makefile
Executable File

#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
ifndef CARGO_BUILD_TARGET
ifeq ($(DEB_HOST_ARCH),amd64)
CARGO_BUILD_TARGET = x86_64-unknown-linux-gnu
else ifeq ($(DEB_HOST_ARCH),arm64)
CARGO_BUILD_TARGET = aarch64-unknown-linux-gnu
else ifeq ($(DEB_HOST_ARCH),armhf)
CARGO_BUILD_TARGET = armv7-unknown-linux-gnueabihf
endif
endif
%:
dh $@
override_dh_auto_build:
ifdef USE_CROSS
ifdef CARGO_BUILD_TARGET
cross build --release --target $(CARGO_BUILD_TARGET)
else
cross build --release
endif
else
ifdef CARGO_BUILD_TARGET
cargo build --release --target $(CARGO_BUILD_TARGET)
else
cargo build --release
endif
endif
override_dh_auto_install:
ifdef CARGO_BUILD_TARGET
install -D -m755 target/$(CARGO_BUILD_TARGET)/release/rust-socksd debian/rust-socksd/usr/bin/rust-socksd
else
install -D -m755 target/release/rust-socksd debian/rust-socksd/usr/bin/rust-socksd
endif
install -D -m644 config/rust-socksd.service debian/rust-socksd/lib/systemd/system/rust-socksd.service
install -D -m644 config/rust-socksd.sysusers.conf debian/rust-socksd/usr/lib/sysusers.d/rust-socksd.conf
install -D -m640 config/config.yml.journald.example debian/rust-socksd/etc/rust-socksd/config.yml
install -D -m660 config/users.yml.example debian/rust-socksd/etc/rust-socksd/users.yml
install -d debian/rust-socksd/var/log/rust-socksd
install -d debian/rust-socksd/var/lib/rust-socksd
override_dh_auto_clean:
rm -rf target
override_dh_auto_test:
# Skip tests for now - can be enabled later
# cargo test
.PHONY: override_dh_strip
override_dh_strip:
dh_strip --exclude=rust-socksd
override_dh_shlibdeps:
dh_shlibdeps -a -l/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu