diff --git a/common/shlibs b/common/shlibs index 6acbb4097f0..61f21bc3b94 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4201,3 +4201,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1 +libairspyhf.so.0 libairspyhf-1.6.8_1 diff --git a/srcpkgs/airspyhf/patches/fix-libm-linking.patch b/srcpkgs/airspyhf/patches/fix-libm-linking.patch new file mode 100644 index 00000000000..73f888ffd4b --- /dev/null +++ b/srcpkgs/airspyhf/patches/fix-libm-linking.patch @@ -0,0 +1,28 @@ +https://github.com/airspy/airspyhf/pull/35 +https://build.opensuse.org/package/view_file/openSUSE:Factory/airspyhf/airspyhf-fix-libm-linking.patch + +diff --git a/libairspyhf/src/CMakeLists.txt b/libairspyhf/src/CMakeLists.txt +index 9d8d483..da1f966 100644 +--- a/libairspyhf/src/CMakeLists.txt ++++ b/libairspyhf/src/CMakeLists.txt +@@ -58,7 +58,7 @@ set_target_properties(airspyhf PROPERTIES CLEAN_DIRECT_OUTPUT 1) + set_target_properties(airspyhf-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + + # Dependencies +-target_link_libraries(airspyhf ${LIBUSB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) ++target_link_libraries(airspyhf ${LIBUSB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} m) + + # For cygwin just force UNIX OFF and WIN32 ON + if( ${CYGWIN} ) + +diff --git a/libairspyhf/libairspyhf.pc.in b/libairspyhf/libairspyhf.pc.in +index fcf040b..ca5214f 100644 +--- a/libairspyhf/libairspyhf.pc.in ++++ b/libairspyhf/libairspyhf.pc.in +@@ -7,5 +7,5 @@ Name: AirSpy HF+ Library + Description: C Utility Library + Version: @VERSION@ + Cflags: -I${includedir}/libairspyhf/ @AIRSPYHF_PC_CFLAGS@ +-Libs: -L${libdir} -lairspyhf ++Libs: -L${libdir} -lairspyhf -lm + Libs.private: @AIRSPYHF_PC_LIBS@ diff --git a/srcpkgs/airspyhf/template b/srcpkgs/airspyhf/template new file mode 100644 index 00000000000..dc306e6d333 --- /dev/null +++ b/srcpkgs/airspyhf/template @@ -0,0 +1,37 @@ +# Template file for 'airspyhf' +pkgname=airspyhf +version=1.6.8 +revision=1 +build_style=cmake +hostmakedepends="pkg-config" +makedepends="libusb-devel" +short_desc="Usermode driver and tools for Airspy HF+" +maintainer="classabbyamp " +license="BSD-3-Clause" +homepage="https://github.com/airspy/airspyhf" +distfiles="https://github.com/airspy/airspyhf/archive/refs/tags/${version}.tar.gz" +checksum=cd1e5ae89e09b813b096ae4a328e352c9432a582e03fd7da86760ba60efa77ab + +post_install() { + vlicense LICENSE +} + +libairspyhf_package() { + short_desc+=" - library" + pkg_install() { + vmove usr/lib/*.so.* + vsed -e 's/GROUP="plugdev"/\0, TAG+="uaccess"/' -i tools/52-airspyhf.rules + vinstall tools/52-airspyhf.rules 644 usr/lib/udev/rules.d/ + } +} + +libairspyhf-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +} diff --git a/srcpkgs/libairspyhf b/srcpkgs/libairspyhf new file mode 120000 index 00000000000..9a1c1cdae34 --- /dev/null +++ b/srcpkgs/libairspyhf @@ -0,0 +1 @@ +airspyhf \ No newline at end of file diff --git a/srcpkgs/libairspyhf-devel b/srcpkgs/libairspyhf-devel new file mode 120000 index 00000000000..9a1c1cdae34 --- /dev/null +++ b/srcpkgs/libairspyhf-devel @@ -0,0 +1 @@ +airspyhf \ No newline at end of file