diff --git a/.github/workflows/_arm-builds.yml b/.github/workflows/_arm-builds.yml index 0e045f288..944740f5e 100644 --- a/.github/workflows/_arm-builds.yml +++ b/.github/workflows/_arm-builds.yml @@ -1,3 +1,7 @@ +# Copyright (c) 2026 Analog Devices, Inc. +# +# SPDX-License-Identifier: MIT + name: ARM Builds on: @@ -20,78 +24,81 @@ jobs: - image: ubuntu:22.04 platform-flag: '' artifact-name: Ubuntu-22.04-arm64v8 + distro-version: +Ubuntu22 - image: arm32v7/ubuntu:22.04 platform-flag: '--platform linux/arm/v7' artifact-name: Ubuntu-22.04-arm32v7 + distro-version: +Ubuntu22 # Ubuntu 26.04 - image: ubuntu:26.04 platform-flag: '' artifact-name: Ubuntu-26.04-arm64v8 + distro-version: +Ubuntu26 - image: arm32v7/ubuntu:26.04 platform-flag: '--platform linux/arm/v7' artifact-name: Ubuntu-26.04-arm32v7 + distro-version: +Ubuntu26 # Debian 12 (bookworm) - image: debian:bookworm platform-flag: '' artifact-name: Debian-12-arm64 + distro-version: +Debian12 - image: arm32v7/debian:bookworm platform-flag: '--platform linux/arm/v7' artifact-name: Debian-12-armhf + distro-version: +Debian12 # Debian 13 (trixie) - image: debian:trixie platform-flag: '' artifact-name: Debian-13-arm64 + distro-version: +Debian13 - image: arm32v7/debian:trixie platform-flag: '--platform linux/arm/v7' artifact-name: Debian-13-armhf - env: - ARTIFACTNAME: ${{ matrix.artifact-name }} - CMAKE_BUILD_TYPE: ${{ inputs.build-type }} + distro-version: +Debian13 steps: - uses: actions/checkout@v7 with: fetch-depth: 1 - - name: Build + - uses: actions/checkout@v7 + with: + repository: analogdevicesinc/shared-actions + ref: 242aa00e8eed98e2bd0ee663a9a0597ebec69d89 + path: shared-actions + fetch-depth: 1 + + - name: Get version + id: version + run: | + version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) + echo "version=${version}" >> "${GITHUB_OUTPUT}" + + - name: Build deb run: | set -e - docker run \ - ${{ matrix.platform-flag }} \ - --rm -t --privileged \ - -e ARTIFACTNAME=${{ matrix.artifact-name }} \ - -e CMAKE_BUILD_TYPE=${{ inputs.build-type }} \ - -v "${{ github.workspace }}":"/ci" \ - "${{ matrix.image }}" \ - /bin/bash -c " - set -e - export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get install -y build-essential git cmake libxml2-dev bison flex \ - libcdk5-dev libaio-dev libusb-1.0-0-dev libzstd-dev \ - libserialport-dev libavahi-client-dev \ - python3 python3-pip python3-setuptools - - git clone --depth 1 https://github.com/pcercuei/libini.git - cd libini && mkdir build && cd build && cmake .. && make && make install && ldconfig - cd /ci - - mkdir build && cd build - cmake .. -DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE:-RelWithDebInfo} -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DWITH_SERIAL_BACKEND=ON -DWITH_EMU_BACKEND=ON -DWITH_EXAMPLES=ON -DPYTHON_BINDINGS=ON -DCPP_BINDINGS=ON -DENABLE_PACKAGING=ON -DCPACK_SYSTEM_NAME=\${ARTIFACTNAME} - make - make package - make required2tar - " + docker run -d --name builder \ + ${{ matrix.platform-flag }} --privileged \ + -v "${{ github.workspace }}:${{ github.workspace }}" \ + -w "${{ github.workspace }}" \ + -e DEBIAN_FRONTEND=noninteractive \ + -e GITHUB_WORKSPACE="${{ github.workspace }}" \ + -e VERSION="${{ steps.version.outputs.version }}" \ + -e VERSION_SUFFIX="${{ matrix.distro-version }}" \ + -e WORKING_DIRECTORY="${{ github.workspace }}" \ + -e IGNORE_PATH="shared-actions" \ + "${{ matrix.image }}" sleep infinity + docker exec builder bash -c "apt-get update && apt-get install -y curl" + docker exec builder bash shared-actions/deb-generator-action/build-deb.sh - name: Upload artifacts uses: actions/upload-artifact@v7 with: name: ${{ matrix.artifact-name }} - path: | - build/*.deb - build/*.tar.gz + path: artifacts cross-arch: name: ${{ matrix.artifact-name }} @@ -104,60 +111,59 @@ jobs: - image: ubuntu:22.04 arch: ppc64le artifact-name: Ubuntu-22.04-ppc64le + distro-version: +Ubuntu22 - image: ubuntu:22.04 arch: s390x artifact-name: Ubuntu-22.04-s390x + distro-version: +Ubuntu22 - image: ubuntu:26.04 arch: ppc64le artifact-name: Ubuntu-26.04-ppc64le + distro-version: +Ubuntu26 - image: ubuntu:26.04 arch: s390x artifact-name: Ubuntu-26.04-s390x - env: - ARTIFACTNAME: ${{ matrix.artifact-name }} - CMAKE_BUILD_TYPE: ${{ inputs.build-type }} + distro-version: +Ubuntu26 steps: - uses: actions/checkout@v7 with: fetch-depth: 1 + - uses: actions/checkout@v7 + with: + repository: analogdevicesinc/shared-actions + ref: 242aa00e8eed98e2bd0ee663a9a0597ebec69d89 + path: shared-actions + fetch-depth: 1 + - name: Set up QEMU uses: docker/setup-qemu-action@v4 - - name: Build + - name: Get version + id: version + run: | + version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) + echo "version=${version}" >> "${GITHUB_OUTPUT}" + + - name: Build deb run: | set -e - sudo docker run \ - --platform "linux/${{ matrix.arch }}" \ - --rm -t --privileged \ - -e ARTIFACTNAME=${{ matrix.artifact-name }} \ - -e CMAKE_BUILD_TYPE=${{ inputs.build-type }} \ - -v "${{ github.workspace }}":"/ci" \ - "${{ matrix.image }}" \ - /bin/bash -c " - set -e - export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get install -y build-essential git cmake libxml2-dev bison flex \ - libcdk5-dev libaio-dev libusb-1.0-0-dev libzstd-dev \ - libserialport-dev libavahi-client-dev \ - python3 python3-pip python3-setuptools - - git clone --depth 1 https://github.com/pcercuei/libini.git - cd libini && mkdir build && cd build && cmake .. && make && make install && ldconfig - cd /ci - - mkdir build && cd build - cmake .. -DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE:-RelWithDebInfo} -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DWITH_SERIAL_BACKEND=ON -DWITH_EMU_BACKEND=ON -DWITH_EXAMPLES=ON -DPYTHON_BINDINGS=ON -DCPP_BINDINGS=ON -DENABLE_PACKAGING=ON -DCPACK_SYSTEM_NAME=\${ARTIFACTNAME} - make - make package - make required2tar - " + docker run -d --name builder \ + --platform "linux/${{ matrix.arch }}" --privileged \ + -v "${{ github.workspace }}:${{ github.workspace }}" \ + -w "${{ github.workspace }}" \ + -e DEBIAN_FRONTEND=noninteractive \ + -e GITHUB_WORKSPACE="${{ github.workspace }}" \ + -e VERSION="${{ steps.version.outputs.version }}" \ + -e VERSION_SUFFIX="${{ matrix.distro-version }}" \ + -e WORKING_DIRECTORY="${{ github.workspace }}" \ + -e IGNORE_PATH="shared-actions" \ + "${{ matrix.image }}" sleep infinity + docker exec builder bash -c "apt-get update && apt-get install -y curl" + docker exec builder bash shared-actions/deb-generator-action/build-deb.sh - name: Upload artifacts uses: actions/upload-artifact@v7 with: name: ${{ matrix.artifact-name }} - path: | - build/*.deb - build/*.tar.gz + path: artifacts diff --git a/.github/workflows/_linux-builds.yml b/.github/workflows/_linux-builds.yml index 29c2a7c07..3e5438c06 100644 --- a/.github/workflows/_linux-builds.yml +++ b/.github/workflows/_linux-builds.yml @@ -1,3 +1,7 @@ +# Copyright (c) 2026 Analog Devices, Inc. +# +# SPDX-License-Identifier: MIT + name: Linux Builds on: @@ -18,24 +22,36 @@ jobs: include: - image: ubuntu:22.04 artifact-name: Linux-Ubuntu-22.04 + deb: true + distro-version: +Ubuntu22 - image: ubuntu:24.04 artifact-name: Linux-Ubuntu-24.04 + deb: true + distro-version: +Ubuntu24 - image: ubuntu:26.04 artifact-name: Linux-Ubuntu-26.04 + deb: true + distro-version: +Ubuntu26 - image: fedora:42 artifact-name: Linux-Fedora-42 - image: fedora:44 artifact-name: Linux-Fedora-44 - image: debian:bookworm artifact-name: Linux-Debian-12 + deb: true + distro-version: +Debian12 - image: debian:trixie artifact-name: Linux-Debian-13 + deb: true + distro-version: +Debian13 - image: opensuse/leap:15.6 artifact-name: Linux-openSUSE-15.6 - image: opensuse/leap:16.0 artifact-name: Linux-openSUSE-16.0 container: image: ${{ matrix.image }} + env: + DEBIAN_FRONTEND: noninteractive steps: - name: Install dependencies run: | @@ -48,7 +64,7 @@ jobs: apt-get install -y build-essential git cmake libxml2-dev bison flex \ libcdk5-dev libaio-dev libusb-1.0-0-dev libzstd-dev \ libserialport-dev libavahi-client-dev doxygen graphviz man2html \ - python3 python3-pip python3-setuptools wget + python3 python3-pip python3-setuptools wget curl pip3 install sphinx --break-system-packages 2>/dev/null || pip3 install sphinx # Fedora @@ -84,8 +100,26 @@ jobs: make VERBOSE=1 cmake .. -DLICENSE_CHECK=ON export QA_RPATHS=$(( 0x0001|0x0002 )) - make package - make required2tar + if [ "${{ matrix.deb }}" != "true" ]; then + make package + make required2tar + fi + + - name: Get version + if: matrix.deb + id: version + run: | + version=$(grep -oP '(?<=VERSION )[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) + echo "version=${version}" >> "${GITHUB_OUTPUT}" + + - uses: analogdevicesinc/shared-actions/deb-generator-action@242aa00e8eed98e2bd0ee663a9a0597ebec69d89 + if: matrix.deb + id: deb + with: + version: ${{ steps.version.outputs.version }} + version-suffix: ${{ matrix.distro-version }} + ignore-path: | + build - name: Build with Examples if: matrix.artifact-name == 'Linux-Ubuntu-24.04' @@ -104,10 +138,18 @@ jobs: run: ./CI/scripts/check_README_BUILD.sh - name: Upload artifacts + if: "!matrix.deb" uses: actions/upload-artifact@v7 with: name: ${{ matrix.artifact-name }} path: | - build/*.deb build/*.rpm build/*.tar.gz + + - name: Upload artifacts + if: matrix.deb + uses: actions/upload-artifact@v7 + with: + name: ${{ matrix.artifact-name }} + path: | + ${{ steps.deb.outputs.artifact-dir }} diff --git a/artifact_manifest.txt.cmakein b/artifact_manifest.txt.cmakein index cc3aea959..fafa22859 100644 --- a/artifact_manifest.txt.cmakein +++ b/artifact_manifest.txt.cmakein @@ -6,20 +6,15 @@ Linux-Fedora-42/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Fedora-42.tar.gz Linux-Fedora-44/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Fedora-44.rpm Linux-Fedora-44/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Fedora-44.tar.gz -Linux-Debian-12/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-12.deb -Linux-Debian-12/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-12.tar.gz +Linux-Debian-12/libiio_@VERSION@-1_amd64.deb -Linux-Debian-13/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-13.deb -Linux-Debian-13/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Debian-13.tar.gz +Linux-Debian-13/libiio_@VERSION@-1_amd64.deb -Linux-Ubuntu-22.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-22.04.deb -Linux-Ubuntu-22.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-22.04.tar.gz +Linux-Ubuntu-22.04/libiio_@VERSION@-1_amd64.deb -Linux-Ubuntu-24.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-24.04.deb -Linux-Ubuntu-24.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-24.04.tar.gz +Linux-Ubuntu-24.04/libiio_@VERSION@-1_amd64.deb -Linux-Ubuntu-26.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-26.04.deb -Linux-Ubuntu-26.04/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-Ubuntu-26.04.tar.gz +Linux-Ubuntu-26.04/libiio_@VERSION@-1_amd64.deb Linux-openSUSE-15.6/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-openSUSE-15.6.rpm Linux-openSUSE-15.6/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Linux-openSUSE-15.6.tar.gz @@ -42,41 +37,29 @@ macOS-26-x64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@.pkg macOS-27-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-macOS-27-arm64.tar.gz macOS-27-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@.pkg -Ubuntu-22.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm32v7.deb -Ubuntu-22.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm32v7.tar.gz +Ubuntu-22.04-arm32v7/libiio_@VERSION@-1_armhf.deb -Ubuntu-22.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm64v8.deb -Ubuntu-22.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-arm64v8.tar.gz +Ubuntu-22.04-arm64v8/libiio_@VERSION@-1_arm64.deb -Ubuntu-22.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-ppc64le.deb -Ubuntu-22.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-ppc64le.tar.gz +Ubuntu-22.04-ppc64le/libiio_@VERSION@-1_ppc64el.deb -Ubuntu-22.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-s390x.deb -Ubuntu-22.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-22.04-s390x.tar.gz +Ubuntu-22.04-s390x/libiio_@VERSION@-1_s390x.deb -Ubuntu-26.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm32v7.deb -Ubuntu-26.04-arm32v7/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm32v7.tar.gz +Ubuntu-26.04-arm32v7/libiio_@VERSION@-1_armhf.deb -Ubuntu-26.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm64v8.deb -Ubuntu-26.04-arm64v8/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-arm64v8.tar.gz +Ubuntu-26.04-arm64v8/libiio_@VERSION@-1_arm64.deb -Ubuntu-26.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-ppc64le.deb -Ubuntu-26.04-ppc64le/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-ppc64le.tar.gz +Ubuntu-26.04-ppc64le/libiio_@VERSION@-1_ppc64el.deb -Ubuntu-26.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-s390x.deb -Ubuntu-26.04-s390x/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Ubuntu-26.04-s390x.tar.gz +Ubuntu-26.04-s390x/libiio_@VERSION@-1_s390x.deb -Debian-12-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-arm64.deb -Debian-12-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-arm64.tar.gz +Debian-12-arm64/libiio_@VERSION@-1_arm64.deb -Debian-12-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-armhf.deb -Debian-12-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-12-armhf.tar.gz +Debian-12-armhf/libiio_@VERSION@-1_armhf.deb -Debian-13-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-arm64.deb -Debian-13-arm64/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-arm64.tar.gz +Debian-13-arm64/libiio_@VERSION@-1_arm64.deb -Debian-13-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-armhf.deb -Debian-13-armhf/libiio-@VERSION@.g@LIBIIO_VERSION_GIT@-Debian-13-armhf.tar.gz +Debian-13-armhf/libiio_@VERSION@-1_armhf.deb Windows-VS-2022-x64/Windows-msvc-deps.zip Windows-VS-2022-x64/iio/iio.h diff --git a/packaging/debian/changelog b/packaging/debian/changelog new file mode 100644 index 000000000..3e81cffb5 --- /dev/null +++ b/packaging/debian/changelog @@ -0,0 +1,5 @@ +libiio (@VERSION@) UNRELEASED; urgency=low + + * CI release. + + -- Analog Devices Maintainers @DATE@ diff --git a/packaging/debian/clean b/packaging/debian/clean new file mode 100644 index 000000000..011210c3a --- /dev/null +++ b/packaging/debian/clean @@ -0,0 +1,6 @@ +bindings/csharp/AssemblyInfo.cs +bindings/csharp/libiio-sharp.dll +bindings/csharp/libiio-sharp.dll.config +bindings/csharp/libiio-sharp-*.pc +bindings/python/pylibiio.egg-info/ +.pybuild/ diff --git a/packaging/debian/control b/packaging/debian/control new file mode 100644 index 000000000..4fbd7322a --- /dev/null +++ b/packaging/debian/control @@ -0,0 +1,53 @@ +Source: libiio +Section: libs +Priority: optional +Maintainer: Analog Devices Maintainers +Build-Depends: debhelper-compat (= 13), cmake, libxml2-dev, bison, flex, + libcdk5-dev, libaio-dev, libusb-1.0-0-dev, libzstd-dev, + libserialport-dev, libavahi-client-dev, + dh-python, mono-mcs, cli-common-dev +Standards-Version: 4.6.0 +Homepage: https://github.com/analogdevicesinc/libiio +Rules-Requires-Root: no + +Package: libiio +Architecture: @ARCHITECTURE@ +Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: libiio0 (= ${binary:Version}), libiio-dev (= ${binary:Version}), + libiio-utils (= ${binary:Version}), iiod (= ${binary:Version}) +Conflicts: libiio0, libiio-dev, libiio-utils, iiod +Replaces: libiio0, libiio-dev, libiio-utils, iiod +Description: Library for interfacing with IIO devices + libiio is used to interface to the Linux Industrial Input/Output (IIO) + Subsystem. Includes library, development files, utilities, and daemon. + +Package: python3-libiio +Section: python +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends}, libiio (>= ${source:Version}) +Description: Python 3 bindings for libiio + ctypes-based Python bindings for the libiio library for interfacing + with Linux IIO devices. + . + This package contains the Python 3 bindings. + +Package: libiio-cpp +Section: libdevel +Architecture: all +Depends: libiio (>= ${source:Version}), ${misc:Depends} +Description: C++ bindings for libiio (development header) + Header-only C++ wrapper (iio.hpp) around the libiio C API for + interfacing with Linux IIO devices. + . + This package contains the C++ binding header. + +Package: libiio-csharp +Section: cli-mono +Architecture: all +Depends: ${cli:Depends}, ${misc:Depends}, libiio (>= ${source:Version}) +Description: C# bindings for libiio + CLI (Mono/.NET) bindings for the libiio library for interfacing with + Linux IIO devices. + . + This package contains the libiio-sharp assembly, loaded against the + native library at runtime via the bundled dllmap config. diff --git a/packaging/debian/copyright b/packaging/debian/copyright new file mode 100644 index 000000000..71c5e5e11 --- /dev/null +++ b/packaging/debian/copyright @@ -0,0 +1,8 @@ +Files: * +Copyright: 2014-2026 Analog Devices, Inc. +License: LGPL-2.1+ +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU Lesser General Public License as published by the +Free Software Foundation; version 2.1 of the License. +On Debian systems, the complete text of version 2.1 of the GNU Lesser +General Public License can be found in '/usr/share/common-licenses/LGPL-2.1'. diff --git a/packaging/debian/libiio-cpp.install b/packaging/debian/libiio-cpp.install new file mode 100644 index 000000000..49d03f13e --- /dev/null +++ b/packaging/debian/libiio-cpp.install @@ -0,0 +1 @@ +usr/include/iio/iio.hpp diff --git a/packaging/debian/libiio-csharp.install b/packaging/debian/libiio-csharp.install new file mode 100644 index 000000000..0ad07ee98 --- /dev/null +++ b/packaging/debian/libiio-csharp.install @@ -0,0 +1,2 @@ +usr/lib/cli +usr/lib/pkgconfig/libiio-sharp-*.pc diff --git a/packaging/debian/libiio.install b/packaging/debian/libiio.install new file mode 100644 index 000000000..c862f8e7a --- /dev/null +++ b/packaging/debian/libiio.install @@ -0,0 +1,7 @@ +usr/bin +usr/sbin +usr/include/iio/iio*.h +usr/lib/*/libiio.so* +usr/lib/*/pkgconfig/libiio.pc +usr/lib/udev +usr/share/man diff --git a/packaging/debian/python3-libiio.install b/packaging/debian/python3-libiio.install new file mode 100644 index 000000000..eb5441e5f --- /dev/null +++ b/packaging/debian/python3-libiio.install @@ -0,0 +1 @@ +usr/lib/python3*/dist-packages diff --git a/packaging/debian/rules b/packaging/debian/rules new file mode 100644 index 000000000..805fc5439 --- /dev/null +++ b/packaging/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake --with python3,cli + +override_dh_auto_configure: + dh_auto_configure -- \ + -DCPP_BINDINGS=ON \ + -DCSHARP_BINDINGS=ON \ + -DWITH_SERIAL_BACKEND=ON \ + -DWITH_EMU_BACKEND=ON \ + -DWITH_MAN=ON \ + -DUDEV_RULES_INSTALL_DIR=/usr/lib/udev/rules.d \ + -DCMAKE_SKIP_RPATH=ON + +override_dh_auto_install: + dh_auto_install + # pyproject.toml needs setuptools>=77, newer than most target distros; the binding is one pure-ctypes module + install -D -m0644 bindings/python/iio/__init__.py \ + debian/tmp/usr/lib/python3/dist-packages/iio/__init__.py + +# libiio is resolved at runtime through libiio-sharp.dll.config, not via shlibs +override_dh_clideps: + dh_clideps --exclude-moduleref=libiio diff --git a/packaging/debian/source/format b/packaging/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/packaging/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)