# # (C) Copyright 2022 # Luca Magrone # # SPDX-License-Identifier: Unlicense # Name: lg Version: 0.2 Release: 1%{?dist} Summary: Control GPIO(s) for Linux SBC(s) ExclusiveArch: aarch64 %{arm} License: Unlicense URL: https://abyz.me.uk/lg/index.html BuildRequires: gcc BuildRequires: make BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: swig Source: https://github.com/joan2937/lg/archive/refs/tags/v%{version}.tar.gz %description lg is an archive of programs for Linux SBC which allows control of the General Purpose Input Outputs. %package devel Summary: Header files for lgpio and rgpio libraries Requires: %{name}%{?isa} = %{version}-%{release} %description devel Header files for lgpio and rgpio C libraries %package -n python3-lgpio Summary: lgpio Python module %description -n python3-lgpio The lgpio Python module to control local GPIO %package -n python3-rgpio Summary: rgpio Python module %description -n python3-rgpio The rgpio Python module to control local and remote GPIO via the daemon %prep %autosetup %build export CPPFLAGS="%{optflags}" %make_build %install # Fix prefix sed -i 's!prefix ?= /usr/local!prefix ?= %{_prefix}!g' Makefile # Fix library directory sed -i 's!libdir ?= $(prefix)/lib!libdir ?= $(prefix)/%{_lib}!g' Makefile # Fix man directory sed -i 's!mandir ?= $(prefix)/man!mandir ?= $(prefix)/share/man!g' Makefile %make_install %files %license UNLICENCE %{_bindir}/rgpiod %{_bindir}/rgs %{_libdir}/liblgpio.so.* %{_libdir}/librgpio.so.* %{_mandir}/man1/* %{_mandir}/man3/* %files devel %{_libdir}/liblgpio.so %{_libdir}/librgpio.so %{_includedir}/lgpio.h %{_includedir}/rgpio.h %files -n python3-lgpio %{python3_sitearch}/lgpio-%{version}.0.0-py%{python3_version}.egg-info %{python3_sitearch}/lgpio.py %{python3_sitearch}/__pycache__/*.pyc %{python3_sitearch}/*.so %files -n python3-rgpio %{python3_sitelib}/rgpio-%{version}.0.0-py%{python3_version}.egg-info %{python3_sitelib}/rgpio.py %{python3_sitelib}/__pycache__/*.pyc %changelog * Thu Nov 03 2022 Luca Magrone - 0.2-1 - Initial package release