Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github/workflow: undo 20.04, change deps sources
Browse files Browse the repository at this point in the history
Remove workflow to generate for Ubuntu 20.04, due to some missing
deps.
For Ubuntu 22.04, use dependencies from the main ubuntu repositories.
The workflow will not generate iio-osc with libad9166 plugin, since it
is not included the main ubuntu repositories.

Signed-off-by: Jorge Marques <[email protected]>
gastmaier committed Mar 24, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 22ad520 commit 689db60
Showing 4 changed files with 18 additions and 108 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/build-deb-ubuntu-20.04.yml

This file was deleted.

16 changes: 1 addition & 15 deletions .github/workflows/build-deb-ubuntu-22.04.yml
Original file line number Diff line number Diff line change
@@ -14,24 +14,10 @@ jobs:
run: sudo apt-get update &&
sudo apt-get install -y
build-essential cmake git
libcurl4-openssl-dev
libcurl4-openssl-dev libad9361-dev
libaio-dev libiio-dev libgtkdatabox-dev
libjansson-dev libmatio-dev libfftw3-dev

- name: Build libad9166-iio
run: |
git -c http.sslVerify=false clone https://github.com/analogdevicesinc/libad9166-iio
mkdir libad9166-iio/build && cd $_
cmake ..
make && sudo make install
- name: Build libad9361-iio
run: |
git -c http.sslVerify=false clone -b v0.2 https://github.com/analogdevicesinc/libad9361-iio
mkdir libad9361-iio/build && cd $_
cmake ..
make && sudo make install
- name: Generate deb package
run: mkdir build && cd $_ &&
cmake -DENABLE_PACKAGING=ON .. && make package
24 changes: 0 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -259,30 +259,6 @@ install(TARGETS osc
)
install(TARGETS oscmain RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

if(ENABLE_PACKAGING)
# Ubuntu 20.04 does not have GtkDataBox 1.0.0,
# until we drop support, bundle it.
get_filename_component(GTKDATABOX_LIBRARIES_REALPATH "${GTKDATABOX_LIBDIR}/libgtkdatabox.so" REALPATH)
install(
FILES "${GTKDATABOX_LIBRARIES_REALPATH}"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
# Bundle libad*-iio, so the user does not need to install those first.
if (LIBAD9361_LIBRARIES)
get_filename_component(LIBAD9361_LIBRARIES_REALPATH "${LIBAD9361_LIBRARIES}" REALPATH)
install(
FILES "${LIBAD9361_LIBRARIES_REALPATH}"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
if (LIBAD9166_LIBRARIES)
get_filename_component(LIBAD9166_LIBRARIES_REALPATH "${LIBAD9166_LIBRARIES}" REALPATH)
install(
FILES "${LIBAD9166_LIBRARIES_REALPATH}"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
endif()
# Set default CMAKE_PREFIX_PATH to CMAKE_SYSTEM_PREFIX_PATH
set(CMAKE_PREFIX_PATH ${CMAKE_SYSTEM_PREFIX_PATH})

27 changes: 17 additions & 10 deletions cmake/LinuxPackaging.cmake
Original file line number Diff line number Diff line change
@@ -4,25 +4,32 @@ set(CPACK_GENERATOR TGZ)

FIND_PROGRAM(RPMBUILD_CMD rpmbuild)
if (RPMBUILD_CMD)
# Manual setup of rpm requires, Fedora centric
# Check if optional dependency is included
if(LIBAD9361_LIBRARIES)
set(LIBAD9361_RPM "libad9361 >= 0.2")
endif()
if(LIBAD9166_LIBRARIES)
set(LIBAD9166_RPM "libad9166 >= 0.2")
endif()
# Manual setup of rpm requires, Fedora >= 36 centric
set(CPACK_PACKAGE_RELOCATABLE OFF)
set(CPACK_GENERATOR ${CPACK_GENERATOR};RPM)
set(CPACK_RPM_PACKAGE_REQUIRES "libiio >= 0.23, gtk3 >= 3.24, jansson > 2.12, matio >= 1.5.17, fftw >= 3.3.8, curl >= 7.68.0")
set(CPACK_RPM_PACKAGE_REQUIRES "libiio >= 0.23, gtk3 >= 3.24, jansson > 2.12, matio >= 1.5.17, fftw >= 3.3.8, curl >= 7.68.0, ${LIBAD9361_RPM}, ${LIBAD9166_RPM}")
message(STATUS "Package dependencies (.rpm): " ${CPACK_RPM_PACKAGE_REQUIRES})
endif()

FIND_PROGRAM(DEBBUILD_CMD dpkg)
if (DEBBUILD_CMD)
# Manual setup of deb dependencies, Ubuntu (>= 20.04) centric
# Obtain package name corresponding to version in .pc file
set(CPACK_GENERATOR ${CPACK_GENERATOR};DEB)
if (${MATIO_VERSION} VERSION_GREATER 1.5.21 OR ${MATIO_VERSION} VERSION_EQUAL 1.5.21 )
set(MATIO_PACKAGE "libmatio11 (>= 1.5.21)")
else()
set(MATIO_PACKAGE "libmatio9 (>= 1.5.17)")
# Check if optional dependency is included
if(LIBAD9361_LIBRARIES)
set(LIBAD9361_DEB "libad9361-0 (>= 0.2) | libad9361 (>= 0.2)")
endif()
if(LIBAD9166_LIBRARIES)
set(LIBAD9166_DEB "libad9166 (>= 0.2)")
endif()
set(CPACK_GENERATOR ${CPACK_GENERATOR};DEB)

set(CPACK_DEBIAN_PACKAGE_DEPENDS "libiio0 (>= 0.19), libgtk-3-0 (>= 3.24.18), libjansson4 (> 2.12), ${MATIO_PACKAGE}, libfftw3-3 (>= 3.3.8), libcurl4 (>= 7.68.0)")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libiio0 (>= 0.23) | libiio (>= 0.23), libgtk-3-0 (>= 3.24.18), libjansson4 (> 2.12), libmatio11 (>= 1.5.21), libfftw3-3 (>= 3.3.8), libcurl4 (>= 7.68.0), ${LIBAD9361_DEB}, ${LIBAD9166_DEB}")
message(STATUS "Package dependencies (.deb): " ${CPACK_DEBIAN_PACKAGE_DEPENDS})
endif()

0 comments on commit 689db60

Please sign in to comment.