Name: libiio Version: 0.10 Release: 1%{?dist} Summary: Library for Industrial IO # NOTE: UPSTREAM IS INCONSISTENT ABOUT LICENSE # README.md says LGPLv2+ # mainpage.dox says LGPLv2 License: LGPLv2 URL: https://analogdevicesinc.github.io/%{name}/ # NOTE: UPSTREAM USES PROHIBITED CODE # see https://fedoraproject.org/wiki/Packaging:SourceURL?rd=Packaging/SourceURL#When_Upstream_uses_Prohibited_Code # Upstream includes Matlab bindings with a non-free license, therefore the # Matlab bindings must be removed from the source tarball. # To produce the clean tarball, download the non-free tarball from github # using the commented-out Source999, then invoke the libiio-generate-tarball.sh # script (Source100) from the directory containing the tarball, with the # version number as an argument, e.g.: # ./libiio-generate-tarball.sh 0.10 #Source999: https://github.com/analogdevicesinc/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source0: %{name}-%{version}-clean.tar.gz Source100: %{name}-generate-tarball.sh # Fedora-specific patch to force CMake to find Python 3.x rather than 2.x. Patch1: %{name}-0.10-python3.patch # Fedora-specific patch to prevent CMake for looking for the Matlab bindings. Patch100: %{name}-0.10-no-matlab.patch BuildRequires: gcc BuildRequires: bison BuildRequires: cmake BuildRequires: flex BuildRequires: libxml2-devel BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: doxygen BuildRequires: systemd %description libiio is a library for interfacing with kernel IIO (Industrial IO) devices. %package utils Summary: Utilities for Industrial IO Requires: %{name}%{?_isa} = %{version}-%{release} %description utils Utilities for IIO %package devel Summary: Development package for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Files for development with %{name}. %package -n python3-iio Summary: Python 3 bindings for Industrial IO (libiio) Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python3-iio Python 3 bindings for Industrial IO %prep %setup -q %patch1 -p1 -b .python3 %patch100 -p1 -b .no-matlab sed -i 's/${LIBIIO_VERSION_MAJOR}-doc//' CMakeLists.txt %build if [ "%{_libdir}" = "%{_prefix}/lib64" ]; then %cmake -DUSE_LIB64:BOOL=ON . else %cmake -DUSE_LIB64:BOOL=OFF . fi make %{?_smp_mflags} V=1 %install make install DESTDIR=%{buildroot} INSTALL='install -p' # Not allowed to install doc both by a relative %doc and by direct # installation into %_pkgdocdir, so copy README.md manually. cp README.md %{buildroot}%{_pkgdocdir} # Remove libtool archives. find %{buildroot} -name '*.la' -delete %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license COPYING.txt %{_docdir}/%{name}/README.md %{_libdir}/%{name}.so.* %files utils %{_bindir}/iio_* %{_sbindir}/iiod %files devel %{_docdir}/%{name}/html %{_includedir}/iio.h %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/%{name}.so %files -n python3-iio %{python3_sitelib}/iio.py %{python3_sitelib}/%{name}*.egg-info %{python3_sitelib}/__pycache__/iio.*.pyc %changelog * Wed Aug 16 2017 Eric Smith 0.10-1 - Update to latest upstream release. - Updates per package review. * Wed Feb 22 2017 Peter Robinson 0.9-1 - Initial package