Blob Blame History Raw
%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.21.%{git_suffix}%{?dist}
License:          GPLv3+
BuildRequires:    cmake, gnuradio-devel, dos2unix, hidapi-devel, doxygen
BuildRequires:    graphviz, swig, alsa-lib-devel, libusbx-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
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.21.20140920git1edbe523
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Jan 18 2016 Jonathan Wakely <jwakely@redhat.com> - 0-0.20.20140920git1edbe523
- Rebuilt for Boost 1.60

* Mon Jan 04 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.19.20140920git1edbe523
- Rebuilt for new gnuradio

* Tue Dec 15 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.18.20140920git1edbe523
- Rebuilt for new gnuradio

* Thu Nov  5 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.17.20140920git1edbe523
- Rebuilt for new gnuradio

* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 0-0.16.20140920git1edbe523
- Rebuilt for Boost 1.59

* Thu Aug 13 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.15.20140920git1edbe523
- Rebuilt for new gnuradio

* Tue Aug  4 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.14.20140920git1edbe523
- Rebuilt for new boost

* Tue Jul 28 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.13.20140920git1edbe523
- Rebuilt for new gnuradio

* Thu Jul 23 2015 David Tardon <dtardon@redhat.com> - 0-0.12.20140920git1edbe523
- rebuild for Boost 1.58

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.11.20140920git1edbe523
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 16 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.10.20140920git1edbe523
- Rebuilt for new gnuradio

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0-0.9.20140920git1edbe523
- Rebuilt for GCC 5 C++11 ABI change

* Sat Mar  7 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.8.20140920git1edbe523
- Rebuilt for new gnuradio

* Thu Jan 29 2015 Petr Machata <pmachata@redhat.com> - 0-0.7.20140920git1edbe523
- Rebuild for boost 1.57.0

* Fri Dec 12 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.6.20140920git1edbe523
- Fixed idProduct in udev rule

* Tue Nov  4 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.5.20140920git1edbe523
- Require libusbx instead of libusb

* Thu Oct 23 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.4.20140920git1edbe523
- Rebuilt for new gnuradio

* Fri Oct 10 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.3.20140920git1edbe523
- Used github URL in sources

* Fri Oct 10 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.2.20140920git1edbe523
- Fixed package according to fedora review comments

* Sat Sep 20 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 0-0.1.20140920git1edbe523
- Initial release