From 4864ca4806520e055e558a4106d590c6673f64e7 Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Tue, 18 Nov 2025 16:56:04 +0100 Subject: [PATCH] Fix debian control --- debian/bookworm/control | 2 +- debian/jammy/control | 2 +- debian/noble/control | 2 +- debian/trixie/control | 2 +- docker/build.sh | 19 +++++++++++++++---- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/debian/bookworm/control b/debian/bookworm/control index cc48eff..55432bc 100644 --- a/debian/bookworm/control +++ b/debian/bookworm/control @@ -8,7 +8,7 @@ Standards-Version: 4.5.0 Homepage: https://github.com/everoddandeven/monero-python Rules-Requires-Root: no Package: python3-monero -Architecture: any +Architecture: all Description: Python bindings for monero-cpp This package provides Python 3 bindings for the monero-cpp library using pybind11. Version: 0.0.1 diff --git a/debian/jammy/control b/debian/jammy/control index cc48eff..55432bc 100644 --- a/debian/jammy/control +++ b/debian/jammy/control @@ -8,7 +8,7 @@ Standards-Version: 4.5.0 Homepage: https://github.com/everoddandeven/monero-python Rules-Requires-Root: no Package: python3-monero -Architecture: any +Architecture: all Description: Python bindings for monero-cpp This package provides Python 3 bindings for the monero-cpp library using pybind11. Version: 0.0.1 diff --git a/debian/noble/control b/debian/noble/control index 5b047dc..bc8c76e 100644 --- a/debian/noble/control +++ b/debian/noble/control @@ -8,7 +8,7 @@ Standards-Version: 4.5.0 Homepage: https://github.com/everoddandeven/monero-python Rules-Requires-Root: no Package: python3-monero -Architecture: any +Architecture: all Description: Python bindings for monero-cpp This package provides Python 3 bindings for the monero-cpp library using pybind11. Version: 0.0.1 diff --git a/debian/trixie/control b/debian/trixie/control index 5b047dc..bc8c76e 100644 --- a/debian/trixie/control +++ b/debian/trixie/control @@ -8,7 +8,7 @@ Standards-Version: 4.5.0 Homepage: https://github.com/everoddandeven/monero-python Rules-Requires-Root: no Package: python3-monero -Architecture: any +Architecture: all Description: Python bindings for monero-cpp This package provides Python 3 bindings for the monero-cpp library using pybind11. Version: 0.0.1 diff --git a/docker/build.sh b/docker/build.sh index f44ac21..479556f 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -13,6 +13,8 @@ if [ "$ARCH" == "x86_64" ]; then ARCH="amd64" elif [[ "$ARCH" == arm64* || "$ARCH" == aarch64* ]]; then ARCH="arm64" +elif [[ "$ARCH" == armv7* || "$ARCH" == "armhf" ]]; then + ARCH="armhf" fi PACKAGE_NAME=${PACKAGE_NAME:-python3-monero_${DEFAULT_VERSION}-1${DISTRO_CODENAME}1_${ARCH}} @@ -45,10 +47,10 @@ fi cd ../../../../ # build libmonero-cpp shared library -mkdir -p build && -cd build && -cmake .. && -cmake --build . && +mkdir -p build && +cd build && +cmake .. && +cmake --build . && make . cd ../../../ @@ -59,6 +61,15 @@ rm -rf build/${PACKAGE_NAME}/usr/lib/python3/dist-packages/pybind11* rm -rf build/${PACKAGE_NAME}/usr/lib/python3/dist-packages/bin cp -R "debian/${DISTRO_CODENAME}" "build/${PACKAGE_NAME}/DEBIAN" cp external/monero-cpp/build/libmonero-cpp.so build/${PACKAGE_NAME}/usr/lib/ + +CONTROL_FILE="build/${PACKAGE_NAME}/DEBIAN/control" +if [ -f "$CONTROL_FILE" ]; then + echo "Patching control file architecture to: ${ARCH}" + sed -i "s/^Architecture: .*/Architecture: ${ARCH}/" "$CONTROL_FILE" +else + echo "WARNING: control file not found at: $CONTROL_FILE" +fi + dpkg-deb --build build/${PACKAGE_NAME} echo "Package built successfully: build/${PACKAGE_NAME}.deb"