File wiringpi.spec of Package wiringpi

#
# spec file for package wiringpi
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           wiringpi
Version:        2.61+2
Release:        0
Summary:        GPIO setting for the Raspberry Pi
License:        LGPL-3.0-only
URL:            https://www.google.com
Source:         WiringPi-%{version}.tar.xz
Patch0:         wiringPi-install.patch

%description
Gordon's Arduino wiring-like WiringPi Library for the Raspberry Pi (Unofficial Mirror for WiringPi bindings)

%package devel
Summary:        Development headers to build against libwiringpi
Requires:       libwiringPi2_70 = %{version}

%description devel
Gordon's Arduino wiring-like WiringPi Library for the Raspberry Pi (Unofficial Mirror for WiringPi bindings)

%package -n libwiringPi2_70
Summary:        Main library of WiringPi for Raspberry Pi

%description -n libwiringPi2_70
Gordon's Arduino wiring-like WiringPi Library for the Raspberry Pi (Unofficial Mirror for WiringPi bindings)

%prep
%autosetup -n WiringPi-%{version} -p1

%build
(cd wiringPi; make)
(cd devLib; make)
(cd gpio; make)

%install
(cd wiringPi; make install DESTDIR=%{buildroot} PREFIX=%{_prefix} LIB=%{_lib})
(cd devLib; make install DESTDIR=%{buildroot} PREFIX=%{_prefix} LIB=%{_lib})
(cd gpio; make install DESTDIR=%{buildroot} PREFIX=%{_prefix} WIRINGPI_SUID=0 LIB=%{_lib})

%ldconfig_scriptlets -n libwiringPi2_70

%files
#gpio
%{_bindir}/gpio
%{_mandir}/man1/gpio.1%{?ext_man}

%files devel
# wiringPi
%{_includedir}/ads1115.h
%{_includedir}/bmp180.h
%{_includedir}/drcNet.h
%{_includedir}/drcSerial.h
%{_includedir}/ds18b20.h
%{_includedir}/htu21d.h
%{_includedir}/max31855.h
%{_includedir}/max5322.h
%{_includedir}/mcp23008.h
%{_includedir}/mcp23016.h
%{_includedir}/mcp23016reg.h
%{_includedir}/mcp23017.h
%{_includedir}/mcp23s08.h
%{_includedir}/mcp23s17.h
%{_includedir}/mcp23x08.h
%{_includedir}/mcp23x0817.h
%{_includedir}/mcp3002.h
%{_includedir}/mcp3004.h
%{_includedir}/mcp3422.h
%{_includedir}/mcp4802.h
%{_includedir}/pcf8574.h
%{_includedir}/pcf8591.h
%{_includedir}/pseudoPins.h
%{_includedir}/rht03.h
%{_includedir}/sn3218.h
%{_includedir}/softPwm.h
%{_includedir}/softServo.h
%{_includedir}/softTone.h
%{_includedir}/sr595.h
%{_includedir}/wiringPi.h
%{_includedir}/wiringPiI2C.h
%{_includedir}/wiringPiSPI.h
%{_includedir}/wiringSerial.h
%{_includedir}/wiringShift.h
%{_includedir}/wpiExtensions.h
%{_libdir}/libwiringPi.so

# devLib
%{_includedir}/ds1302.h
%{_includedir}/gertboard.h
%{_includedir}/lcd.h
%{_includedir}/lcd128x64.h
%{_includedir}/maxdetect.h
%{_includedir}/piFace.h
%{_includedir}/piGlow.h
%{_includedir}/piNes.h
%{_includedir}/scrollPhat.h
%{_libdir}/libwiringPiDev.so

%files -n libwiringPi2_70
%{_libdir}/libwiringPiDev.so.2.70
%{_libdir}/libwiringPi.so.2.70

%changelog
openSUSE Build Service is sponsored by