[gr-fcdproplus] Initial import (#1150512)

Jaroslav Škarvada jskarvad at fedoraproject.org
Tue Oct 14 08:07:25 UTC 2014


commit fbb0b7a50dfedd54fd9823bcb54a3d72c7f9b4a6
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date:   Tue Oct 14 10:07:05 2014 +0200

    Initial import (#1150512)

 .gitignore                            |    1 +
 10-fcdproplus.rules                   |    2 +
 gr-fcdproplus-0-doxygen-fix.patch     |   13 ++++
 gr-fcdproplus-0-soname-fix.patch      |   13 ++++
 gr-fcdproplus-0-unbundle-hidapi.patch |   36 +++++++++++
 gr-fcdproplus.spec                    |  106 +++++++++++++++++++++++++++++++++
 sources                               |    1 +
 7 files changed, 172 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2f62669 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/gr-fcdproplus-1edbe5230e1e8ec2c634bd1370ef84ea26e9cbc6.tar.gz
diff --git a/10-fcdproplus.rules b/10-fcdproplus.rules
new file mode 100644
index 0000000..03eb2a4
--- /dev/null
+++ b/10-fcdproplus.rules
@@ -0,0 +1,2 @@
+# FUNcube Dongle Pro+
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fb56", MODE:="0660", ENV{ID_SOFTWARE_RADIO}="1"
diff --git a/gr-fcdproplus-0-doxygen-fix.patch b/gr-fcdproplus-0-doxygen-fix.patch
new file mode 100644
index 0000000..9133126
--- /dev/null
+++ b/gr-fcdproplus-0-doxygen-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c0c3c0c..fd4e337 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -102,6 +102,8 @@ if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+     endif()
+ endif()
+ 
++find_package(Doxygen)
++
+ ########################################################################
+ # Setup the include and linker paths
+ ########################################################################
diff --git a/gr-fcdproplus-0-soname-fix.patch b/gr-fcdproplus-0-soname-fix.patch
new file mode 100644
index 0000000..d474b18
--- /dev/null
+++ b/gr-fcdproplus-0-soname-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
+index 20143dd..6568689 100644
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -65,6 +65,8 @@ if(APPLE)
+ endif()
+ 
+ set_target_properties(gnuradio-fcdproplus PROPERTIES DEFINE_SYMBOL "gnuradio_fcdproplus_EXPORTS")
++set_target_properties(gnuradio-fcdproplus PROPERTIES SOVERSION 0)
++set_target_properties(gnuradio-fcdproplus PROPERTIES VERSION 0.0.0)
+ 
+ MESSAGE(STATUS "Audio LIBS: ${GNURADIO_AUDIO_LIBRARIES}")
+ 
diff --git a/gr-fcdproplus-0-unbundle-hidapi.patch b/gr-fcdproplus-0-unbundle-hidapi.patch
new file mode 100644
index 0000000..de68d22
--- /dev/null
+++ b/gr-fcdproplus-0-unbundle-hidapi.patch
@@ -0,0 +1,36 @@
+diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
+index a2d04f4..20143dd 100644
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -35,8 +35,6 @@ list(APPEND fcdproplus_sources
+ 
+ if(APPLE)
+   list(APPEND fcdproplus_sources ${CMAKE_CURRENT_SOURCE_DIR}/hid/hidmac.c)
+-else()
+-  list(APPEND fcdproplus_sources ${CMAKE_CURRENT_SOURCE_DIR}/hid/hid.c)
+ endif()
+ 
+ if(APPLE)
+@@ -45,7 +43,8 @@ if(APPLE)
+   FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)
+   list(APPEND fcdproplus_libs ${COREFOUNDATION_LIBRARY})
+ else()
+-  list(APPEND fcdproplus_libs ${LIBUSB_LIBRARIES} )
++  FIND_LIBRARY(HIDAPI_LIBRARY hidapi-libusb)
++  list(APPEND fcdproplus_libs ${LIBUSB_LIBRARIES} ${HIDAPI_LIBRARY} )
+ endif()
+ 
+ add_library(gnuradio-fcdproplus SHARED ${fcdproplus_sources})
+diff --git a/lib/fcdproplus_impl.h b/lib/fcdproplus_impl.h
+index 1644ce7..fba4af7 100644
+--- a/lib/fcdproplus_impl.h
++++ b/lib/fcdproplus_impl.h
+@@ -23,7 +23,7 @@
+ 
+ #include <fcdproplus/fcdproplus.h>
+ #include <gnuradio/audio/source.h>
+-#include "hidapi.h"
++#include <hidapi/hidapi.h>
+ 
+ namespace gr {
+   namespace fcdproplus {
diff --git a/gr-fcdproplus.spec b/gr-fcdproplus.spec
new file mode 100644
index 0000000..292e300
--- /dev/null
+++ b/gr-fcdproplus.spec
@@ -0,0 +1,106 @@
+%global git_commit 1edbe5230e1e8ec2c634bd1370ef84ea26e9cbc6
+%global git_date 20140920
+
+%global git_short_commit %(echo %{git_commit} | cut -c -8)
+%global git_suffix %{git_date}git%{git_short_commit}
+
+Name:             gr-fcdproplus
+URL:              https://github.com/dl1ksv/gr-fcdproplus
+Version:          0
+Release:          0.3.%{git_suffix}%{?dist}
+License:          GPLv3+
+BuildRequires:    cmake, gnuradio-devel, dos2unix, hidapi-devel, doxygen
+BuildRequires:    graphviz, swig, alsa-lib-devel, libusb-devel
+Requires(post):   /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+Group:            Applications/Communications
+Summary:          GNURadio support for FUNcube Dongle Pro+
+Source0:          https://github.com/dl1ksv/%{name}/archive/%{git_commit}/%{name}-%{git_commit}.tar.gz
+Source1:          10-fcdproplus.rules
+# Upstream ticket: https://github.com/dl1ksv/gr-fcdproplus/issues/8
+Patch0:           gr-fcdproplus-0-unbundle-hidapi.patch
+# Upstream ticket: https://github.com/dl1ksv/gr-fcdproplus/issues/4
+Patch1:           gr-fcdproplus-0-doxygen-fix.patch
+# Sent upstream: https://github.com/dl1ksv/gr-fcdproplus/pull/10
+Patch2:           gr-fcdproplus-0-soname-fix.patch
+
+%description
+GNURadio support for FUNcube Dongle Pro+.
+
+%package devel
+Summary:          Development files for gr-fcdproplus
+Group:            Applications/Communications
+Requires:         %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Development files for gr-fcdproplus.
+
+%package doc
+Summary:          Documentation files for gr-fcdproplus
+Group:            Applications/Communications
+Requires:         %{name} = %{version}-%{release}
+BuildArch:        noarch
+
+%description doc
+Documentation files for gr-fcdproplus.
+
+%prep
+%setup -qn %{name}-%{git_commit}
+%patch0 -p1 -b .unbundle-hidapi
+%patch1 -p1 -b .doxygen-fix
+%patch2 -p1 -b .soname-fix
+
+# Unbundle hidapi
+rm -rf lib/hid
+
+# Convert CR + LF to LF
+# Sent upstream: https://github.com/dl1ksv/gr-fcdproplus/pull/11
+dos2unix lib/fcdcmd.h
+
+%build
+mkdir build
+cd build
+# used -Wl,--as-needed to fix unused-direct-shlib-dependency rpmlint warning
+export LDFLAGS="-Wl,--as-needed %{?__global_ldflags}"
+%cmake -DENABLE_DOXYGEN=on -DGR_PKG_DOC_DIR=%{_docdir}/%{name} ..
+# parallel build is currently broken
+make
+
+%install
+cd build
+make install DESTDIR=%{buildroot}
+
+# udev rule
+install -Dpm 0644 %{S:1} %{buildroot}%{_prefix}/lib/udev/rules.d/10-fcdproplus.rules
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%exclude %{_docdir}/%{name}/html
+%exclude %{_docdir}/%{name}/xml
+%doc COPYING README
+%{_libdir}/*.so.*
+%{python_sitearch}/*
+%{_datadir}/gnuradio/grc/blocks/*
+%{_prefix}/lib/udev/rules.d/10-fcdproplus.rules
+
+%files devel
+%{_includedir}/fcdproplus
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/*.so
+
+%files doc
+%doc %{_docdir}/%{name}/html
+%doc %{_docdir}/%{name}/xml
+
+%changelog
+* Fri Oct 10 2014 Jaroslav Škarvada <jskarvad at redhat.com> - 0-0.3.20140920git1edbe523
+- Used github URL in sources
+
+* Fri Oct 10 2014 Jaroslav Škarvada <jskarvad at redhat.com> - 0-0.2.20140920git1edbe523
+- Fixed package according to fedora review comments
+
+* Sat Sep 20 2014 Jaroslav Škarvada <jskarvad at redhat.com> - 0-0.1.20140920git1edbe523
+- Initial release
diff --git a/sources b/sources
index e69de29..2b3c99d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+caf65b99d1b046d56186ad4c362c75ba  gr-fcdproplus-1edbe5230e1e8ec2c634bd1370ef84ea26e9cbc6.tar.gz


More information about the scm-commits mailing list