Accepting request 488112 from home:mnhauke:sdr-devel

- Adjust Source-URL
- Use proper cmake options
- Use group bladerf in the udev-rules

OBS-URL: https://build.opensuse.org/request/show/488112
OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/bladeRF?expand=0&rev=8
This commit is contained in:
Martin Pluskal 2017-04-15 20:42:35 +00:00 committed by Git OBS Bridge
parent 383775983a
commit 05f41fda8f
3 changed files with 32 additions and 13 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Apr 15 17:12:59 UTC 2017 - mardnh@gmx.de
- Adjust Source-URL
- Use proper cmake options
- Use group bladerf in the udev-rules
-------------------------------------------------------------------
Thu Mar 30 13:35:57 UTC 2017 - wk@ire.pw.edu.pl

View File

@ -20,6 +20,8 @@
%define sover 1
%define libname lib%{name}%{sover}
%define release_name 2016.06
%define bladerf_group bladerf
%define use_syslog 0
Name: bladeRF
Version: 1.4.0
Release: 0
@ -27,7 +29,8 @@ Summary: SDR radio receiver
License: GPL-2.0
Group: Productivity/Hamradio/Other
Url: http://nuand.com/
Source: https://github.com/Nuand/bladeRF/archive/%{release_name}.tar.gz
#Git-Clone: https://github.com/Nuand/bladeRF.git
Source: https://github.com/Nuand/bladeRF/archive/%{release_name}.tar.gz#/%{name}-%{release_name}.tar.xz
BuildRequires: cmake >= 2.8.4
BuildRequires: doxygen
BuildRequires: fdupes
@ -37,6 +40,7 @@ BuildRequires: help2man
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(udev)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The software for bladeRF USB 3.0 Superspeed Software Defined Radio.
@ -71,23 +75,28 @@ use of libbladerf.
%setup -q -n %{name}-%{release_name}
%build
cd host
%cmake \
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
-DCMAKE_BUILD_TYPE=Release \
-DUDEV_RULES_PATH=%{_udevrulesdir} \
-DBLADERF_GROUP=%{bladerf_group} \
%ifnarch %arm ppc ppc64
-DBUILD_DOCUMENTATION=YES \
%endif
%if 0%{?use_syslog}
-DENABLE_LIBBLADERF_SYSLOG=ON \
%endif
-DBUILD_DOCUMENTATION=ON
make %{?_smp_mflags}
%install
cd host
%cmake_install
# Move libraries to correct location on 64-bit machines
%if %__isa_bits == 64
mkdir %{buildroot}%{_libdir}
mv %{buildroot}%{_prefix}/lib/* %{buildroot}%{_libdir}
rm -rf %{buildroot}%{_prefix}/lib
%endif
# Move udev rules to correct location
mkdir -p %{buildroot}%{_udevrulesdir}
mv %{buildroot}%{_sysconfdir}/udev/rules.d/88-nuand.rules %{buildroot}%{_udevrulesdir}
%pre
%{_sbindir}/groupadd -r %{bladerf_group} 2> /dev/null || :
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
@ -101,11 +110,14 @@ mv %{buildroot}%{_sysconfdir}/udev/rules.d/88-nuand.rules %{buildroot}%{_udevrul
%defattr(-,root,root)
%doc README.md COPYING CONTRIBUTORS
%{_bindir}/bladeRF-cli
# help2man executes ./bladeRF-cli: - that is br0ken when building with qemu's user mode emulation
%ifnarch %arm ppc ppc64
%{_mandir}/man1/bladeRF-cli.1%{ext_man}
%endif
%files udev
%defattr(-,root,root)
%{_prefix}/lib/udev/rules.d/88-nuand.rules
%{_udevrulesdir}/88-nuand.rules
%files -n %{libname}
%defattr(-,root,root)