commit 46bbe1095028d3f92977f783f7af352bb4086a56
Author: Jaroslav Škarvada <jskarvad(a)redhat.com>
Date: Sat Oct 6 13:21:50 2018 +0200
Fixed issues found by review
.gitignore | 1 +
gr-dab-0.2.1-install-apps.patch | 35 ++++++++++++++++
gr-dab-0.2.1-libdir-fix.patch | 11 +++++
gr-dab-0.2.1-traceback-fix.patch | 66 ++++++++++++++++++++++++++++++
gr-dab.spec | 87 ++++++++++++++++++++++++++++++++++++++++
sources | 1 +
6 files changed, 201 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c0334ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/gr-dab-a33609bd75192878f9f60c1a9b02fd7473649160.tar.gz
diff --git a/gr-dab-0.2.1-install-apps.patch b/gr-dab-0.2.1-install-apps.patch
new file mode 100644
index 0000000..846a287
--- /dev/null
+++ b/gr-dab-0.2.1-install-apps.patch
@@ -0,0 +1,35 @@
+From 54565ec326d5831252ed327b6032d6b63184a10c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad(a)redhat.com>
+Date: Tue, 25 Sep 2018 23:01:41 +0200
+Subject: [PATCH] Install all apps
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It seems the apps are useful so install them.
+
+Signed-off-by: Jaroslav Škarvada <jskarvad(a)redhat.com>
+---
+ apps/CMakeLists.txt | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
+index 3c5196d..716a5d2 100644
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -22,5 +22,12 @@ include(GrPython)
+ GR_PYTHON_INSTALL(
+ PROGRAMS
+ grdab
++ dab_rx_constellation.py
++ rtl_sdr_dab_calibrate.py
++ rtl_sdr_dab_rx.py
++ rtl_sdr_dab_rx_constellation.py
++ usrp_dab_rx.py
++ usrp_dab_rx_audio.py
++ usrp_dab_tx.py
+ DESTINATION bin
+ )
+--
+2.14.4
+
diff --git a/gr-dab-0.2.1-libdir-fix.patch b/gr-dab-0.2.1-libdir-fix.patch
new file mode 100644
index 0000000..cc3151b
--- /dev/null
+++ b/gr-dab-0.2.1-libdir-fix.patch
@@ -0,0 +1,11 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fd3d39a..610a2c6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -170,5 +170,5 @@ add_subdirectory(docs)
+ # Install cmake search helper for this library
+ ########################################################################
+ install(FILES cmake/Modules/dabConfig.cmake
+- DESTINATION lib/cmake/grdab
++ DESTINATION lib${LIB_SUFFIX}/cmake/grdab
+ )
diff --git a/gr-dab-0.2.1-traceback-fix.patch b/gr-dab-0.2.1-traceback-fix.patch
new file mode 100644
index 0000000..0e424e2
--- /dev/null
+++ b/gr-dab-0.2.1-traceback-fix.patch
@@ -0,0 +1,66 @@
+From f24481135596f1e1c92a31747b0a7394cc2fa143 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek(a)redhat.com>
+Date: Mon, 24 Sep 2018 19:48:03 +0200
+Subject: [PATCH] apps: Fix a traceback in set_gain_mode
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Ondřej Lysoněk <olysonek(a)redhat.com>
+---
+ apps/rtl_sdr_dab_calibrate.py | 2 +-
+ apps/rtl_sdr_dab_rx.py | 4 ++--
+ apps/rtl_sdr_dab_rx_constellation.py | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/apps/rtl_sdr_dab_calibrate.py b/apps/rtl_sdr_dab_calibrate.py
+index 99164fb..47e216e 100755
+--- a/apps/rtl_sdr_dab_calibrate.py
++++ b/apps/rtl_sdr_dab_calibrate.py
+@@ -70,7 +70,7 @@ class rtl_sdr_dab_cal(gr.top_block):
+ # set gain
+ if options.rx_gain is None:
+ # if no gain was specified, use AGC
+- self.src.set_gain_mode(1, 0)
++ self.src.set_gain_mode(True, 0)
+ else:
+ self.src.set_gain(options.rx_gain, 0)
+
+diff --git a/apps/rtl_sdr_dab_rx.py b/apps/rtl_sdr_dab_rx.py
+index 9a6bf77..0ed0415 100755
+--- a/apps/rtl_sdr_dab_rx.py
++++ b/apps/rtl_sdr_dab_rx.py
+@@ -66,7 +66,7 @@ class rtl_sdr_dab_rx(gr.top_block):
+ self.src.set_sample_rate(sample_rate)
+ #self.src.set_center_freq(209.936e6, 0)
+ self.src.set_freq_corr(options.ppm)
+- self.src.set_gain_mode(1, 0)
++ self.src.set_gain_mode(True, 0)
+ self.src.set_gain(0, 0)
+
+ self.dab_params = grdab.parameters.dab_parameters(
+@@ -105,7 +105,7 @@ class rtl_sdr_dab_rx(gr.top_block):
+ # set gain
+ if options.rx_gain is None:
+ # if no gain was specified, use AGC
+- self.src.set_gain_mode(1, 0)
++ self.src.set_gain_mode(True, 0)
+ else:
+ self.src.set_gain(options.rx_gain, 0)
+
+diff --git a/apps/rtl_sdr_dab_rx_constellation.py b/apps/rtl_sdr_dab_rx_constellation.py
+index 3fcde71..83f67c0 100755
+--- a/apps/rtl_sdr_dab_rx_constellation.py
++++ b/apps/rtl_sdr_dab_rx_constellation.py
+@@ -75,7 +75,7 @@ class usrp_dab_gui_rx(stdgui2.std_top_block):
+ # set gain
+ if options.rx_gain is None:
+ # if no gain was specified, use AGC
+- self.src.set_gain_mode(1, 0)
++ self.src.set_gain_mode(True, 0)
+ else:
+ self.src.set_gain(options.rx_gain, 0)
+
+--
+2.17.1
+
diff --git a/gr-dab.spec b/gr-dab.spec
new file mode 100644
index 0000000..29257c5
--- /dev/null
+++ b/gr-dab.spec
@@ -0,0 +1,87 @@
+%global git_commit a33609bd75192878f9f60c1a9b02fd7473649160
+%global git_date 20180925
+
+%global git_short_commit %(echo %{git_commit} | cut -c -8)
+%global git_suffix %{git_date}git%{git_short_commit}
+
+Name: gr-dab
+URL:
https://github.com/andrmuel/gr-dab
+Version: 0.2.1
+Release: 2.%{git_suffix}%{?dist}
+License: GPLv3+
+BuildRequires: cmake, gcc-c++, python2-devel, scipy, gnuradio-devel
+BuildRequires: python2-matplotlib, cppunit-devel, boost-devel, doxygen
+BuildRequires: swig, faad2-devel, findutils
+Requires: scipy, python2-matplotlib
+Summary: GNU Radio DAB digital audio broadcasting module
+Source0: %{url}/archive/%{git_commit}/%{name}-%{git_commit}.tar.gz
+#
https://github.com/andrmuel/gr-dab/pull/16
+Patch0: gr-dab-0.2.1-libdir-fix.patch
+#
https://github.com/andrmuel/gr-dab/pull/17
+Patch1: gr-dab-0.2.1-install-apps.patch
+#
https://github.com/andrmuel/gr-dab/pull/18
+Patch2: gr-dab-0.2.1-traceback-fix.patch
+
+%description
+GNU Radio DAB digital audio broadcasting module.
+
+%package devel
+Summary: Development files for gr-dab
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Development files for gr-dab.
+
+%package doc
+Summary: Documentation files for gr-dab
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation files for gr-dab.
+
+%prep
+%autosetup -p1 -n %{name}-%{git_commit}
+
+%build
+mkdir build
+cd build
+%cmake -DENABLE_DOXYGEN=on ..
+%make_build
+
+%install
+cd build
+%make_install
+
+# remove hashbangs
+pushd %{buildroot}%{python2_sitearch}/grdab
+find . -type f -exec sed -i '/^[ \t]*#!\/usr\/bin\/\(env\|python\)/ d' {} \;
+popd
+
+%ldconfig_scriptlets
+
+%files
+%license COPYING
+%doc AUTHORS README.md THANKS
+%exclude %{_docdir}/%{name}/html
+%exclude %{_docdir}/%{name}/xml
+%{_datadir}/gnuradio/grc/blocks/*
+%{_libdir}/libgnuradio-dab.so.3.*
+%{python2_sitearch}/grdab
+%{_bindir}/*
+
+%files devel
+%{_includedir}/grdab
+%{_libdir}/*.so
+%{_libdir}/cmake/grdab
+
+%files doc
+%doc %{_docdir}/%{name}/html
+%doc %{_docdir}/%{name}/xml
+
+%changelog
+* Wed Sep 26 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> -
0.2.1-2.20180925gita33609bd
+- Fixed issues found by review
+
+* Tue Sep 25 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> -
0.2.1-1.20180925gita33609bd
+- Initial version
diff --git a/sources b/sources
index e69de29..e3d7a29 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+191764b65ef0c1c7fddfc375610ad44d gr-dab-a33609bd75192878f9f60c1a9b02fd7473649160.tar.gz