Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release-src > by-pkgid > 247919f7092dd17c92f79f6f47e1c736 > files > 2

bladerf-2018.12-0.rc3.1.mga7.src.rpm

%define major	2
%define libname	%mklibname %{name} %{major}
%define devname	%mklibname %{name} -d
%define uname	bladeRF
%define docver	1.7.2
%define docdate	2016.06
%define rcver	rc3

Name:		bladerf
Version:	2018.12
Release:	%mkrel %{?rcver:0.%{rcver}.}1
Summary:	A Software Defined Radio (SDR) platform
Group:		Communications/Radio
License:	GPLv2
URL:		http://nuand.com/
# Don't use upstream tarball as it does not contain git submodules
# Clone git, checkout tag and then 'git submodule init'; 'git submodule update' and re-create tarball. 
Source0:	https://github.com/Nuand/%{uname}/archive/%{version}%{?rcver:-%{rcver}}/%{uname}-%{version}%{?rcver:-%{rcver}}.tar.gz
Source1:	https://github.com/Nuand/%{uname}/releases/download/%{docdate}/lib%{uname}-v%{docver}-doc.tar.bz2

BuildRequires:	cmake
BuildRequires:	pkgconfig(libusb-1.0)

%description
%{uname} is a Software Defined Radio (SDR) platform designed to enable a
community of hobbyists, and professionals to explore and experiment with the
multidisciplinary facets of RF communication.

%package -n %{libname}
Summary:	Library files for %{uname}
Group:		System/Libraries
Requires:	%{name} = %{version}-%{release}

%package -n %{devname}
Summary:	Development files for %{uname}
Group:		System/Libraries
Requires:	%{libname} = %{version}-%{release}
Requires:	%{name} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Provides:	%{uname}-devel = %{version}-%{release}

%description -n %{devname}
Files needed to develop software against libbladerf.

%description -n %{libname}
bladerf library files.

%package doc
Summary:	HTML documentation for %{uname}
Group:		Documentation
BuildArch:	noarch

%description doc
HTML documentation for %{uname}

%prep
%setup -q -a 1 -n %{uname}-%{version}%{?rcver:-%{rcver}}
%autopatch -p1

%build
mkdir build
cd build
cmake ../host \
    -DCMAKE_INSTALL_PREFIX=%{_usr} \
    -DCMAKE_BUILD_TYPE:STRING=Debug

%install
%make_install -C build

mkdir -p %{buildroot}%{_udevrulesdir}
mv %{buildroot}%{_sysconfdir}/udev/rules.d/88-nuand*.rules %{buildroot}%{_udevrulesdir}/

#Documentation and desktop file
mkdir -p %{buildroot}%{_docdir}/%{name}/html/
cp -r lib%{uname}-v%{docver}-doc/* %{buildroot}%{_docdir}/%{name}/html
mkdir -p %{buildroot}%{_iconsdir}
cp %{buildroot}%{_docdir}/%{name}/html/logo.png %{buildroot}%{_iconsdir}/%{name}.png

cat > %{name}-doc.desktop << EOF
[Desktop Entry]
Version=1.0
Name=BladeRF Documentation
GenericName=BladeRF Documentation
Exec=xdg-open /usr/share/doc/%{name}/html/index.html
Icon=%{name}
Terminal=false
Type=Application
Categories=System;Documentation;X-Mageia-CrossDesktop;
X-Desktop-File-Install-Version=0.19
EOF

# Fix Version string in .pc
sed -i '/Version/c Version: %{docver}' %{buildroot}%{_libdir}/pkgconfig/lib%{uname}.pc

desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications %{name}-doc.desktop

%files
%doc CONTRIBUTORS README.md
%{_udevrulesdir}/88-nuand*.rules
%{_bindir}/%{uname}-cli
%{_bindir}/%{uname}-fsk

%files -n %{libname}
%{_libdir}/lib%{uname}.so.%{major}{,.*}

%files -n %{devname}
%{_includedir}/lib%{uname}.h
%{_libdir}/pkgconfig/lib%{uname}.pc
%{_libdir}/lib%{uname}.so
%{_includedir}/bladeRF1.h
%{_includedir}/bladeRF2.h

%files doc
%{_docdir}/%{name}/html
%{_datadir}/applications/%{name}-doc.desktop
%{_iconsdir}/%{name}.png


%changelog
* Thu Jan 10 2019 barjac <barjac> 2018.12-0.rc3.1.mga7
+ Revision: 1354026
- new version 2018.12-rc3
- new major 2
- included git submodules in tarball
- added more udev rules
- removed obsolete patch
- updated files list

* Wed Oct 03 2018 pterjan <pterjan> 2017.12-0.rc1.2.mga7
+ Revision: 1316088
- Mageia 7 Mass Rebuild

* Thu Dec 14 2017 barjac <barjac> 2017.12-0.rc1.1.mga7
+ Revision: 1182650
- new version 2017.12-rc1
- updated doc version
- added -DCMAKE_BUILD_TYPE:STRING=Debug to fix empty debuginfos
- fix path to icon
- fix version string in .pc file that breaks build
- use %%make_install macro

* Mon Sep 05 2016 barjac <barjac> 2016.06-1.mga6
+ Revision: 1050045
- new full version 2016-06
- re-diff makefile patch

* Fri Jul 15 2016 barjac <barjac> 2016.01-0.rc1.2.mga6
+ Revision: 1042173
- fix for Mga#18949 (bladerf systemd-udevd : specified group plugdev unknown

* Mon Jan 11 2016 barjac <barjac> 2016.01-0.rc1.1.mga6
+ Revision: 921526
- new version 2016.01-rc1

* Wed Aug 26 2015 barjac <barjac> 2015.07-1.mga6
+ Revision: 870064
- new version 2015.07

* Fri Jan 16 2015 barjac <barjac> 2014.11-1.mga5
+ Revision: 810965
- Import package bladerf