commit 994851570c4fe20bf355e311cf948249f9b48263
Author: Jaroslav Škarvada <jskarvad(a)redhat.com>
Date: Mon Oct 29 12:26:24 2018 +0100
Initial version (#5042)
Signed-off-by: Jaroslav Škarvada <jskarvad(a)redhat.com>
.gitignore | 1 +
dream-2.1.1-use-system-libs.patch | 58 ++++++++++++++++++++++++++++++++
dream.desktop | 7 ++++
dream.spec | 71 +++++++++++++++++++++++++++++++++++++++
sources | 1 +
5 files changed, 138 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..8cbe3d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/dream-2.1.1-svn808.tar.gz
diff --git a/dream-2.1.1-use-system-libs.patch b/dream-2.1.1-use-system-libs.patch
new file mode 100644
index 0000000..8560897
--- /dev/null
+++ b/dream-2.1.1-use-system-libs.patch
@@ -0,0 +1,58 @@
+diff --git a/dream.pro b/dream.pro
+index 384bfda..974a902 100644
+--- a/dream.pro
++++ b/dream.pro
+@@ -3,8 +3,6 @@ CONFIG += warn_on
+ TARGET = dream
+ OBJECTS_DIR = obj
+ DEFINES += EXECUTABLE_NAME=$$TARGET
+-LIBS += -L$$OUT_PWD/lib
+-INCLUDEPATH += $$OUT_PWD/include
+ contains(QT_VERSION, ^4\\..*) {
+ CONFIG += qt qt4
+ VERSION_MESSAGE = Qt 4
+@@ -144,7 +142,7 @@ unix:!cross_compile {
+ packagesExist(gpsd) {
+ CONFIG += gps
+ }
+- packagesExist(pcap) {
++ exists(/usr/include/pcap.h) {
+ CONFIG += pcap
+ }
+ packagesExist(opus) {
+@@ -225,13 +223,13 @@ win32 {
+ LIBS += -lz
+ }
+ }
+-exists($$OUT_PWD/include/neaacdec.h) {
++exists(/usr/include/neaacdec.h) {
+ DEFINES += HAVE_LIBFAAD \
+ USE_FAAD2_LIBRARY
+ LIBS += -lfaad_drm
+ message("with FAAD2")
+ }
+-exists($$OUT_PWD/include/faac.h) {
++exists(/usr/include/faac.h) {
+ DEFINES += HAVE_LIBFAAC \
+ USE_FAAC_LIBRARY
+ LIBS += -lfaac_drm
+@@ -298,7 +296,7 @@ qwt {
+ LIBS += -lqwtd
+ } else {
+ # unix | win release
+- LIBS += -lqwt
++ LIBS += -lqwt-qt5
+ }
+ }
+ !crosscompile {
+@@ -327,8 +325,8 @@ qwt {
+ }
+ }
+ }
+- exists($$OUT_PWD/include/qwt/qwt.h) {
+- INCLUDEPATH += $$OUT_PWD/include/qwt
++ exists(/usr/include/qt5/qwt/qwt.h) {
++ INCLUDEPATH += /usr/include/qt5/qwt
+ }
+ }
+ alsa {
diff --git a/dream.desktop b/dream.desktop
new file mode 100644
index 0000000..b7d889e
--- /dev/null
+++ b/dream.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=Dream
+Comment=Digital Radio Mondiale (DRM) receiver
+Exec=/usr/bin/dream
+Icon=dream
+Terminal=false
diff --git a/dream.spec b/dream.spec
new file mode 100644
index 0000000..6719821
--- /dev/null
+++ b/dream.spec
@@ -0,0 +1,71 @@
+# it seems upstream released tarballs have svn suffix even for stable versions
+%global ver_suffix svn808
+
+Name: dream
+Version: 2.1.1
+Release: 5%{?dist}
+Summary: A software radio for AM and Digital Radio Mondiale (DRM)
+License: GPLv2+
+URL:
https://sourceforge.net/projects/drm/
+Source0:
https://downloads.sourceforge.net/project/drm/%{name}/%{version}/%{name}-...
+Source1: dream.desktop
+Patch0: dream-2.1.1-use-system-libs.patch
+BuildRequires: gcc-c++, hamlib-devel, dos2unix, qt5-devel, pulseaudio-libs-devel
+BuildRequires: libpcap-devel, gpsd-devel, libsndfile-devel, speexdsp-devel, fftw-devel
+BuildRequires: opus-devel, faad2-devel, qwt-qt5-devel, qt5-qtwebkit-devel
+BuildRequires: desktop-file-utils
+BuildRequires: faac-devel > 1.29.9.2-3
+Requires: hicolor-icon-theme
+
+%description
+Dream is a software implementation of a Digital Radio Mondiale (DRM) receiver.
+With Dream, DRM broadcasts can be received with a modified analog
+receiver (SW, MW, LW) and a PC with a sound card.
+
+%prep
+%setup -q -n %{name}
+
+# convert CRLF to LF
+dos2unix dream.pro
+
+%patch0 -p1 -b .use-system-libs
+
+%build
+OUT_PWD="%{_prefix}" %{qmake_qt5} ./dream.pro
+
+%install
+%make_install INSTALL_ROOT="%{buildroot}"
+
+# icon
+install -Dpm 0644 src/GUI-QT/res/MainIcon.svg
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/dream.svg
+
+# desktop file
+mkdir -p %{buildroot}%{_datadir}/applications
+desktop-file-install --add-category="Utility" \
+ --dir=%{buildroot}%{_datadir}/applications \
+ %{S:1}
+
+%files
+%license COPYING
+%doc AUTHORS README NEWS TODO ChangeLog
+%{_bindir}/dream
+%{_datadir}/icons/hicolor/scalable/apps/dream.svg
+%{_datadir}/applications/dream.desktop
+%{_mandir}/man1/*
+
+%changelog
+* Fri Oct 26 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-5
+- Built with qwt-qt5
+
+* Wed Oct 24 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-4
+- Added minimal version to build require for faac (DRM enabled version)
+
+* Wed Oct 24 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-3
+- Built with libpcap
+
+* Tue Oct 23 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-2
+- Enabled faac DRM
+- Built with Qt5
+
+* Sat Oct 6 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-1
+- Initial version
diff --git a/sources b/sources
index e69de29..dd593f3 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+4745a4f03216bc3afda077398d0e5d3b dream-2.1.1-svn808.tar.gz