summaryrefslogtreecommitdiff
path: root/libiio-dev.spec
blob: b90e0221a2cde2f933542fc5a17189a598da7c44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# libiio - library for interfacing with Linux IIO devices.
#
# The upstream project and repository are named "libiio"; this source package
# is named "libiio-dev" because that is the dependency name the consuming
# stack resolves.  A single binary package delivers the shared library, the
# development files (headers and pkgconfig metadata) and the iio-utils
# command line tools together with the iiod daemon.

Name:           libiio-dev
Version:        1.0.0
Release:        1%{?dist}
Summary:        Library for interfacing with Linux IIO devices

License:        LGPL-2.1-or-later AND GPL-2.0-or-later AND MIT AND BSD-3-Clause
URL:            https://github.com/analogdevicesinc/libiio
# Upstream tag archive of the "libiio" repository; the fragment after the #
# tells rpm/spectool to save and expect the locally re-archived source tree
# under this name (see the build-rpm step 4 re-tar).
Source0:        https://github.com/analogdevicesinc/libiio/archive/v%{version}.tar.gz#/libiio-dev-%{version}.tar.gz

Group:          Development/Libraries
Packager:       openEuler Builder <builder@openeuler.org>

# The development payload of libiio is conventionally addressed as
# "libiio-devel"; keep that name resolvable from this package.
Provides:       libiio-devel = %{version}-%{release}

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  libxml2-devel
BuildRequires:  libusbx-devel
BuildRequires:  libzstd-devel
BuildRequires:  libaio-devel

%description
libiio is a library for interfacing with Linux IIO (Industrial I/O) devices
such as ADCs, DACs, sensors and gyroscopes.  It offers a unified API for
local and remote access through the USB, network and serial backends, and it
ships the iiod daemon together with the iio-utils command line tools.

This package contains the shared library, the development headers and the
pkgconfig metadata needed to build software against libiio, as well as the
iio-utils programs and the iiod daemon.

%prep
%autosetup -n %{name}-%{version}

%build
# On this platform the distribution cmake macro configures an in-source tree
# and never creates the out-of-source build directory that the build and
# install helper macros expect, so the configured tree is driven explicitly.
%cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
    -DWITH_TESTS=OFF \
    -DCPP_BINDINGS=OFF \
    -DCSHARP_BINDINGS=OFF \
    -DWITH_MAN=OFF \
    -DWITH_SYSTEMD=OFF \
    -DWITH_SYSVINIT=OFF \
    -DWITH_UPSTART=OFF \
    -DUDEV_RULES_INSTALL_DIR=%{_prefix}/lib/udev/rules.d \
    -DHAVE_DNS_SD=OFF
%{__cmake} --build . %{?_smp_mflags} --verbose

%install
DESTDIR=%{buildroot} %{__cmake} --install .

%files
%license COPYING.txt COPYING_GPL.txt COPYING_MIT.txt
%doc README.md
%{_libdir}/libiio.so*
%{_includedir}/iio/
%{_libdir}/pkgconfig/libiio.pc
%{_bindir}/iio_*
%{_sbindir}/iiod
%{_prefix}/lib/udev/rules.d/90-libiio.rules

%changelog
* Tue Sep 22 2026 openEuler Builder <builder@openeuler.org> - 1.0.0-1
- Initial package