From 9a84feddda2e904e0df6abfd85e129ae8c438e8f754cbdd1b0a87f376e3fb088 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Tue, 18 Jul 2017 06:26:49 +0000 Subject: [PATCH] Accepting request 511050 from home:mnhauke:sdr-devel initial package for airspyhf OBS-URL: https://build.opensuse.org/request/show/511050 OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/airspyhf?expand=0&rev=1 --- .gitattributes | 23 ++++++ .gitignore | 1 + _service | 16 +++++ _servicedata | 4 ++ airspyhf-0.0.0+git.20170716.tar.xz | 3 + airspyhf-fix-libm-linking.patch | 13 ++++ airspyhf.changes | 5 ++ airspyhf.spec | 110 +++++++++++++++++++++++++++++ 8 files changed, 175 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 _servicedata create mode 100644 airspyhf-0.0.0+git.20170716.tar.xz create mode 100644 airspyhf-fix-libm-linking.patch create mode 100644 airspyhf.changes create mode 100644 airspyhf.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..8c3ed34 --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + https://github.com/airspy/airspyhf.git + master + git + enable + airspyhf + 0.0.0+git.%cd + + + *.tar + xz + + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..847b34b --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/airspy/airspyhf.git + a0ab4035bbcb92447be0e5abe58520b03868528a \ No newline at end of file diff --git a/airspyhf-0.0.0+git.20170716.tar.xz b/airspyhf-0.0.0+git.20170716.tar.xz new file mode 100644 index 0000000..382bd68 --- /dev/null +++ b/airspyhf-0.0.0+git.20170716.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc2333190885d411849f312fa88862822a2935f0881ed02fed50d586e324f4b8 +size 16636 diff --git a/airspyhf-fix-libm-linking.patch b/airspyhf-fix-libm-linking.patch new file mode 100644 index 0000000..12cd67e --- /dev/null +++ b/airspyhf-fix-libm-linking.patch @@ -0,0 +1,13 @@ +diff --git a/libairspyhf/src/CMakeLists.txt b/libairspyhf/src/CMakeLists.txt +index 2ab698b..21be9ed 100644 +--- a/libairspyhf/src/CMakeLists.txt ++++ b/libairspyhf/src/CMakeLists.txt +@@ -63,7 +63,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/airspyhf.changes b/airspyhf.changes new file mode 100644 index 0000000..c48e45e --- /dev/null +++ b/airspyhf.changes @@ -0,0 +1,5 @@ + +------------------------------------------------------------------- +Mon Jul 17 19:09:58 UTC 2017 - mardnh@gmx.de + +- Initial package, version 0.0.0+git.20170716 diff --git a/airspyhf.spec b/airspyhf.spec new file mode 100644 index 0000000..68aada5 --- /dev/null +++ b/airspyhf.spec @@ -0,0 +1,110 @@ +# +# spec file for package airspyhf +# +# Copyright (c) 2017, Martin Hauke +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define sover 0 +%define airspyhf_group airspyhf +%define libname lib%{name}%{sover} +Name: airspyhf +Version: 0.0.0+git.20170716 +Release: 0 +Summary: Support programs for Airspy HF+ SDR +License: BSD-2-Clause or MIT +Group: Productivity/Hamradio/Other +Url: http://www.airspy.com/airspy-hf-plus +#Git-Clone: https://github.com/airspy/airspyhf.git +Source: %{name}-%{version}.tar.xz +Patch0: airspyhf-fix-libm-linking.patch +BuildRequires: cmake >= 2.8 +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(udev) + +%description +Host software for Airspy HF+, a high performance software defined radio +for the HF and VHF bands. + +%package -n %{libname} +Summary: Driver for Airspy HF+ +Group: System/Libraries +Requires: %{name}-udev + +%description -n %{libname} +Library to run Airspy HF+ SDR receiver. + +%package udev +Summary: Udev rules for Airspy HF+ SDR +Group: Hardware/Other +Requires(pre): shadow + +%description udev +Udev rules for Airspy HF+ SDR. + +%package devel +Summary: Development files for Airspy HF+ +Group: Development/Libraries/Other +Requires: %{libname} = %{version} + +%description devel +Library headers for Airspy HF+ driver. + +%prep +%setup -q +%patch0 -p1 + +# HACK: set udev group to airspyhf +sed -i "s/plugdev/airspyhf/g" tools/52-airspyhf.rules + +%build +%cmake \ + -DINSTALL_UDEV_RULES=ON +make %{?_smp_mflags} + +%install +%cmake_install +rm %{buildroot}%{_libdir}/libairspyhf.a + +mkdir -p %{buildroot}%{_udevrulesdir} +mv %{buildroot}%{_sysconfdir}/udev/rules.d/52-airspyhf.rules %{buildroot}%{_udevrulesdir} + +%post -n %{libname} -p /sbin/ldconfig +%postun -n %{libname} -p /sbin/ldconfig +%pre udev +getent group %{airspyhf_group} >/dev/null || groupadd -r %{airspyhf_group} + +%post udev +%udev_rules_update + +%postun udev +%udev_rules_update + +%files +%doc README.md + +%files -n %{libname} +%{_libdir}/libairspyhf.so.* + +%files udev +%{_udevrulesdir}/52-airspyhf.rules + +%files devel +%{_libdir}/libairspyhf.so +%{_includedir}/libairspyhf +%{_libdir}/pkgconfig/libairspyhf.pc + +%changelog