Compare commits
1 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 613d3c236c |
@@ -1,4 +0,0 @@
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
g gpio -
|
||||
u gpio-manager - "gpio-manager account" - -
|
||||
m gpio-manager gpio
|
||||
BIN
libgpiod-1.6.3.tar.gz
LFS
Normal file
BIN
libgpiod-1.6.3.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4857d0257c40b44518ae7c4d84f1b023fd2be98e23ef9fb795af4d65b7e1607f
|
||||
size 297054
|
||||
@@ -1,9 +1,7 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 16 14:42:34 UTC 2025 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
Wed Jun 18 06:32:01 UTC 2025 - pgajdos@suse.com
|
||||
|
||||
- Upgrade to 2.2.1
|
||||
* Major rework / Breaks API
|
||||
* Support Catch2 v3
|
||||
- tests build for openSUSE only [bsc#1243926]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 14 08:01:13 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
181
libgpiod.spec
181
libgpiod.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libgpiod
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,51 +16,45 @@
|
||||
#
|
||||
|
||||
|
||||
%define libgpiod_soversion 3
|
||||
%define libgpiodbus_soversion 1
|
||||
%define libgpiodcxx_soversion 2
|
||||
%define libgpiodglib_soversion 1
|
||||
%define libgpiosim_soversion 1
|
||||
# Enable tests on openSUSE only - bsc#1243926
|
||||
%define libgpiod_soversion 2
|
||||
%define libgpiodcxx_soversion 1
|
||||
%define libgpiomockup_soversion 0
|
||||
# Tests are only available for kernel 5.5+ (so TW and 15.4+ only)
|
||||
%if 0%{?is_opensuse}
|
||||
%bcond_without libgpiod_tests
|
||||
%else
|
||||
%bcond_with libgpiod_tests
|
||||
%endif
|
||||
# Enable python
|
||||
%bcond_without libgpiod_python
|
||||
Name: libgpiod
|
||||
Version: 2.2.1
|
||||
Version: 1.6.3
|
||||
Release: 0
|
||||
Summary: C library and tools for interacting with the linux GPIO character device
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
|
||||
Source0: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-%{version}.tar.gz
|
||||
Source1: gpiod-sysusers.conf
|
||||
BuildRequires: autoconf >= 2.71
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: autoconf-archive
|
||||
BuildRequires: automake
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libgudev-1_0-devel >= 230
|
||||
BuildRequires: libkmod-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: make
|
||||
%if %{with libgpiod_python}
|
||||
BuildRequires: python3-devel >= 3.5
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-setuptools
|
||||
%endif
|
||||
%if %{with libgpiod_tests}
|
||||
%if 0%{suse_version} > 1550
|
||||
# Only Tumbleweed bumped Catch2 to version 3.x
|
||||
BuildRequires: Catch2-2-devel
|
||||
%else
|
||||
BuildRequires: Catch2-devel
|
||||
%endif
|
||||
BuildRequires: glib2-devel >= 2.50
|
||||
BuildRequires: kernel-devel >= 5.5
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
%else
|
||||
BuildRequires: kernel-devel >= 4.8
|
||||
%endif
|
||||
BuildRequires: systemd
|
||||
|
||||
%description
|
||||
The libgpiod library encapsulates the ioctl calls and data structures
|
||||
@@ -70,6 +64,8 @@ GPIO sysfs interface in Linux 4.8.
|
||||
%package utils
|
||||
Summary: Tools for interacting with the linux GPIO character device
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: libgpiod = %{version}-%{release}
|
||||
Obsoletes: libgpiod < %{version}-%{release}
|
||||
|
||||
%description utils
|
||||
The libgpiod library encapsulates the ioctl calls and data structures
|
||||
@@ -90,18 +86,6 @@ GPIO sysfs interface in Linux 4.8.
|
||||
|
||||
C library part.
|
||||
|
||||
%package -n libgpiodbus%{libgpiodbus_soversion}
|
||||
Summary: DBus for libgpiod
|
||||
Group: System/Libraries
|
||||
Conflicts: libgpiod1
|
||||
|
||||
%description -n libgpiodbus%{libgpiodbus_soversion}
|
||||
The libgpiod library encapsulates the ioctl calls and data structures
|
||||
of the GPIO character devices, the latter of which superseded the
|
||||
GPIO sysfs interface in Linux 4.8.
|
||||
|
||||
DBus part.
|
||||
|
||||
%package -n libgpiodcxx%{libgpiodcxx_soversion}
|
||||
Summary: C++library for interacting with the linux GPIO character device
|
||||
Group: System/Libraries
|
||||
@@ -114,29 +98,17 @@ GPIO sysfs interface in Linux 4.8.
|
||||
|
||||
C++ library part.
|
||||
|
||||
%package -n libgpiod-glib%{libgpiodglib_soversion}
|
||||
Summary: GLib2 binding for libgpiod
|
||||
%package -n libgpiomockup%{libgpiomockup_soversion}
|
||||
Summary: C library for interacting with the linux GPIO character device
|
||||
Group: System/Libraries
|
||||
Conflicts: libgpiod1
|
||||
|
||||
%description -n libgpiod-glib%{libgpiodglib_soversion}
|
||||
%description -n libgpiomockup%{libgpiomockup_soversion}
|
||||
The libgpiod library encapsulates the ioctl calls and data structures
|
||||
of the GPIO character devices, the latter of which superseded the
|
||||
GPIO sysfs interface in Linux 4.8.
|
||||
|
||||
Glib2 binding part.
|
||||
|
||||
%package -n libgpiosim%{libgpiosim_soversion}
|
||||
Summary: C library for controlling the gpio-sim kernel module
|
||||
Group: System/Libraries
|
||||
Conflicts: libgpiod1
|
||||
|
||||
%description -n libgpiosim%{libgpiosim_soversion}
|
||||
The libgpiod library encapsulates the ioctl calls and data structures
|
||||
of the GPIO character devices, the latter of which superseded the
|
||||
GPIO sysfs interface in Linux 4.8.
|
||||
|
||||
GPIO sim library part. (This aims at replacing the old gpio-mockup)
|
||||
GPIO mockup library part.
|
||||
|
||||
%package devel
|
||||
Summary: Devel files for libgpiod
|
||||
@@ -145,7 +117,7 @@ Requires: %{name} = %{version}
|
||||
Requires: libgpiod%{libgpiod_soversion} = %{version}
|
||||
Requires: libgpiodcxx%{libgpiodcxx_soversion} = %{version}
|
||||
%if %{with libgpiod_tests}
|
||||
Requires: libgpiosim%{libgpiosim_soversion} = %{version}
|
||||
Requires: libgpiomockup%{libgpiomockup_soversion} = %{version}
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
@@ -155,7 +127,6 @@ GPIO sysfs interface in Linux 4.8.
|
||||
|
||||
Devel files part.
|
||||
|
||||
%if %{with libgpiod_python}
|
||||
%package -n python3-gpiod
|
||||
Summary: Python binding for libgpiod
|
||||
Group: Development/Languages/Python
|
||||
@@ -168,141 +139,67 @@ of the GPIO character devices, the latter of which superseded the
|
||||
GPIO sysfs interface in Linux 4.8.
|
||||
|
||||
Python binding part.
|
||||
%endif
|
||||
|
||||
%package manager
|
||||
Summary: DBus manager for GPIO
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description manager
|
||||
DBus manager for interacting with GPIO character devices.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
# python bindings build is set to use isolation. Remove this for distro build so it uses the
|
||||
# system installed dependencies instead of trying to use pip to install from the network
|
||||
sed -i 's/-m build/-m pip wheel --wheel-dir dist --no-build-isolation ./' bindings/python/Makefile*
|
||||
# Once the following commit is merged, replace the above line with the command below:
|
||||
# https://lore.kernel.org/linux-gpio/20250407181116.1070816-1-yselkowi@redhat.com/T/#u
|
||||
#sed -i 's/-m pip wheel/& --no-build-isolation/' bindings/python/Makefile*
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
%configure \
|
||||
--enable-dbus \
|
||||
--enable-systemd \
|
||||
%if %{with libgpiod_tests}
|
||||
--enable-tests \
|
||||
--enable-tests \
|
||||
%endif
|
||||
--enable-tools=yes \
|
||||
%if %{with libgpiod_python}
|
||||
--enable-bindings-python \
|
||||
%else
|
||||
--disable-bindings-python \
|
||||
%endif
|
||||
--enable-bindings-glib \
|
||||
--enable-bindings-cxx \
|
||||
--disable-bindings-rust \
|
||||
--disable-static
|
||||
--enable-tools=yes \
|
||||
--enable-bindings-python \
|
||||
--enable-bindings-cxx
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
# Install sysusers file
|
||||
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/gpiod.conf
|
||||
# Fix udev rule location
|
||||
%ifnarch %{ix86} %{arm}
|
||||
mkdir -p %{buildroot}/%{_udevrulesdir}/
|
||||
mv -f %{buildroot}/%{_libdir}/udev/rules.d/90-gpio.rules %{buildroot}/%{_udevrulesdir}/90-gpio.rules
|
||||
rm -rf %{buildroot}%{_libdir}/*.{a,la}
|
||||
rm -rf %{buildroot}%{python3_sitearch}/*.{a,la}
|
||||
|
||||
%if %{with libgpiod_tests}
|
||||
# Fix scripts interpreters
|
||||
sed -i 's#%{_bindir}/env bash#/bin/bash#' %{buildroot}/%{_bindir}/gpio-tools-test
|
||||
sed -i 's#%{_bindir}/env bats#%{_bindir}/bats#' %{buildroot}/%{_bindir}/gpio-tools-test.bats
|
||||
sed -i 's#%{_bindir}/env python3#%{_bindir}/python3#' %{buildroot}/%{_bindir}/gpiod_py_test.py
|
||||
%endif
|
||||
# Remove libtool archives.
|
||||
find %{buildroot} -name '*.la' -delete
|
||||
|
||||
%post -n libgpiod%{libgpiod_soversion} -p /sbin/ldconfig
|
||||
%postun -n libgpiod%{libgpiod_soversion} -p /sbin/ldconfig
|
||||
%post -n libgpiodcxx%{libgpiodcxx_soversion} -p /sbin/ldconfig
|
||||
%postun -n libgpiodcxx%{libgpiodcxx_soversion} -p /sbin/ldconfig
|
||||
%post -n libgpiodbus%{libgpiodbus_soversion} -p /sbin/ldconfig
|
||||
%postun -n libgpiodbus%{libgpiodbus_soversion} -p /sbin/ldconfig
|
||||
%post -n libgpiod-glib%{libgpiodglib_soversion} -p /sbin/ldconfig
|
||||
%postun -n libgpiod-glib%{libgpiodglib_soversion} -p /sbin/ldconfig
|
||||
|
||||
%if %{with libgpiod_tests}
|
||||
%post -n libgpiosim%{libgpiosim_soversion} -p /sbin/ldconfig
|
||||
%postun -n libgpiosim%{libgpiosim_soversion} -p /sbin/ldconfig
|
||||
%post -n libgpiomockup%{libgpiomockup_soversion} -p /sbin/ldconfig
|
||||
%postun -n libgpiomockup%{libgpiomockup_soversion} -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%pre manager
|
||||
%service_add_pre gpio-manager.service
|
||||
|
||||
%post manager
|
||||
%service_add_post gpio-manager.service
|
||||
|
||||
%preun manager
|
||||
%service_del_preun gpio-manager.service
|
||||
|
||||
%postun manager
|
||||
%service_del_postun gpio-manager.service
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc README.md
|
||||
%{_sysusersdir}/gpiod.conf
|
||||
%{_udevrulesdir}/90-gpio.rules
|
||||
|
||||
%files utils
|
||||
%{_bindir}/gpiodetect
|
||||
%{_bindir}/gpioget
|
||||
%{_bindir}/gpioinfo
|
||||
%{_bindir}/gpiomon
|
||||
%{_bindir}/gpionotify
|
||||
%{_bindir}/gpioset
|
||||
#%%{_mandir}/man*/gpio*
|
||||
%{_bindir}/gpio*
|
||||
|
||||
%files -n libgpiod%{libgpiod_soversion}
|
||||
%{_libdir}/libgpiod.so.%{libgpiod_soversion}
|
||||
%{_libdir}/libgpiod.so.%{libgpiod_soversion}.*
|
||||
|
||||
%files -n libgpiodbus%{libgpiodbus_soversion}
|
||||
%{_libdir}/libgpiodbus.so.%{libgpiodbus_soversion}
|
||||
%{_libdir}/libgpiodbus.so.%{libgpiodbus_soversion}.*
|
||||
|
||||
%files -n libgpiodcxx%{libgpiodcxx_soversion}
|
||||
%{_libdir}/libgpiodcxx.so.%{libgpiodcxx_soversion}
|
||||
%{_libdir}/libgpiodcxx.so.%{libgpiodcxx_soversion}.*
|
||||
|
||||
%files -n libgpiod-glib%{libgpiodglib_soversion}
|
||||
%{_libdir}/libgpiod-glib.so.%{libgpiodglib_soversion}
|
||||
%{_libdir}/libgpiod-glib.so.%{libgpiodglib_soversion}.*
|
||||
|
||||
%if %{with libgpiod_tests}
|
||||
%files -n libgpiosim%{libgpiosim_soversion}
|
||||
%{_libdir}/libgpiosim.so.%{libgpiosim_soversion}
|
||||
%{_libdir}/libgpiosim.so.%{libgpiosim_soversion}.*
|
||||
%files -n libgpiomockup%{libgpiomockup_soversion}
|
||||
%{_libdir}/libgpiomockup.so.%{libgpiomockup_soversion}
|
||||
%{_libdir}/libgpiomockup.so.%{libgpiomockup_soversion}.*
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*.h*
|
||||
%dir %{_includedir}/gpiod-glib/
|
||||
%{_includedir}/gpiod-glib/*.h
|
||||
%dir %{_includedir}/gpiodcxx/
|
||||
%{_includedir}/gpiodcxx/*.hpp
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/libgpiod.pc
|
||||
%{_libdir}/pkgconfig/libgpiodcxx.pc
|
||||
%{_libdir}/pkgconfig/gpiod-glib.pc
|
||||
|
||||
%if %{with libgpiod_python}
|
||||
%files -n python3-gpiod
|
||||
%{python3_sitearch}/gpiod/
|
||||
%{python3_sitearch}/gpiod-*.dist-info
|
||||
%endif
|
||||
%{python3_sitearch}/*.so
|
||||
|
||||
%files manager
|
||||
%{_bindir}/gpio-manager
|
||||
%{_bindir}/gpiocli
|
||||
%config %{_sysconfdir}/dbus-1/system.d/io.gpiod1.conf
|
||||
%{_datadir}/dbus-1/interfaces/io.gpiod1.xml
|
||||
%{_unitdir}/gpio-manager.service
|
||||
|
||||
%changelog
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user