%global git_commit_0 54c86a517edf7933f4ce5e87c8c57d243c85b3ba %global git_user analogdevicesinc %global git_snap_date 20170705 %global git_short_commit_0 %(c=%{git_commit_0}; echo ${c:0:7}) # Using a git snapshot becuase the most recent release is very outdated, # and doesn't support e.g. the PlutoSDR. Name: gr-iio Version: 0.2 Release: 2.%{git_snap_date}git%{git_short_commit_0}%{?dist} Summary: GNU Radio interface for IIO License: GPLv3+ URL: https://github.com/%{git_user}/%{name}/ #Source0: https://github.com/%{git_user}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/%{git_user}/%{name}/archive/%{git_commit_0}.tar.gz BuildRequires: gcc BuildRequires: cmake BuildRequires: bison BuildRequires: flex BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: swig BuildRequires: doxygen BuildRequires: pkgconfig(gnuradio-runtime) BuildRequires: pkgconfig(libad9361) %description GNU Radio interface for IIO. Includes source and sink blocks for Analog Devices ADALM-PLUTO SDR. %package devel Summary: Development package for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Files for development with %{name}. %package -n python2-gr-iio Summary: Python 2 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python2-gr-iio Python 2 bindings for %{name}. # NOTE: gnuradio 3.8 is expected to have Python 3 support. When that # becomes available, Python 3 support should be added to this package. %prep %setup -q -n %{name}-%{git_commit_0} %build if [ "%{_libdir}" = "%{_prefix}/lib64" ]; then %cmake -DUSE_LIB64:BOOL=ON . else %cmake -DUSE_LIB64:BOOL=OFF . fi %make_build V=1 %install %make_install INSTALL='install -p' mkdir %{buildroot}%{_datarootdir}/%{name} # The following will result in an rpmlint error, but it is a false alarm, # because we are moving a file FROM a hardcoded path, where it shouldn't be, # to the correct location. mv %{buildroot}/usr/lib/cmake/iio/iioConfig.cmake %{buildroot}%{_datarootdir}/%{name}/ # Remove libtool archives. find %{buildroot} -name '*.la' -delete %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license COPYING %{_libdir}/libgnuradio-iio.so.* %{_datarootdir}/gnuradio/grc/blocks/*.xml %files devel %{_libdir}/libgnuradio-iio.so %{_libdir}/pkgconfig/gnuradio-iio.pc %{_includedir}/gnuradio/iio %{_includedir}/swig/iio*.i %{_datarootdir}/gr-iio %files -n python2-gr-iio %{python2_sitearch}/gnuradio/iio %changelog * Tue Sep 19 2017 Eric Smith 0.2-2.20170705git54c86a5 - Updated per package review (#1482261) comments. * Wed Aug 16 2017 Eric Smith 0.2-1 - Initial version.