From 51cb77f527f21d1f1d394be8a44d0a9e61e09b74 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Mon, 18 Aug 2014 13:26:15 +0200 Subject: [PATCH 01/63] Add missing patch (how did this ever build?). --- iguanaIR.spec | 5 ++++- rpath.patch | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 rpath.patch diff --git a/iguanaIR.spec b/iguanaIR.spec index e4aa3cf..2fa25d8 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Driver for Iguanaworks USB IR transceiver Group: System Environment/Daemons @@ -166,6 +166,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Mon Aug 18 2014 Alec Leamas - 1.1.0-2 +- Add missing patch (how did this ever build?). + * Mon Aug 11 2014 Alec Leamas - 1.1.0-1 - Updating to latest version - Old patches now upstreamed, new patches for cmake required. LIBDIR handling diff --git a/rpath.patch b/rpath.patch new file mode 100644 index 0000000..e3b54de --- /dev/null +++ b/rpath.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6bdf24d..7ca5c4b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -71,6 +71,9 @@ ElseIf("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + Set(DAEMONLIBS pthread dl) + EndIf() + ++ Set(CMAKE_SKIP_RPATH True) ++ Set(INSTALL_LIBDIR @libdir@) ++ + Set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -Wall -pedantic") + + # see if we have clock_gettime in time.h + From aae93b298ab78878fc0cdc60caf1f5048043bcda Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 20 Aug 2014 14:27:23 +0200 Subject: [PATCH 02/63] Updating dependencies with epoch (sigh...). --- iguanaIR.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index d4b3e1e..f8486ca 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.0.5 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 Summary: Driver for Iguanaworks USB IR transceiver @@ -36,7 +36,7 @@ control the Iguanaworks USB IR transceiver. %package devel Summary: Library and header files for iguanaIR Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{epoch}:%{version}-%{release} %description devel The development files needed to interact with the iguanaIR igdaemon are @@ -45,7 +45,7 @@ included in this package. %package python Group: System Environment/Daemons Summary: Python module for Iguanaworks USB IR transceiver -Requires: %{name} = %{version}-%{release}, python >= 2.4 +Requires: %{name} = %{epoch}:%{version}-%{release}, python >= 2.4 BuildRequires: python-devel swig %description python @@ -163,6 +163,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Wed Aug 20 2014 Alec Leamas - 1:1.0.5-5 +- Updating dependencies with epoch (sigh...). + * Tue Aug 19 2014 Alec Leamas - 1:1.0.5-4 - Backing out 1.1.0 due to ABI problems. - Purged old changelog dating to 2006, partly outside Fedora. From 38f9aadde23a0b79c317733322854e2a60ce11e9 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 21 Aug 2014 01:47:45 +0200 Subject: [PATCH 03/63] New attempt to introduce 1.1.0 (ABI bump) --- .gitignore | 2 +- iguanaIR.spec | 32 +++++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index c66a108..fb3d473 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /iguanaIR-1.0.3.tar.bz2 /iguanaIR-1.1.0.tar.bz2 -/iguanaIR-1.0.5.tar.bz2 +clog diff --git a/iguanaIR.spec b/iguanaIR.spec index f8486ca..135c6fe 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR -Version: 1.0.5 -Release: 5%{?dist} +Version: 1.1.0 +Release: 4%{?dist} Epoch: 1 Summary: Driver for Iguanaworks USB IR transceiver @@ -11,13 +11,13 @@ Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2 Source1: iguanaIR.service Source2: iguanaIR-rescan Source3: README.fedora -# https://iguanaworks.net/projects/IguanaIR/ticket/205 for patch 5, 3, 2. -Patch3: 0003-Use-platform-specific-python-extension-dir.patch -# Fedora only -Patch6: 0006-udev-invoke-systemd-support-not-sysV-init-file.patch +# https://iguanaworks.net/projects/IguanaIR/ticket/317 +Patch1: changeset_2710.patch +Patch2: rpath.patch +Patch3: cmake-args.patch Requires: lirc, udev -BuildRequires: popt-devel, libusb1-devel, libusb-devel, systemd-units +BuildRequires: cmake, popt-devel, libusb1-devel, libusb-devel, systemd-units Requires(post): systemd-units, systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units @@ -36,7 +36,7 @@ control the Iguanaworks USB IR transceiver. %package devel Summary: Library and header files for iguanaIR Group: Development/Libraries -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{epoch}:%{name} = %{version}-%{release} %description devel The development files needed to interact with the iguanaIR igdaemon are @@ -65,17 +65,20 @@ what this means, you don't need it. %prep %setup -q -n %{name}-%{version} +%patch1 -p3 +%patch2 -p1 %patch3 -p1 -%patch6 -p1 cp %{SOURCE3} README.fedora %build -%configure %{?_disable_clock_gettime} +./runCmake -DLIBDIR="%{_libdir}" +cd build make CFLAGS="%{optflags} -fpic -DFEDORA=1" %{?_smp_mflags} %install +cd build make install PREFIX=$RPM_BUILD_ROOT/usr DESTDIR=$RPM_BUILD_ROOT INLIBDIR=$RPM_BUILD_ROOT%{_libdir} install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name} @@ -136,11 +139,12 @@ fi %files -%doc AUTHORS LICENSE LICENSE-LGPL WHY protocols.txt -%doc README.txt notes.txt ChangeLog +%doc AUTHORS LICENSE LICENSE-LGPL +%doc README.txt WHY ChangeLog %doc README.fedora %{_bindir}/igdaemon %{_bindir}/igclient +%{_bindir}/iguanaIR-rescan %{_libdir}/lib%{name}.so.* %{_libdir}/%{name}/*.so %{_libexecdir}/%{name}/ @@ -163,6 +167,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Thu Aug 21 2014 Alec Leamas - 1:1.1.0-4 +- New attempt to introduce 1.1.0 (ABI bump) + * Wed Aug 20 2014 Alec Leamas - 1:1.0.5-5 - Updating dependencies with epoch (sigh...). @@ -216,4 +223,3 @@ fi * Wed Jul 21 2010 Jarod Wilson 1.0-0.1.pre2 - Update to 1.0pre2 snapshot - Revamp spec to be more compliant with Fedora packaging guidelines - From 031ca5f63bac918d6b71c5106505f95cb2fadd15 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 21 Aug 2014 01:58:33 +0200 Subject: [PATCH 04/63] New attempt to introduce 1.1.0 (ABI bump) --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index e42db02..39942e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fbdf09dbef2aaf6c89804994d17b2440 iguanaIR-1.0.5.tar.bz2 +798eda1de8873c8da41fb50ffe221140 iguanaIR-1.1.0.tar.bz2 From 34b77cbd7f8fd2ffb63cfabf635c215c94fc7567 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 21 Aug 2014 14:08:16 +0200 Subject: [PATCH 05/63] Fixing typo, bad %{epoch} requires: --- iguanaIR.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 135c6fe..9f0c266 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 Summary: Driver for Iguanaworks USB IR transceiver @@ -36,7 +36,7 @@ control the Iguanaworks USB IR transceiver. %package devel Summary: Library and header files for iguanaIR Group: Development/Libraries -Requires: %{epoch}:%{name} = %{version}-%{release} +Requires: %{name} = %{epoch}:%{version}-%{release} %description devel The development files needed to interact with the iguanaIR igdaemon are @@ -167,6 +167,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Thu Aug 21 2014 Michael Kolmodin - 1:1.1.0-5 +- Fixing typo, bad %%{epoch} requires: + * Thu Aug 21 2014 Alec Leamas - 1:1.1.0-4 - New attempt to introduce 1.1.0 (ABI bump) From d38a7d5bd1cff14d72274baa4ccfefe499a8d1c3 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 21 Aug 2014 14:11:16 +0200 Subject: [PATCH 06/63] Fixing typo, bad %{epoch} requires: --- iguanaIR.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 9f0c266..8792396 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -167,7 +167,7 @@ fi %{_bindir}/%{name}-reflasher %changelog -* Thu Aug 21 2014 Michael Kolmodin - 1:1.1.0-5 +* Thu Aug 21 2014 Alec Leamas - 1:1.1.0-4 From 6b9729613fc16d473fa76f36edf84da9c6c4bcc4 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 27 Aug 2014 20:40:05 +0200 Subject: [PATCH 07/63] Backing out 1.1.0 again, broken dependencies problem --- iguanaIR.spec | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 8792396..5fda536 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,7 +1,7 @@ Name: iguanaIR -Version: 1.1.0 -Release: 5%{?dist} -Epoch: 1 +Version: 1.0.5 +Release: 6%{?dist} +Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver Group: System Environment/Daemons @@ -11,13 +11,13 @@ Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2 Source1: iguanaIR.service Source2: iguanaIR-rescan Source3: README.fedora -# https://iguanaworks.net/projects/IguanaIR/ticket/317 -Patch1: changeset_2710.patch -Patch2: rpath.patch -Patch3: cmake-args.patch +# https://iguanaworks.net/projects/IguanaIR/ticket/205 for patch 5, 3, 2. +Patch3: 0003-Use-platform-specific-python-extension-dir.patch +# Fedora only +Patch6: 0006-udev-invoke-systemd-support-not-sysV-init-file.patch Requires: lirc, udev -BuildRequires: cmake, popt-devel, libusb1-devel, libusb-devel, systemd-units +BuildRequires: popt-devel, libusb1-devel, libusb-devel, systemd-units Requires(post): systemd-units, systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units @@ -65,20 +65,17 @@ what this means, you don't need it. %prep %setup -q -n %{name}-%{version} -%patch1 -p3 -%patch2 -p1 %patch3 -p1 +%patch6 -p1 cp %{SOURCE3} README.fedora %build -./runCmake -DLIBDIR="%{_libdir}" -cd build +%configure %{?_disable_clock_gettime} make CFLAGS="%{optflags} -fpic -DFEDORA=1" %{?_smp_mflags} %install -cd build make install PREFIX=$RPM_BUILD_ROOT/usr DESTDIR=$RPM_BUILD_ROOT INLIBDIR=$RPM_BUILD_ROOT%{_libdir} install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name} @@ -139,12 +136,11 @@ fi %files -%doc AUTHORS LICENSE LICENSE-LGPL -%doc README.txt WHY ChangeLog +%doc AUTHORS LICENSE LICENSE-LGPL WHY protocols.txt +%doc README.txt notes.txt ChangeLog %doc README.fedora %{_bindir}/igdaemon %{_bindir}/igclient -%{_bindir}/iguanaIR-rescan %{_libdir}/lib%{name}.so.* %{_libdir}/%{name}/*.so %{_libexecdir}/%{name}/ @@ -167,6 +163,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Wed Aug 27 2014 Alec Leamas 1.0-0.1.pre2 - Update to 1.0pre2 snapshot - Revamp spec to be more compliant with Fedora packaging guidelines + From 8cb2bd2c45a929d7fcf0ce4312d0cf67395f230b Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 27 Aug 2014 20:54:24 +0200 Subject: [PATCH 08/63] Have to re-add sources as well. --- .gitignore | 1 + iguanaIR.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fb3d473..b4796e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /iguanaIR-1.0.3.tar.bz2 /iguanaIR-1.1.0.tar.bz2 clog +/iguanaIR-1.0.5.tar.bz2 diff --git a/iguanaIR.spec b/iguanaIR.spec index 5fda536..dcff382 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.0.5 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -163,6 +163,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Wed Aug 27 2014 Alec Leamas Date: Tue, 2 Sep 2014 11:32:26 +0200 Subject: [PATCH 09/63] Make a new try to sort out deps for 1.1.0 --- iguanaIR.spec | 30 ++++++++++++++++++------------ sources | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index dcff382..6838e41 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR -Version: 1.0.5 -Release: 7%{?dist} +Version: 1.1.0 +Release: 6%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -11,13 +11,13 @@ Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2 Source1: iguanaIR.service Source2: iguanaIR-rescan Source3: README.fedora -# https://iguanaworks.net/projects/IguanaIR/ticket/205 for patch 5, 3, 2. -Patch3: 0003-Use-platform-specific-python-extension-dir.patch -# Fedora only -Patch6: 0006-udev-invoke-systemd-support-not-sysV-init-file.patch +# https://iguanaworks.net/projects/IguanaIR/ticket/317 +Patch1: changeset_2710.patch +Patch2: rpath.patch +Patch3: cmake-args.patch Requires: lirc, udev -BuildRequires: popt-devel, libusb1-devel, libusb-devel, systemd-units +BuildRequires: cmake, popt-devel, libusb1-devel, libusb-devel, systemd-units Requires(post): systemd-units, systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units @@ -65,17 +65,20 @@ what this means, you don't need it. %prep %setup -q -n %{name}-%{version} +%patch1 -p3 +%patch2 -p1 %patch3 -p1 -%patch6 -p1 cp %{SOURCE3} README.fedora %build -%configure %{?_disable_clock_gettime} +./runCmake -DLIBDIR="%{_libdir}" +cd build make CFLAGS="%{optflags} -fpic -DFEDORA=1" %{?_smp_mflags} %install +cd build make install PREFIX=$RPM_BUILD_ROOT/usr DESTDIR=$RPM_BUILD_ROOT INLIBDIR=$RPM_BUILD_ROOT%{_libdir} install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name} @@ -136,11 +139,12 @@ fi %files -%doc AUTHORS LICENSE LICENSE-LGPL WHY protocols.txt -%doc README.txt notes.txt ChangeLog +%doc AUTHORS LICENSE LICENSE-LGPL +%doc README.txt WHY ChangeLog %doc README.fedora %{_bindir}/igdaemon %{_bindir}/igclient +%{_bindir}/iguanaIR-rescan %{_libdir}/lib%{name}.so.* %{_libdir}/%{name}/*.so %{_libexecdir}/%{name}/ @@ -163,6 +167,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Tue Sep 2 2014 Alec Leamas 1.0-0.1.pre2 - Update to 1.0pre2 snapshot - Revamp spec to be more compliant with Fedora packaging guidelines - diff --git a/sources b/sources index e42db02..39942e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fbdf09dbef2aaf6c89804994d17b2440 iguanaIR-1.0.5.tar.bz2 +798eda1de8873c8da41fb50ffe221140 iguanaIR-1.1.0.tar.bz2 From 25647416c6a736c187709de768c763794d0f9b93 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 3 Sep 2014 10:35:39 +0200 Subject: [PATCH 10/63] Patch soname on rawhide to avoid unintended bump. --- .gitignore | 2 ++ iguanaIR.spec | 27 +++++++++++++++++++++++++-- patch-soname | 46 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 2 +- 4 files changed, 74 insertions(+), 3 deletions(-) create mode 100755 patch-soname diff --git a/.gitignore b/.gitignore index b4796e8..5970392 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /iguanaIR-1.1.0.tar.bz2 clog /iguanaIR-1.0.5.tar.bz2 +/iguanaIR-1.1.0-5.fc22.src.rpm +bak diff --git a/iguanaIR.spec b/iguanaIR.spec index 6838e41..b495b43 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -11,13 +11,23 @@ Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2 Source1: iguanaIR.service Source2: iguanaIR-rescan Source3: README.fedora +Source4: patch-soname # https://iguanaworks.net/projects/IguanaIR/ticket/317 Patch1: changeset_2710.patch Patch2: rpath.patch Patch3: cmake-args.patch Requires: lirc, udev -BuildRequires: cmake, popt-devel, libusb1-devel, libusb-devel, systemd-units + +BuildRequires: cmake +BuildRequires: libusb1-devel, libusb-devel +BuildRequires: popt-devel +BuildRequires: systemd-units +%if 0%{?fedora} >= 22 +Buildrequires: /usr/bin/xxd +BuildRequires: util-linux +%endif + Requires(post): systemd-units, systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units @@ -69,12 +79,15 @@ what this means, you don't need it. %patch2 -p1 %patch3 -p1 cp %{SOURCE3} README.fedora +cp %{SOURCE4} . %build ./runCmake -DLIBDIR="%{_libdir}" cd build make CFLAGS="%{optflags} -fpic -DFEDORA=1" %{?_smp_mflags} +cp %{SOURCE4} . + %install @@ -83,6 +96,13 @@ make install PREFIX=$RPM_BUILD_ROOT/usr DESTDIR=$RPM_BUILD_ROOT INLIBDIR=$RPM_BU install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name} +%if 0%{?fedora} >= 22 +# Patch the bad soname introduced when they switched to cmake... +# For release branches, this is resolved with buildroots +bash -c "./patch-soname $RPM_BUILD_ROOT%{_libdir}/libiguanaIR.so.0.3 \ + libiguanaIR.so.0.3 IGUANAIR_0" +%endif + # Use /etc/sysconfig instead of /etc/default mkdir $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig || : mv $RPM_BUILD_ROOT/etc/default/iguanaIR \ @@ -167,6 +187,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Wed Sep 3 2014 Alec Leamas ${FILE}.tmp + chmod --reference ${FILE} ${FILE}.tmp + mv ${FILE}.tmp ${FILE} + echo "Done!" + else + echo "New string '${NEW_STRING}' is longer than old" \ + "string '${OLD_STRING}'. Skipping." + fi + done + fi +} + +patch_strings_in_file $@ diff --git a/sources b/sources index 39942e8..bd10c33 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -798eda1de8873c8da41fb50ffe221140 iguanaIR-1.1.0.tar.bz2 +7c6ed56cce3c709d59941b9c5335bbd3 iguanaIR-1.1.0-5.fc22.src.rpm From f38e16792dcf65e411c0adadab31d95ed5156bbd Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 3 Sep 2014 10:45:16 +0200 Subject: [PATCH 11/63] Patch soname on rawhide to avoid unintended bump + new source. --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index bd10c33..39942e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7c6ed56cce3c709d59941b9c5335bbd3 iguanaIR-1.1.0-5.fc22.src.rpm +798eda1de8873c8da41fb50ffe221140 iguanaIR-1.1.0.tar.bz2 From a14910cce0ccd01fafd41f93f9a30cb9aba205cf Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 3 Sep 2014 14:50:31 +0200 Subject: [PATCH 12/63] patch soname + add virtual compatibility Provides: --- iguanaIR.spec | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index b495b43..0aac808 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -23,15 +23,18 @@ BuildRequires: cmake BuildRequires: libusb1-devel, libusb-devel BuildRequires: popt-devel BuildRequires: systemd-units -%if 0%{?fedora} >= 22 + # For patch-soname (xxd, util-linux) Buildrequires: /usr/bin/xxd BuildRequires: util-linux -%endif Requires(post): systemd-units, systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units +Provides: libiguanaIR.so.0 +Provides: libiguanaIR.so.0(IGUANAIR_0) + + # some features can be disabled during the rpm build %{?_without_clock_gettime: %define _disable_clock_gettime --disable-clock_gettime} @@ -96,12 +99,16 @@ make install PREFIX=$RPM_BUILD_ROOT/usr DESTDIR=$RPM_BUILD_ROOT INLIBDIR=$RPM_BU install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name} -%if 0%{?fedora} >= 22 -# Patch the bad soname introduced when they switched to cmake... -# For release branches, this is resolved with buildroots +# For now, patch bad soname introduced when they switched to cmake... bash -c "./patch-soname $RPM_BUILD_ROOT%{_libdir}/libiguanaIR.so.0.3 \ libiguanaIR.so.0.3 IGUANAIR_0" -%endif + +# fix missing links +pushd $RPM_BUILD_ROOT%{_libdir} +#ln -s libiguanaIR.so.0.3 libiguanaIR.so.0 + +#ln -s libiguanaIR.so.0.3 libiguanaIR.so + # Use /etc/sysconfig instead of /etc/default mkdir $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig || : @@ -187,6 +194,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Wed Sep 03 2014 Alec Leamas - 2:1.1.0-8 +- patch soname + add virtual compatibility Provides: + * Wed Sep 3 2014 Alec Leamas Date: Wed, 3 Sep 2014 16:38:35 +0200 Subject: [PATCH 13/63] Remove needless and circular dependency on lirc. --- iguanaIR.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 0aac808..68afcf9 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -17,7 +17,7 @@ Patch1: changeset_2710.patch Patch2: rpath.patch Patch3: cmake-args.patch -Requires: lirc, udev +Requires: udev BuildRequires: cmake BuildRequires: libusb1-devel, libusb-devel @@ -194,6 +194,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Wed Sep 03 2014 Alec Leamas - 2:1.1.0-9 +- Remove needless and circular dependency on lirc. + * Wed Sep 03 2014 Alec Leamas - 2:1.1.0-8 - patch soname + add virtual compatibility Provides: From 1d205c697b04eb541e864228b29d009c1c79903f Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Tue, 9 Sep 2014 19:18:49 +0200 Subject: [PATCH 14/63] Added 64-bit provides tweak. --- iguanaIR.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 68afcf9..48c32e2 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 9%{?dist} +Release: 10%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -31,9 +31,15 @@ Requires(post): systemd-units, systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units +# resolve cyclic dep iguanaIR <-> lirc. Once removed +# in lirc, we can do the required so-bump. +%ifarch x86_64 +Provides: libiguanaIR.so.0()(64bit) +Provides: libiguanaIR.so.0(IGUANAIR_0)()(64bit) +%else Provides: libiguanaIR.so.0 Provides: libiguanaIR.so.0(IGUANAIR_0) - +%endif # some features can be disabled during the rpm build @@ -194,6 +200,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Tue Sep 09 2014 Alec Leamas - 2:1.1.0-10 +- Added 64-bit provides tweak. + * Wed Sep 03 2014 Alec Leamas - 2:1.1.0-9 - Remove needless and circular dependency on lirc. From cc5faa9e0b4e9f442162fa2c9fd0e53b52d51be6 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 10 Sep 2014 12:46:47 +0200 Subject: [PATCH 15/63] Fixed 64-bit provides tweak. --- iguanaIR.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 48c32e2..eb47a99 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 10%{?dist} +Release: 11%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -35,7 +35,7 @@ Requires(postun): systemd-units # in lirc, we can do the required so-bump. %ifarch x86_64 Provides: libiguanaIR.so.0()(64bit) -Provides: libiguanaIR.so.0(IGUANAIR_0)()(64bit) +Provides: libiguanaIR.so.0(IGUANAIR_0)(64bit) %else Provides: libiguanaIR.so.0 Provides: libiguanaIR.so.0(IGUANAIR_0) @@ -200,6 +200,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Wed Sep 10 2014 Alec Leamas - 2:1.1.0-11 +- Fixed 64-bit provides tweak. + * Tue Sep 09 2014 Alec Leamas - 2:1.1.0-10 - Added 64-bit provides tweak. From e483b3e8d92abf22ac70e15f971dd0f641f70871 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 10 Dec 2014 16:35:52 +0100 Subject: [PATCH 16/63] Fixes #1159618, re-install logrotate file. --- iguanaIR.logrotate | 2 +- iguanaIR.spec | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/iguanaIR.logrotate b/iguanaIR.logrotate index ce609ad..8f51ca5 100644 --- a/iguanaIR.logrotate +++ b/iguanaIR.logrotate @@ -1,4 +1,4 @@ -/var/log/iguanaIR { +/var/log/iguanaIR/*.log { missingok notifempty postrotate diff --git a/iguanaIR.spec b/iguanaIR.spec index eb47a99..ab11114 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 11%{?dist} +Release: 12%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -12,6 +12,7 @@ Source1: iguanaIR.service Source2: iguanaIR-rescan Source3: README.fedora Source4: patch-soname +Source5: iguanaIR.logrotate # https://iguanaworks.net/projects/IguanaIR/ticket/317 Patch1: changeset_2710.patch Patch2: rpath.patch @@ -111,10 +112,7 @@ bash -c "./patch-soname $RPM_BUILD_ROOT%{_libdir}/libiguanaIR.so.0.3 \ # fix missing links pushd $RPM_BUILD_ROOT%{_libdir} -#ln -s libiguanaIR.so.0.3 libiguanaIR.so.0 - -#ln -s libiguanaIR.so.0.3 libiguanaIR.so - +ln -sf libiguanaIR.so.0.3 libiguanaIR.so.0 # Use /etc/sysconfig instead of /etc/default mkdir $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig || : @@ -138,7 +136,9 @@ install -m755 -d $RPM_BUILD_ROOT/etc/tmpfiles.d cat > $RPM_BUILD_ROOT/etc/tmpfiles.d/%{name}.conf < - 2:1.1.0-12 +- Fixes #1159618. +- Re-install logrotate file, mysteriously dropped sometime. + * Wed Sep 10 2014 Alec Leamas - 2:1.1.0-11 - Fixed 64-bit provides tweak. From e59b4329348987de1fb45860f91ee3da270b2b06 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 11 Dec 2014 01:24:00 +0100 Subject: [PATCH 17/63] Filter bogus, patched libiguanaIR.so.0.3 so-name from Requires. --- iguanaIR.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index ab11114..939b816 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 12%{?dist} +Release: 13%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -49,6 +49,9 @@ Provides: libiguanaIR.so.0(IGUANAIR_0) # Don't add provides for python .so files %define __provides_exclude_from %{python_sitearch}/.*\.so$ +# Filter away patched soname form requires +%global __requires_exclude libiguanaIR.so.0.3 + %description This package provides igdaemon and igclient, the programs necessary to control the Iguanaworks USB IR transceiver. @@ -201,6 +204,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Thu Dec 11 2014 Alec Leamas - 2:1.1.0-13 +- Filter away bogus, patched so-name from Requires: + * Wed Dec 10 2014 Alec Leamas - 2:1.1.0-12 - Fixes #1159618. - Re-install logrotate file, mysteriously dropped sometime. From 5d1063cccf05490f0bec548ccc37a9df442ee3f5 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Mon, 22 Dec 2014 22:04:42 +0100 Subject: [PATCH 18/63] Fix upstream logrotate issue #1176627. --- iguanaIR.logrotate | 1 + iguanaIR.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/iguanaIR.logrotate b/iguanaIR.logrotate index 8f51ca5..e84b43f 100644 --- a/iguanaIR.logrotate +++ b/iguanaIR.logrotate @@ -1,4 +1,5 @@ /var/log/iguanaIR/*.log { + su iguanair iguanair missingok notifempty postrotate diff --git a/iguanaIR.spec b/iguanaIR.spec index 939b816..2ced085 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 13%{?dist} +Release: 14%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -204,6 +204,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Mon Dec 22 2014 Alec Leamas - 2:1.1.0-14 +- Fixing #1176627: Update logrotate conf. + * Thu Dec 11 2014 Alec Leamas - 2:1.1.0-13 - Filter away bogus, patched so-name from Requires: From c2ef7268a98a3e0e2d151a5072e06d49ad89c6fe Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 11:17:40 +0000 Subject: [PATCH 19/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 2ced085..c8d3ca2 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 14%{?dist} +Release: 15%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -204,6 +204,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 2:1.1.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Dec 22 2014 Alec Leamas - 2:1.1.0-14 - Fixing #1176627: Update logrotate conf. From fc2c12da98edc722d87448f17ccc19a07b57cdc6 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 4 Feb 2016 00:27:02 +0000 Subject: [PATCH 20/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index c8d3ca2..fb62803 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 15%{?dist} +Release: 16%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -204,6 +204,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 2:1.1.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Jun 17 2015 Fedora Release Engineering - 2:1.1.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From c678c308904980bd558f6a6287548054e9014286 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 19 Jul 2016 07:27:39 +0000 Subject: [PATCH 21/63] - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index fb62803..c9a927b 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,6 @@ Name: iguanaIR Version: 1.1.0 -Release: 16%{?dist} +Release: 17%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -204,6 +204,9 @@ fi %{_bindir}/%{name}-reflasher %changelog +* Tue Jul 19 2016 Fedora Release Engineering - 2:1.1.0-17 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + * Thu Feb 04 2016 Fedora Release Engineering - 2:1.1.0-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 574affc95e1b03688eb96fadef44787ab2a50a7e Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 25 Jan 2017 08:28:23 +0100 Subject: [PATCH 22/63] Release 1.1.0-19 --- ...IR.-iguanair.-to-match-other-plugins.patch | 853 +++++++++++++++ ...ME-files-to-match-modified-install-r.patch | 94 ++ 0012-Makefile-Add-DESTDIR-support.patch | 59 ++ ...s-to-LF-line-endings-like-main-drive.patch | 988 ++++++++++++++++++ 0020-dont-update-docs.patch | 10 + iguanaIR.spec | 120 ++- 6 files changed, 2078 insertions(+), 46 deletions(-) create mode 100644 0010-Change-iguanaIR.-iguanair.-to-match-other-plugins.patch create mode 100644 0011-Rename-link-README-files-to-match-modified-install-r.patch create mode 100644 0012-Makefile-Add-DESTDIR-support.patch create mode 100644 0013-Convert-all-files-to-LF-line-endings-like-main-drive.patch create mode 100644 0020-dont-update-docs.patch diff --git a/0010-Change-iguanaIR.-iguanair.-to-match-other-plugins.patch b/0010-Change-iguanaIR.-iguanair.-to-match-other-plugins.patch new file mode 100644 index 0000000..f07fd13 --- /dev/null +++ b/0010-Change-iguanaIR.-iguanair.-to-match-other-plugins.patch @@ -0,0 +1,853 @@ +From 7e0aca378b95b8618c1adc936e7988be165fcc13 Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Thu, 1 Sep 2016 02:51:03 +0200 +Subject: [PATCH 10/13] Change iguanaIR.* -> iguanair.* to match other + plugins. + +The mixed casing is only used by iguanair, causing some problems +when handling plugin. Also, using lowercase creates a visible +difference to the mixed-case driver file. +--- + iguanaIR.c | 364 ---------------------------------------------------------- + iguanaIR.conf | 13 --- + iguanaIR.html | 18 --- + iguanair.c | 364 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + iguanair.conf | 13 +++ + iguanair.html | 18 +++ + 6 files changed, 395 insertions(+), 395 deletions(-) + delete mode 100755 iguanaIR.c + delete mode 100755 iguanaIR.conf + delete mode 100755 iguanaIR.html + create mode 100755 iguanair.c + create mode 100755 iguanair.conf + create mode 100755 iguanair.html + +diff --git a/iguanaIR.c b/iguanaIR.c +deleted file mode 100755 +index f2e5794..0000000 +--- a/iguanaIR.c ++++ /dev/null +@@ -1,364 +0,0 @@ +-/**************************************************************************** +-** hw_iguanaIR.c *********************************************************** +-**************************************************************************** +-* +-* routines for interfacing with Iguanaworks USB IR devices +-* +-* Copyright (C) 2006, Joseph Dunn +-* +-* Distribute under GPL version 2. +-* +-*/ +- +-#ifdef HAVE_CONFIG_H +-# include +-#endif +- +-#include +-#include +-#include +-#include +-#include +-#include +-#if defined __APPLE__ +-#include +-#include +-#else +-#include +-#endif +-#include +- +-#include "lirc_driver.h" +- +-#include "iguanaIR.h" +-static const logchannel_t logchannel = LOG_DRIVER; +- +-static int sendConn = -1; +-static pid_t child = 0; +-static int recvDone = 0; +-static int currentCarrier = -1; +- +-static void quitHandler(int sig) +-{ +- recvDone = 1; +-} +- +-static void recv_loop(int fd, int notify) +-{ +- int conn; +- +- alarm(0); +- signal(SIGTERM, quitHandler); +- /* signal(SIGPIPE, SIG_DFL); */ +- signal(SIGINT, quitHandler); +- signal(SIGHUP, SIG_IGN); +- signal(SIGALRM, SIG_IGN); +- +- /* notify parent by closing notify */ +- close(notify); +- +- conn = iguanaConnect(drv.device); +- if (conn != -1) { +- iguanaPacket request, response; +- lirc_t prevCode = -1; +- +- request = iguanaCreateRequest(IG_DEV_RECVON, 0, NULL); +- if (iguanaWriteRequest(request, conn)) { +- while (!recvDone) { +- /* read from device */ +- do +- response = iguanaReadResponse(conn, 1000); +- while (!recvDone && ((response == NULL && errno == ETIMEDOUT) +- || (iguanaResponseIsError(response) && errno == ETIMEDOUT))); +- +- if (iguanaResponseIsError(response)) { +- /* be quiet during exit */ +- if (!recvDone) +- log_error("error response: %s\n", strerror(errno)); +- break; +- } else if (iguanaCode(response) == IG_DEV_RECV) { +- uint32_t* code; +- unsigned int length, x, y = 0; +- lirc_t buffer[8]; /* we read 8 bytes max at a time +- * from the device, i.e. packet +- * can only contain 8 +- * signals. */ +- +- /* pull the data off the packet */ +- code = (uint32_t*)iguanaRemoveData(response, &length); +- length /= sizeof(uint32_t); +- +- /* translate the code into lirc_t pulses (and make +- * sure they don't split across iguana packets. */ +- for (x = 0; x < length; x++) { +- if (prevCode == -1) { +- prevCode = (code[x] & IG_PULSE_MASK); +- if (prevCode > PULSE_MASK) +- prevCode = PULSE_MASK; +- if (code[x] & IG_PULSE_BIT) +- prevCode |= PULSE_BIT; +- } else if (((prevCode & PULSE_BIT) && (code[x] & IG_PULSE_BIT)) +- || (!(prevCode & PULSE_BIT) && !(code[x] & IG_PULSE_BIT))) { +- /* can overflow pulse mask, so just set to +- * largest possible */ +- if ((prevCode & PULSE_MASK) + (code[x] & IG_PULSE_MASK) > +- PULSE_MASK) +- prevCode = (prevCode & PULSE_BIT) | PULSE_MASK; +- else +- prevCode += code[x] & IG_PULSE_MASK; +- } else { +- buffer[y] = prevCode; +- y++; +- +- prevCode = (code[x] & IG_PULSE_MASK); +- if (prevCode > PULSE_MASK) +- prevCode = PULSE_MASK; +- if (code[x] & IG_PULSE_BIT) +- prevCode |= PULSE_BIT; +- } +- } +- +- /* write the data and free it */ +- if (y > 0) { +- chk_write(fd, +- buffer, +- sizeof(lirc_t) * y); +- } +- free(code); +- } +- +- iguanaFreePacket(response); +- } +- } +- +- iguanaFreePacket(request); +- } +- +- iguanaClose(conn); +- close(fd); +-} +- +-static int iguana_init(void) +-{ +- int recv_pipe[2], retval = 0; +- +- rec_buffer_init(); +- +- if (pipe(recv_pipe) != 0) { +- log_error("couldn't open pipe: %s", strerror(errno)); +- } else { +- int notify[2]; +- +- if (pipe(notify) != 0) { +- log_error("couldn't open pipe: %s", strerror(errno)); +- close(recv_pipe[0]); +- close(recv_pipe[1]); +- } else { +- drv.fd = recv_pipe[0]; +- +- child = fork(); +- if (child == -1) { +- log_error("couldn't fork child process: %s", strerror(errno)); +- } else if (child == 0) { +- close(recv_pipe[0]); +- close(notify[0]); +- recv_loop(recv_pipe[1], notify[1]); +- _exit(0); +- } else { +- int dummy; +- +- close(recv_pipe[1]); +- close(notify[1]); +- /* make sure child has set its signal handler to avoid race with iguana_deinit() */ +- chk_read(notify[0], &dummy, 1); +- close(notify[0]); +- sendConn = iguanaConnect(drv.device); +- if (sendConn == -1) { +- log_error("couldn't open connection to iguanaIR daemon: %s", +- strerror(errno)); +- } else { +- retval = 1; +- } +- } +- } +- } +- +- return retval; +-} +- +-static pid_t dowaitpid(pid_t pid, int* stat_loc, int options) +-{ +- pid_t retval; +- +- do +- retval = waitpid(pid, stat_loc, options); +- while (retval == (pid_t)-1 && errno == EINTR); +- +- return retval; +-} +- +-static int iguana_deinit(void) +-{ +- /* close the connection to the iguana daemon */ +- if (sendConn != -1) { +- iguanaClose(sendConn); +- sendConn = -1; +- } +- +- /* signal the child process to exit */ +- if (child > 0 && (kill(child, SIGTERM) == -1 || dowaitpid(child, NULL, 0) != (pid_t)-1)) +- child = 0; +- +- /* close drv.fd since otherwise we leak open files */ +- close(drv.fd); +- drv.fd = -1; +- +- return child == 0; +-} +- +-static char* iguana_rec(struct ir_remote* remotes) +-{ +- char* retval = NULL; +- +- if (rec_buffer_clear()) +- retval = decode_all(remotes); +- return retval; +-} +- +-static bool daemonTransaction(unsigned char code, void* value, size_t size) +-{ +- uint8_t* data; +- bool retval = false; +- +- data = (uint8_t*)malloc(size); +- if (data != NULL) { +- iguanaPacket request, response = NULL; +- +- memcpy(data, value, size); +- request = iguanaCreateRequest(code, size, data); +- if (request) { +- if (iguanaWriteRequest(request, sendConn)) +- response = iguanaReadResponse(sendConn, 10000); +- iguanaFreePacket(request); +- } else { +- free(data); +- } +- +- /* handle success */ +- if (!iguanaResponseIsError(response)) +- retval = true; +- iguanaFreePacket(response); +- } +- return retval; +-} +- +-static int iguana_send(struct ir_remote* remote, struct ir_ncode* code) +-{ +- int retval = 0; +- uint32_t freq; +- +- /* set the carrier frequency if necessary */ +- freq = htonl(remote->freq); +- if (remote->freq != currentCarrier && remote->freq >= 25000 && remote->freq <= 100000 +- && daemonTransaction(IG_DEV_SETCARRIER, &freq, sizeof(freq))) +- currentCarrier = remote->freq; +- +- if (send_buffer_put(remote, code)) { +- int length, x; +- const lirc_t* signals; +- uint32_t* igsignals; +- +- length = send_buffer_length(); +- signals = send_buffer_data(); +- +- igsignals = (uint32_t*)malloc(sizeof(uint32_t) * length); +- if (igsignals != NULL) { +- iguanaPacket request, response = NULL; +- +- /* must pack the data into a unit32_t array */ +- for (x = 0; x < length; x++) { +- igsignals[x] = signals[x] & PULSE_MASK; +- if (signals[x] & PULSE_BIT) +- igsignals[x] |= IG_PULSE_BIT; +- } +- +- /* construct a request and send it to the daemon +- * TRICKY: IguanaFreePacket free()'s both the +- * igsignals chunk and the request packet, but +- * iguanaCreateRequest does not malloc that chunk. +- */ +- request = iguanaCreateRequest(IG_DEV_SEND, sizeof(uint32_t) * length, igsignals); +- if (iguanaWriteRequest(request, sendConn)) { +- /* response will only come back after the device has +- * transmitted */ +- response = iguanaReadResponse(sendConn, 10000); +- if (!iguanaResponseIsError(response)) +- retval = 1; +- +- iguanaFreePacket(response); +- } +- +- /* free the packet and the data */ +- iguanaFreePacket(request); +- } +- } +- +- return retval; +-} +- +-static int iguana_ioctl(unsigned int code, void* arg) +-{ +- int retcode = -1; +- uint8_t channels = *(uint8_t*)arg; +- +- /* set the transmit channels: return 0 on success, 4 if +- * out-of-range (see ioctl) */ +- if (code == LIRC_SET_TRANSMITTER_MASK) { +- if (channels > 0x0F) +- retcode = 4; +- else if (daemonTransaction(IG_DEV_SETCHANNELS, &channels, sizeof(channels))) +- retcode = 0; +- } +- +- return retcode; +-} +- +-static lirc_t readdata(lirc_t timeout) +-{ +- lirc_t code = 0; +- struct pollfd pfd = {.fd = drv.fd, .events = POLLIN, .revents = 0}; +- /* attempt a read with a timeout using select */ +- if (poll(&pfd, 1, timeout / 1000) > 0) { +- /* if we failed to get data return 0 */ +- if (read(drv.fd, &code, sizeof(lirc_t)) <= 0) +- iguana_deinit(); +- } +- return code; +-} +- +-const struct driver hw_iguanaIR = { +- .name = "iguanaIR", +- .device = "0", +- .features = LIRC_CAN_REC_MODE2 | \ +- LIRC_CAN_SEND_PULSE | \ +- LIRC_CAN_SET_SEND_CARRIER | \ +- LIRC_CAN_SET_TRANSMITTER_MASK, +- .send_mode = LIRC_MODE_PULSE, +- .rec_mode = LIRC_MODE_MODE2, +- .code_length = sizeof(int), +- .init_func = iguana_init, +- .deinit_func = iguana_deinit, +- .open_func = default_open, +- .close_func = default_close, +- .send_func = iguana_send, +- .rec_func = iguana_rec, +- .decode_func = receive_decode, +- .drvctl_func = iguana_ioctl, +- .readdata = readdata, +- .api_version = 3, +- .driver_version = "0.9.3", +- .info = "See file://" PLUGINDOCS "/iguanair.html", +- .device_hint = "/var/run/iguanaIR/*", +-}; +- +-const struct driver* hardwares[] = { &hw_iguanaIR, (const struct driver*)NULL }; +diff --git a/iguanaIR.conf b/iguanaIR.conf +deleted file mode 100755 +index 12e9523..0000000 +--- a/iguanaIR.conf ++++ /dev/null +@@ -1,13 +0,0 @@ +-# This is a lirc configuration for a capture device. +-# See README for more. +- +-config: +- driver: iguanaIR +- id: iguanaIR +- label: Iguanaworks USB IR Transceiver +- menu: usb +- note: This is the user-space driver from Iguanaworks, Inc. +- There is also a built-in kernel driver. Both can be used +- but not concurrently. +- product_driver: 1781:0938 +- modprobe: [blacklist iguanair] +diff --git a/iguanaIR.html b/iguanaIR.html +deleted file mode 100755 +index 99609c3..0000000 +--- a/iguanaIR.html ++++ /dev/null +@@ -1,18 +0,0 @@ +-

+- This driver supports both receiving and sending (blasting) using +- the IguanaIR devices from +- http://iguanaworks.net/ir.

+-

+- The LIRC driver works on top of the IguanaIR low-level userspace +- driver which provides a socket interface. It is available from +- the same source, and also packaged for many distributions +- including Debian, Fedora and Arch Linux. +-

+- The --device argument to the driver is a socket designator created +- by the low-level driveri. It defaults to '0' which implies +- /run/iguanair/0. +-

+- The kernel has built-in support for these devices in the +- iguanair module. This can be used instead of this driver in +- many cases. If the userspace driver should be used, the +- kernel driver must be blacklisted.

+diff --git a/iguanair.c b/iguanair.c +new file mode 100755 +index 0000000..f2e5794 +--- /dev/null ++++ b/iguanair.c +@@ -0,0 +1,364 @@ ++/**************************************************************************** ++** hw_iguanaIR.c *********************************************************** ++**************************************************************************** ++* ++* routines for interfacing with Iguanaworks USB IR devices ++* ++* Copyright (C) 2006, Joseph Dunn ++* ++* Distribute under GPL version 2. ++* ++*/ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#if defined __APPLE__ ++#include ++#include ++#else ++#include ++#endif ++#include ++ ++#include "lirc_driver.h" ++ ++#include "iguanaIR.h" ++static const logchannel_t logchannel = LOG_DRIVER; ++ ++static int sendConn = -1; ++static pid_t child = 0; ++static int recvDone = 0; ++static int currentCarrier = -1; ++ ++static void quitHandler(int sig) ++{ ++ recvDone = 1; ++} ++ ++static void recv_loop(int fd, int notify) ++{ ++ int conn; ++ ++ alarm(0); ++ signal(SIGTERM, quitHandler); ++ /* signal(SIGPIPE, SIG_DFL); */ ++ signal(SIGINT, quitHandler); ++ signal(SIGHUP, SIG_IGN); ++ signal(SIGALRM, SIG_IGN); ++ ++ /* notify parent by closing notify */ ++ close(notify); ++ ++ conn = iguanaConnect(drv.device); ++ if (conn != -1) { ++ iguanaPacket request, response; ++ lirc_t prevCode = -1; ++ ++ request = iguanaCreateRequest(IG_DEV_RECVON, 0, NULL); ++ if (iguanaWriteRequest(request, conn)) { ++ while (!recvDone) { ++ /* read from device */ ++ do ++ response = iguanaReadResponse(conn, 1000); ++ while (!recvDone && ((response == NULL && errno == ETIMEDOUT) ++ || (iguanaResponseIsError(response) && errno == ETIMEDOUT))); ++ ++ if (iguanaResponseIsError(response)) { ++ /* be quiet during exit */ ++ if (!recvDone) ++ log_error("error response: %s\n", strerror(errno)); ++ break; ++ } else if (iguanaCode(response) == IG_DEV_RECV) { ++ uint32_t* code; ++ unsigned int length, x, y = 0; ++ lirc_t buffer[8]; /* we read 8 bytes max at a time ++ * from the device, i.e. packet ++ * can only contain 8 ++ * signals. */ ++ ++ /* pull the data off the packet */ ++ code = (uint32_t*)iguanaRemoveData(response, &length); ++ length /= sizeof(uint32_t); ++ ++ /* translate the code into lirc_t pulses (and make ++ * sure they don't split across iguana packets. */ ++ for (x = 0; x < length; x++) { ++ if (prevCode == -1) { ++ prevCode = (code[x] & IG_PULSE_MASK); ++ if (prevCode > PULSE_MASK) ++ prevCode = PULSE_MASK; ++ if (code[x] & IG_PULSE_BIT) ++ prevCode |= PULSE_BIT; ++ } else if (((prevCode & PULSE_BIT) && (code[x] & IG_PULSE_BIT)) ++ || (!(prevCode & PULSE_BIT) && !(code[x] & IG_PULSE_BIT))) { ++ /* can overflow pulse mask, so just set to ++ * largest possible */ ++ if ((prevCode & PULSE_MASK) + (code[x] & IG_PULSE_MASK) > ++ PULSE_MASK) ++ prevCode = (prevCode & PULSE_BIT) | PULSE_MASK; ++ else ++ prevCode += code[x] & IG_PULSE_MASK; ++ } else { ++ buffer[y] = prevCode; ++ y++; ++ ++ prevCode = (code[x] & IG_PULSE_MASK); ++ if (prevCode > PULSE_MASK) ++ prevCode = PULSE_MASK; ++ if (code[x] & IG_PULSE_BIT) ++ prevCode |= PULSE_BIT; ++ } ++ } ++ ++ /* write the data and free it */ ++ if (y > 0) { ++ chk_write(fd, ++ buffer, ++ sizeof(lirc_t) * y); ++ } ++ free(code); ++ } ++ ++ iguanaFreePacket(response); ++ } ++ } ++ ++ iguanaFreePacket(request); ++ } ++ ++ iguanaClose(conn); ++ close(fd); ++} ++ ++static int iguana_init(void) ++{ ++ int recv_pipe[2], retval = 0; ++ ++ rec_buffer_init(); ++ ++ if (pipe(recv_pipe) != 0) { ++ log_error("couldn't open pipe: %s", strerror(errno)); ++ } else { ++ int notify[2]; ++ ++ if (pipe(notify) != 0) { ++ log_error("couldn't open pipe: %s", strerror(errno)); ++ close(recv_pipe[0]); ++ close(recv_pipe[1]); ++ } else { ++ drv.fd = recv_pipe[0]; ++ ++ child = fork(); ++ if (child == -1) { ++ log_error("couldn't fork child process: %s", strerror(errno)); ++ } else if (child == 0) { ++ close(recv_pipe[0]); ++ close(notify[0]); ++ recv_loop(recv_pipe[1], notify[1]); ++ _exit(0); ++ } else { ++ int dummy; ++ ++ close(recv_pipe[1]); ++ close(notify[1]); ++ /* make sure child has set its signal handler to avoid race with iguana_deinit() */ ++ chk_read(notify[0], &dummy, 1); ++ close(notify[0]); ++ sendConn = iguanaConnect(drv.device); ++ if (sendConn == -1) { ++ log_error("couldn't open connection to iguanaIR daemon: %s", ++ strerror(errno)); ++ } else { ++ retval = 1; ++ } ++ } ++ } ++ } ++ ++ return retval; ++} ++ ++static pid_t dowaitpid(pid_t pid, int* stat_loc, int options) ++{ ++ pid_t retval; ++ ++ do ++ retval = waitpid(pid, stat_loc, options); ++ while (retval == (pid_t)-1 && errno == EINTR); ++ ++ return retval; ++} ++ ++static int iguana_deinit(void) ++{ ++ /* close the connection to the iguana daemon */ ++ if (sendConn != -1) { ++ iguanaClose(sendConn); ++ sendConn = -1; ++ } ++ ++ /* signal the child process to exit */ ++ if (child > 0 && (kill(child, SIGTERM) == -1 || dowaitpid(child, NULL, 0) != (pid_t)-1)) ++ child = 0; ++ ++ /* close drv.fd since otherwise we leak open files */ ++ close(drv.fd); ++ drv.fd = -1; ++ ++ return child == 0; ++} ++ ++static char* iguana_rec(struct ir_remote* remotes) ++{ ++ char* retval = NULL; ++ ++ if (rec_buffer_clear()) ++ retval = decode_all(remotes); ++ return retval; ++} ++ ++static bool daemonTransaction(unsigned char code, void* value, size_t size) ++{ ++ uint8_t* data; ++ bool retval = false; ++ ++ data = (uint8_t*)malloc(size); ++ if (data != NULL) { ++ iguanaPacket request, response = NULL; ++ ++ memcpy(data, value, size); ++ request = iguanaCreateRequest(code, size, data); ++ if (request) { ++ if (iguanaWriteRequest(request, sendConn)) ++ response = iguanaReadResponse(sendConn, 10000); ++ iguanaFreePacket(request); ++ } else { ++ free(data); ++ } ++ ++ /* handle success */ ++ if (!iguanaResponseIsError(response)) ++ retval = true; ++ iguanaFreePacket(response); ++ } ++ return retval; ++} ++ ++static int iguana_send(struct ir_remote* remote, struct ir_ncode* code) ++{ ++ int retval = 0; ++ uint32_t freq; ++ ++ /* set the carrier frequency if necessary */ ++ freq = htonl(remote->freq); ++ if (remote->freq != currentCarrier && remote->freq >= 25000 && remote->freq <= 100000 ++ && daemonTransaction(IG_DEV_SETCARRIER, &freq, sizeof(freq))) ++ currentCarrier = remote->freq; ++ ++ if (send_buffer_put(remote, code)) { ++ int length, x; ++ const lirc_t* signals; ++ uint32_t* igsignals; ++ ++ length = send_buffer_length(); ++ signals = send_buffer_data(); ++ ++ igsignals = (uint32_t*)malloc(sizeof(uint32_t) * length); ++ if (igsignals != NULL) { ++ iguanaPacket request, response = NULL; ++ ++ /* must pack the data into a unit32_t array */ ++ for (x = 0; x < length; x++) { ++ igsignals[x] = signals[x] & PULSE_MASK; ++ if (signals[x] & PULSE_BIT) ++ igsignals[x] |= IG_PULSE_BIT; ++ } ++ ++ /* construct a request and send it to the daemon ++ * TRICKY: IguanaFreePacket free()'s both the ++ * igsignals chunk and the request packet, but ++ * iguanaCreateRequest does not malloc that chunk. ++ */ ++ request = iguanaCreateRequest(IG_DEV_SEND, sizeof(uint32_t) * length, igsignals); ++ if (iguanaWriteRequest(request, sendConn)) { ++ /* response will only come back after the device has ++ * transmitted */ ++ response = iguanaReadResponse(sendConn, 10000); ++ if (!iguanaResponseIsError(response)) ++ retval = 1; ++ ++ iguanaFreePacket(response); ++ } ++ ++ /* free the packet and the data */ ++ iguanaFreePacket(request); ++ } ++ } ++ ++ return retval; ++} ++ ++static int iguana_ioctl(unsigned int code, void* arg) ++{ ++ int retcode = -1; ++ uint8_t channels = *(uint8_t*)arg; ++ ++ /* set the transmit channels: return 0 on success, 4 if ++ * out-of-range (see ioctl) */ ++ if (code == LIRC_SET_TRANSMITTER_MASK) { ++ if (channels > 0x0F) ++ retcode = 4; ++ else if (daemonTransaction(IG_DEV_SETCHANNELS, &channels, sizeof(channels))) ++ retcode = 0; ++ } ++ ++ return retcode; ++} ++ ++static lirc_t readdata(lirc_t timeout) ++{ ++ lirc_t code = 0; ++ struct pollfd pfd = {.fd = drv.fd, .events = POLLIN, .revents = 0}; ++ /* attempt a read with a timeout using select */ ++ if (poll(&pfd, 1, timeout / 1000) > 0) { ++ /* if we failed to get data return 0 */ ++ if (read(drv.fd, &code, sizeof(lirc_t)) <= 0) ++ iguana_deinit(); ++ } ++ return code; ++} ++ ++const struct driver hw_iguanaIR = { ++ .name = "iguanaIR", ++ .device = "0", ++ .features = LIRC_CAN_REC_MODE2 | \ ++ LIRC_CAN_SEND_PULSE | \ ++ LIRC_CAN_SET_SEND_CARRIER | \ ++ LIRC_CAN_SET_TRANSMITTER_MASK, ++ .send_mode = LIRC_MODE_PULSE, ++ .rec_mode = LIRC_MODE_MODE2, ++ .code_length = sizeof(int), ++ .init_func = iguana_init, ++ .deinit_func = iguana_deinit, ++ .open_func = default_open, ++ .close_func = default_close, ++ .send_func = iguana_send, ++ .rec_func = iguana_rec, ++ .decode_func = receive_decode, ++ .drvctl_func = iguana_ioctl, ++ .readdata = readdata, ++ .api_version = 3, ++ .driver_version = "0.9.3", ++ .info = "See file://" PLUGINDOCS "/iguanair.html", ++ .device_hint = "/var/run/iguanaIR/*", ++}; ++ ++const struct driver* hardwares[] = { &hw_iguanaIR, (const struct driver*)NULL }; +diff --git a/iguanair.conf b/iguanair.conf +new file mode 100755 +index 0000000..12e9523 +--- /dev/null ++++ b/iguanair.conf +@@ -0,0 +1,13 @@ ++# This is a lirc configuration for a capture device. ++# See README for more. ++ ++config: ++ driver: iguanaIR ++ id: iguanaIR ++ label: Iguanaworks USB IR Transceiver ++ menu: usb ++ note: This is the user-space driver from Iguanaworks, Inc. ++ There is also a built-in kernel driver. Both can be used ++ but not concurrently. ++ product_driver: 1781:0938 ++ modprobe: [blacklist iguanair] +diff --git a/iguanair.html b/iguanair.html +new file mode 100755 +index 0000000..99609c3 +--- /dev/null ++++ b/iguanair.html +@@ -0,0 +1,18 @@ ++

++ This driver supports both receiving and sending (blasting) using ++ the IguanaIR devices from ++ http://iguanaworks.net/ir.

++

++ The LIRC driver works on top of the IguanaIR low-level userspace ++ driver which provides a socket interface. It is available from ++ the same source, and also packaged for many distributions ++ including Debian, Fedora and Arch Linux. ++

++ The --device argument to the driver is a socket designator created ++ by the low-level driveri. It defaults to '0' which implies ++ /run/iguanair/0. ++

++ The kernel has built-in support for these devices in the ++ iguanair module. This can be used instead of this driver in ++ many cases. If the userspace driver should be used, the ++ kernel driver must be blacklisted.

+-- +2.5.5 + diff --git a/0011-Rename-link-README-files-to-match-modified-install-r.patch b/0011-Rename-link-README-files-to-match-modified-install-r.patch new file mode 100644 index 0000000..2d2f602 --- /dev/null +++ b/0011-Rename-link-README-files-to-match-modified-install-r.patch @@ -0,0 +1,94 @@ +From 889ff6716f40c5abca23bbfed9660e29903cc009 Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Thu, 1 Sep 2016 02:52:51 +0200 +Subject: [PATCH 11/13] Rename/link README files to match modified install + routines. + +--- + README | 28 ---------------------------- + README.md | 1 + + iguanair.txt | 28 ++++++++++++++++++++++++++++ + 3 files changed, 29 insertions(+), 28 deletions(-) + delete mode 100755 README + create mode 120000 README.md + create mode 100755 iguanair.txt + +diff --git a/README b/README +deleted file mode 100755 +index 843baf6..0000000 +--- a/README ++++ /dev/null +@@ -1,28 +0,0 @@ +-IguanaIR LIRC driver README +-=========================== +- +-This driver used to be part of the LIRC sources. In order to improve +-the maintenance it has been moved to Iguanaworks, Inc which is the +-primary hardware and software vendor. +- +-From 0.9.4 the driver is available at: https://github.com/iguanaworks/iguanair-lirc +- +-As a transition step the same files are available here during the 0.9.4 +-cycle. These files are a complete lirc driver for iguanair. Building requires +-lirc >= 0.9.4. If you are using a packaged version you probably need to +-have the -devel and -doc packages installed. Note that the downstream +-sources at https://github.com/iguanaworks/iguanair-lirc are preferred and +-will be the only option in next release. +- +-To build and install the driver together with the support files: +- +- $ make +- $ sudo make install +- +-Verifying the driver after make install: +- +- $ lirc-lsplugins -q iguanair +- --- /usr/lib64/lirc/plugins/iguanair.so +- +-You could also find the driver docs in the manual. The path varies, but +-in a packaged version typically /usr/share/doc/lirc/lirc.org/html/index.html. +diff --git a/README.md b/README.md +new file mode 120000 +index 0000000..b471562 +--- /dev/null ++++ b/README.md +@@ -0,0 +1 @@ ++iguanair.txt +\ No newline at end of file +diff --git a/iguanair.txt b/iguanair.txt +new file mode 100755 +index 0000000..843baf6 +--- /dev/null ++++ b/iguanair.txt +@@ -0,0 +1,28 @@ ++IguanaIR LIRC driver README ++=========================== ++ ++This driver used to be part of the LIRC sources. In order to improve ++the maintenance it has been moved to Iguanaworks, Inc which is the ++primary hardware and software vendor. ++ ++From 0.9.4 the driver is available at: https://github.com/iguanaworks/iguanair-lirc ++ ++As a transition step the same files are available here during the 0.9.4 ++cycle. These files are a complete lirc driver for iguanair. Building requires ++lirc >= 0.9.4. If you are using a packaged version you probably need to ++have the -devel and -doc packages installed. Note that the downstream ++sources at https://github.com/iguanaworks/iguanair-lirc are preferred and ++will be the only option in next release. ++ ++To build and install the driver together with the support files: ++ ++ $ make ++ $ sudo make install ++ ++Verifying the driver after make install: ++ ++ $ lirc-lsplugins -q iguanair ++ --- /usr/lib64/lirc/plugins/iguanair.so ++ ++You could also find the driver docs in the manual. The path varies, but ++in a packaged version typically /usr/share/doc/lirc/lirc.org/html/index.html. +-- +2.5.5 + diff --git a/0012-Makefile-Add-DESTDIR-support.patch b/0012-Makefile-Add-DESTDIR-support.patch new file mode 100644 index 0000000..4a2ff0f --- /dev/null +++ b/0012-Makefile-Add-DESTDIR-support.patch @@ -0,0 +1,59 @@ +From 4d692f097e5c556f47404c97a5ce2c0b2180ee3a Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Thu, 1 Sep 2016 03:17:27 +0200 +Subject: [PATCH 12/13] Makefile: Add DESTDIR support + +--- + Makefile | 21 +++++++++++++++------ + 1 file changed, 15 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index c6a7f7a..4db147a 100755 +--- a/Makefile ++++ b/Makefile +@@ -8,7 +8,7 @@ + # + + +-driver = iguanaIR ++driver = iguanair + + all: $(driver).so + +@@ -18,7 +18,13 @@ PLUGINDIR ?= $(shell pkg-config --variable=plugindir lirc-driver) + CONFIGDIR ?= $(shell pkg-config --variable=configdir lirc-driver) + PLUGINDOCS ?= $(shell pkg-config --variable=plugindocs lirc-driver) + +-include $(PLUGINDOCS)/plugindocs.mk ++PLUGINDOCS_MK = $(PLUGINDOCS)/plugindocs.mk ++MODPROBE_CONF = 60-blacklist-kernel-iguanair.conf ++ ++ifneq ($(wildcard $(PLUGINDOCS_MK)),) ++ include $(PLUGINDOCS_MK) ++endif ++ + + $(driver).o: $(driver).c + +@@ -26,11 +32,14 @@ $(driver).so: $(driver).o + gcc --shared -fpic $(LDFLAGS) -o $@ $< + + install: $(driver).so +- install $< $(PLUGINDIR) +- install $(driver).conf $(CONFIGDIR) +- install $(driver).html $(PLUGINDOCS) +- install -m 644 60-blacklist-kernel-iguanair.conf /etc/modprobe.d ++ install -pDm 755 $< $(DESTDIR)$(PLUGINDIR)/$< ++ install -pDm 644 $(driver).html $(DESTDIR)$(PLUGINDOCS)/$(driver).html ++ install -pDm 644 $(driver).conf $(DESTDIR)$(CONFIGDIR)/$(driver).conf ++ install -pDm 644 $(MODPROBE_CONF) \ ++ $(DESTDIR)/etc/modprobe.d/$(MODPROBE_CONF) ++ifneq ($(wildcard $(PLUGINDOCS_MK)),) + $(MAKE) update ++endif + + clean: + rm -f *.o *.so +-- +2.5.5 + diff --git a/0013-Convert-all-files-to-LF-line-endings-like-main-drive.patch b/0013-Convert-all-files-to-LF-line-endings-like-main-drive.patch new file mode 100644 index 0000000..107a0a4 --- /dev/null +++ b/0013-Convert-all-files-to-LF-line-endings-like-main-drive.patch @@ -0,0 +1,988 @@ +From c75c2561ae65c711a80136e96fcba0f0fbb00294 Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Thu, 1 Sep 2016 03:25:23 +0200 +Subject: [PATCH 13/13] Convert all files to LF line endings (like main driver + files). + +--- + 60-blacklist-kernel-iguanair.conf | 4 +- + Makefile | 90 ++--- + iguanair.c | 728 +++++++++++++++++++------------------- + iguanair.conf | 26 +- + iguanair.html | 36 +- + iguanair.txt | 56 +-- + 6 files changed, 470 insertions(+), 470 deletions(-) + +diff --git a/60-blacklist-kernel-iguanair.conf b/60-blacklist-kernel-iguanair.conf +index 1cf1cfa..1888c18 100755 +--- a/60-blacklist-kernel-iguanair.conf ++++ b/60-blacklist-kernel-iguanair.conf +@@ -1,2 +1,2 @@ +-# kernel iguanair module conflicts with userspace IguanaIR daemon +-blacklist iguanair ++# kernel iguanair module conflicts with userspace IguanaIR daemon ++blacklist iguanair +diff --git a/Makefile b/Makefile +index 4db147a..dd093eb 100755 +--- a/Makefile ++++ b/Makefile +@@ -1,45 +1,45 @@ +-# +-# Template for building a lirc userspace driver out of tree. +-# Requires that lirc is installed in system locations, in +-# particular that the /usr/lib[64]/pkgconfig/lirc-driver.pc +-# is in place (/usr/local/lib/pkgconfig/... is also OK). +-# The required file plugindocs.mk might live in a -doc +-# package which then is needed. +-# +- +- +-driver = iguanair +- +-all: $(driver).so +- +-CFLAGS += $(shell pkg-config --cflags lirc-driver) +-LDFLAGS += $(shell pkg-config --libs lirc-driver) +-PLUGINDIR ?= $(shell pkg-config --variable=plugindir lirc-driver) +-CONFIGDIR ?= $(shell pkg-config --variable=configdir lirc-driver) +-PLUGINDOCS ?= $(shell pkg-config --variable=plugindocs lirc-driver) +- +-PLUGINDOCS_MK = $(PLUGINDOCS)/plugindocs.mk +-MODPROBE_CONF = 60-blacklist-kernel-iguanair.conf +- +-ifneq ($(wildcard $(PLUGINDOCS_MK)),) +- include $(PLUGINDOCS_MK) +-endif +- +- +-$(driver).o: $(driver).c +- +-$(driver).so: $(driver).o +- gcc --shared -fpic $(LDFLAGS) -o $@ $< +- +-install: $(driver).so +- install -pDm 755 $< $(DESTDIR)$(PLUGINDIR)/$< +- install -pDm 644 $(driver).html $(DESTDIR)$(PLUGINDOCS)/$(driver).html +- install -pDm 644 $(driver).conf $(DESTDIR)$(CONFIGDIR)/$(driver).conf +- install -pDm 644 $(MODPROBE_CONF) \ +- $(DESTDIR)/etc/modprobe.d/$(MODPROBE_CONF) +-ifneq ($(wildcard $(PLUGINDOCS_MK)),) +- $(MAKE) update +-endif +- +-clean: +- rm -f *.o *.so ++# ++# Template for building a lirc userspace driver out of tree. ++# Requires that lirc is installed in system locations, in ++# particular that the /usr/lib[64]/pkgconfig/lirc-driver.pc ++# is in place (/usr/local/lib/pkgconfig/... is also OK). ++# The required file plugindocs.mk might live in a -doc ++# package which then is needed. ++# ++ ++ ++driver = iguanair ++ ++all: $(driver).so ++ ++CFLAGS += $(shell pkg-config --cflags lirc-driver) ++LDFLAGS += $(shell pkg-config --libs lirc-driver) ++PLUGINDIR ?= $(shell pkg-config --variable=plugindir lirc-driver) ++CONFIGDIR ?= $(shell pkg-config --variable=configdir lirc-driver) ++PLUGINDOCS ?= $(shell pkg-config --variable=plugindocs lirc-driver) ++ ++PLUGINDOCS_MK = $(PLUGINDOCS)/plugindocs.mk ++MODPROBE_CONF = 60-blacklist-kernel-iguanair.conf ++ ++ifneq ($(wildcard $(PLUGINDOCS_MK)),) ++ include $(PLUGINDOCS_MK) ++endif ++ ++ ++$(driver).o: $(driver).c ++ ++$(driver).so: $(driver).o ++ gcc --shared -fpic $(LDFLAGS) -o $@ $< ++ ++install: $(driver).so ++ install -pDm 755 $< $(DESTDIR)$(PLUGINDIR)/$< ++ install -pDm 644 $(driver).html $(DESTDIR)$(PLUGINDOCS)/$(driver).html ++ install -pDm 644 $(driver).conf $(DESTDIR)$(CONFIGDIR)/$(driver).conf ++ install -pDm 644 $(MODPROBE_CONF) \ ++ $(DESTDIR)/etc/modprobe.d/$(MODPROBE_CONF) ++ifneq ($(wildcard $(PLUGINDOCS_MK)),) ++ $(MAKE) update ++endif ++ ++clean: ++ rm -f *.o *.so +diff --git a/iguanair.c b/iguanair.c +index f2e5794..a43665f 100755 +--- a/iguanair.c ++++ b/iguanair.c +@@ -1,364 +1,364 @@ +-/**************************************************************************** +-** hw_iguanaIR.c *********************************************************** +-**************************************************************************** +-* +-* routines for interfacing with Iguanaworks USB IR devices +-* +-* Copyright (C) 2006, Joseph Dunn +-* +-* Distribute under GPL version 2. +-* +-*/ +- +-#ifdef HAVE_CONFIG_H +-# include +-#endif +- +-#include +-#include +-#include +-#include +-#include +-#include +-#if defined __APPLE__ +-#include +-#include +-#else +-#include +-#endif +-#include +- +-#include "lirc_driver.h" +- +-#include "iguanaIR.h" +-static const logchannel_t logchannel = LOG_DRIVER; +- +-static int sendConn = -1; +-static pid_t child = 0; +-static int recvDone = 0; +-static int currentCarrier = -1; +- +-static void quitHandler(int sig) +-{ +- recvDone = 1; +-} +- +-static void recv_loop(int fd, int notify) +-{ +- int conn; +- +- alarm(0); +- signal(SIGTERM, quitHandler); +- /* signal(SIGPIPE, SIG_DFL); */ +- signal(SIGINT, quitHandler); +- signal(SIGHUP, SIG_IGN); +- signal(SIGALRM, SIG_IGN); +- +- /* notify parent by closing notify */ +- close(notify); +- +- conn = iguanaConnect(drv.device); +- if (conn != -1) { +- iguanaPacket request, response; +- lirc_t prevCode = -1; +- +- request = iguanaCreateRequest(IG_DEV_RECVON, 0, NULL); +- if (iguanaWriteRequest(request, conn)) { +- while (!recvDone) { +- /* read from device */ +- do +- response = iguanaReadResponse(conn, 1000); +- while (!recvDone && ((response == NULL && errno == ETIMEDOUT) +- || (iguanaResponseIsError(response) && errno == ETIMEDOUT))); +- +- if (iguanaResponseIsError(response)) { +- /* be quiet during exit */ +- if (!recvDone) +- log_error("error response: %s\n", strerror(errno)); +- break; +- } else if (iguanaCode(response) == IG_DEV_RECV) { +- uint32_t* code; +- unsigned int length, x, y = 0; +- lirc_t buffer[8]; /* we read 8 bytes max at a time +- * from the device, i.e. packet +- * can only contain 8 +- * signals. */ +- +- /* pull the data off the packet */ +- code = (uint32_t*)iguanaRemoveData(response, &length); +- length /= sizeof(uint32_t); +- +- /* translate the code into lirc_t pulses (and make +- * sure they don't split across iguana packets. */ +- for (x = 0; x < length; x++) { +- if (prevCode == -1) { +- prevCode = (code[x] & IG_PULSE_MASK); +- if (prevCode > PULSE_MASK) +- prevCode = PULSE_MASK; +- if (code[x] & IG_PULSE_BIT) +- prevCode |= PULSE_BIT; +- } else if (((prevCode & PULSE_BIT) && (code[x] & IG_PULSE_BIT)) +- || (!(prevCode & PULSE_BIT) && !(code[x] & IG_PULSE_BIT))) { +- /* can overflow pulse mask, so just set to +- * largest possible */ +- if ((prevCode & PULSE_MASK) + (code[x] & IG_PULSE_MASK) > +- PULSE_MASK) +- prevCode = (prevCode & PULSE_BIT) | PULSE_MASK; +- else +- prevCode += code[x] & IG_PULSE_MASK; +- } else { +- buffer[y] = prevCode; +- y++; +- +- prevCode = (code[x] & IG_PULSE_MASK); +- if (prevCode > PULSE_MASK) +- prevCode = PULSE_MASK; +- if (code[x] & IG_PULSE_BIT) +- prevCode |= PULSE_BIT; +- } +- } +- +- /* write the data and free it */ +- if (y > 0) { +- chk_write(fd, +- buffer, +- sizeof(lirc_t) * y); +- } +- free(code); +- } +- +- iguanaFreePacket(response); +- } +- } +- +- iguanaFreePacket(request); +- } +- +- iguanaClose(conn); +- close(fd); +-} +- +-static int iguana_init(void) +-{ +- int recv_pipe[2], retval = 0; +- +- rec_buffer_init(); +- +- if (pipe(recv_pipe) != 0) { +- log_error("couldn't open pipe: %s", strerror(errno)); +- } else { +- int notify[2]; +- +- if (pipe(notify) != 0) { +- log_error("couldn't open pipe: %s", strerror(errno)); +- close(recv_pipe[0]); +- close(recv_pipe[1]); +- } else { +- drv.fd = recv_pipe[0]; +- +- child = fork(); +- if (child == -1) { +- log_error("couldn't fork child process: %s", strerror(errno)); +- } else if (child == 0) { +- close(recv_pipe[0]); +- close(notify[0]); +- recv_loop(recv_pipe[1], notify[1]); +- _exit(0); +- } else { +- int dummy; +- +- close(recv_pipe[1]); +- close(notify[1]); +- /* make sure child has set its signal handler to avoid race with iguana_deinit() */ +- chk_read(notify[0], &dummy, 1); +- close(notify[0]); +- sendConn = iguanaConnect(drv.device); +- if (sendConn == -1) { +- log_error("couldn't open connection to iguanaIR daemon: %s", +- strerror(errno)); +- } else { +- retval = 1; +- } +- } +- } +- } +- +- return retval; +-} +- +-static pid_t dowaitpid(pid_t pid, int* stat_loc, int options) +-{ +- pid_t retval; +- +- do +- retval = waitpid(pid, stat_loc, options); +- while (retval == (pid_t)-1 && errno == EINTR); +- +- return retval; +-} +- +-static int iguana_deinit(void) +-{ +- /* close the connection to the iguana daemon */ +- if (sendConn != -1) { +- iguanaClose(sendConn); +- sendConn = -1; +- } +- +- /* signal the child process to exit */ +- if (child > 0 && (kill(child, SIGTERM) == -1 || dowaitpid(child, NULL, 0) != (pid_t)-1)) +- child = 0; +- +- /* close drv.fd since otherwise we leak open files */ +- close(drv.fd); +- drv.fd = -1; +- +- return child == 0; +-} +- +-static char* iguana_rec(struct ir_remote* remotes) +-{ +- char* retval = NULL; +- +- if (rec_buffer_clear()) +- retval = decode_all(remotes); +- return retval; +-} +- +-static bool daemonTransaction(unsigned char code, void* value, size_t size) +-{ +- uint8_t* data; +- bool retval = false; +- +- data = (uint8_t*)malloc(size); +- if (data != NULL) { +- iguanaPacket request, response = NULL; +- +- memcpy(data, value, size); +- request = iguanaCreateRequest(code, size, data); +- if (request) { +- if (iguanaWriteRequest(request, sendConn)) +- response = iguanaReadResponse(sendConn, 10000); +- iguanaFreePacket(request); +- } else { +- free(data); +- } +- +- /* handle success */ +- if (!iguanaResponseIsError(response)) +- retval = true; +- iguanaFreePacket(response); +- } +- return retval; +-} +- +-static int iguana_send(struct ir_remote* remote, struct ir_ncode* code) +-{ +- int retval = 0; +- uint32_t freq; +- +- /* set the carrier frequency if necessary */ +- freq = htonl(remote->freq); +- if (remote->freq != currentCarrier && remote->freq >= 25000 && remote->freq <= 100000 +- && daemonTransaction(IG_DEV_SETCARRIER, &freq, sizeof(freq))) +- currentCarrier = remote->freq; +- +- if (send_buffer_put(remote, code)) { +- int length, x; +- const lirc_t* signals; +- uint32_t* igsignals; +- +- length = send_buffer_length(); +- signals = send_buffer_data(); +- +- igsignals = (uint32_t*)malloc(sizeof(uint32_t) * length); +- if (igsignals != NULL) { +- iguanaPacket request, response = NULL; +- +- /* must pack the data into a unit32_t array */ +- for (x = 0; x < length; x++) { +- igsignals[x] = signals[x] & PULSE_MASK; +- if (signals[x] & PULSE_BIT) +- igsignals[x] |= IG_PULSE_BIT; +- } +- +- /* construct a request and send it to the daemon +- * TRICKY: IguanaFreePacket free()'s both the +- * igsignals chunk and the request packet, but +- * iguanaCreateRequest does not malloc that chunk. +- */ +- request = iguanaCreateRequest(IG_DEV_SEND, sizeof(uint32_t) * length, igsignals); +- if (iguanaWriteRequest(request, sendConn)) { +- /* response will only come back after the device has +- * transmitted */ +- response = iguanaReadResponse(sendConn, 10000); +- if (!iguanaResponseIsError(response)) +- retval = 1; +- +- iguanaFreePacket(response); +- } +- +- /* free the packet and the data */ +- iguanaFreePacket(request); +- } +- } +- +- return retval; +-} +- +-static int iguana_ioctl(unsigned int code, void* arg) +-{ +- int retcode = -1; +- uint8_t channels = *(uint8_t*)arg; +- +- /* set the transmit channels: return 0 on success, 4 if +- * out-of-range (see ioctl) */ +- if (code == LIRC_SET_TRANSMITTER_MASK) { +- if (channels > 0x0F) +- retcode = 4; +- else if (daemonTransaction(IG_DEV_SETCHANNELS, &channels, sizeof(channels))) +- retcode = 0; +- } +- +- return retcode; +-} +- +-static lirc_t readdata(lirc_t timeout) +-{ +- lirc_t code = 0; +- struct pollfd pfd = {.fd = drv.fd, .events = POLLIN, .revents = 0}; +- /* attempt a read with a timeout using select */ +- if (poll(&pfd, 1, timeout / 1000) > 0) { +- /* if we failed to get data return 0 */ +- if (read(drv.fd, &code, sizeof(lirc_t)) <= 0) +- iguana_deinit(); +- } +- return code; +-} +- +-const struct driver hw_iguanaIR = { +- .name = "iguanaIR", +- .device = "0", +- .features = LIRC_CAN_REC_MODE2 | \ +- LIRC_CAN_SEND_PULSE | \ +- LIRC_CAN_SET_SEND_CARRIER | \ +- LIRC_CAN_SET_TRANSMITTER_MASK, +- .send_mode = LIRC_MODE_PULSE, +- .rec_mode = LIRC_MODE_MODE2, +- .code_length = sizeof(int), +- .init_func = iguana_init, +- .deinit_func = iguana_deinit, +- .open_func = default_open, +- .close_func = default_close, +- .send_func = iguana_send, +- .rec_func = iguana_rec, +- .decode_func = receive_decode, +- .drvctl_func = iguana_ioctl, +- .readdata = readdata, +- .api_version = 3, +- .driver_version = "0.9.3", +- .info = "See file://" PLUGINDOCS "/iguanair.html", +- .device_hint = "/var/run/iguanaIR/*", +-}; +- +-const struct driver* hardwares[] = { &hw_iguanaIR, (const struct driver*)NULL }; ++/**************************************************************************** ++** hw_iguanaIR.c *********************************************************** ++**************************************************************************** ++* ++* routines for interfacing with Iguanaworks USB IR devices ++* ++* Copyright (C) 2006, Joseph Dunn ++* ++* Distribute under GPL version 2. ++* ++*/ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#if defined __APPLE__ ++#include ++#include ++#else ++#include ++#endif ++#include ++ ++#include "lirc_driver.h" ++ ++#include "iguanaIR.h" ++static const logchannel_t logchannel = LOG_DRIVER; ++ ++static int sendConn = -1; ++static pid_t child = 0; ++static int recvDone = 0; ++static int currentCarrier = -1; ++ ++static void quitHandler(int sig) ++{ ++ recvDone = 1; ++} ++ ++static void recv_loop(int fd, int notify) ++{ ++ int conn; ++ ++ alarm(0); ++ signal(SIGTERM, quitHandler); ++ /* signal(SIGPIPE, SIG_DFL); */ ++ signal(SIGINT, quitHandler); ++ signal(SIGHUP, SIG_IGN); ++ signal(SIGALRM, SIG_IGN); ++ ++ /* notify parent by closing notify */ ++ close(notify); ++ ++ conn = iguanaConnect(drv.device); ++ if (conn != -1) { ++ iguanaPacket request, response; ++ lirc_t prevCode = -1; ++ ++ request = iguanaCreateRequest(IG_DEV_RECVON, 0, NULL); ++ if (iguanaWriteRequest(request, conn)) { ++ while (!recvDone) { ++ /* read from device */ ++ do ++ response = iguanaReadResponse(conn, 1000); ++ while (!recvDone && ((response == NULL && errno == ETIMEDOUT) ++ || (iguanaResponseIsError(response) && errno == ETIMEDOUT))); ++ ++ if (iguanaResponseIsError(response)) { ++ /* be quiet during exit */ ++ if (!recvDone) ++ log_error("error response: %s\n", strerror(errno)); ++ break; ++ } else if (iguanaCode(response) == IG_DEV_RECV) { ++ uint32_t* code; ++ unsigned int length, x, y = 0; ++ lirc_t buffer[8]; /* we read 8 bytes max at a time ++ * from the device, i.e. packet ++ * can only contain 8 ++ * signals. */ ++ ++ /* pull the data off the packet */ ++ code = (uint32_t*)iguanaRemoveData(response, &length); ++ length /= sizeof(uint32_t); ++ ++ /* translate the code into lirc_t pulses (and make ++ * sure they don't split across iguana packets. */ ++ for (x = 0; x < length; x++) { ++ if (prevCode == -1) { ++ prevCode = (code[x] & IG_PULSE_MASK); ++ if (prevCode > PULSE_MASK) ++ prevCode = PULSE_MASK; ++ if (code[x] & IG_PULSE_BIT) ++ prevCode |= PULSE_BIT; ++ } else if (((prevCode & PULSE_BIT) && (code[x] & IG_PULSE_BIT)) ++ || (!(prevCode & PULSE_BIT) && !(code[x] & IG_PULSE_BIT))) { ++ /* can overflow pulse mask, so just set to ++ * largest possible */ ++ if ((prevCode & PULSE_MASK) + (code[x] & IG_PULSE_MASK) > ++ PULSE_MASK) ++ prevCode = (prevCode & PULSE_BIT) | PULSE_MASK; ++ else ++ prevCode += code[x] & IG_PULSE_MASK; ++ } else { ++ buffer[y] = prevCode; ++ y++; ++ ++ prevCode = (code[x] & IG_PULSE_MASK); ++ if (prevCode > PULSE_MASK) ++ prevCode = PULSE_MASK; ++ if (code[x] & IG_PULSE_BIT) ++ prevCode |= PULSE_BIT; ++ } ++ } ++ ++ /* write the data and free it */ ++ if (y > 0) { ++ chk_write(fd, ++ buffer, ++ sizeof(lirc_t) * y); ++ } ++ free(code); ++ } ++ ++ iguanaFreePacket(response); ++ } ++ } ++ ++ iguanaFreePacket(request); ++ } ++ ++ iguanaClose(conn); ++ close(fd); ++} ++ ++static int iguana_init(void) ++{ ++ int recv_pipe[2], retval = 0; ++ ++ rec_buffer_init(); ++ ++ if (pipe(recv_pipe) != 0) { ++ log_error("couldn't open pipe: %s", strerror(errno)); ++ } else { ++ int notify[2]; ++ ++ if (pipe(notify) != 0) { ++ log_error("couldn't open pipe: %s", strerror(errno)); ++ close(recv_pipe[0]); ++ close(recv_pipe[1]); ++ } else { ++ drv.fd = recv_pipe[0]; ++ ++ child = fork(); ++ if (child == -1) { ++ log_error("couldn't fork child process: %s", strerror(errno)); ++ } else if (child == 0) { ++ close(recv_pipe[0]); ++ close(notify[0]); ++ recv_loop(recv_pipe[1], notify[1]); ++ _exit(0); ++ } else { ++ int dummy; ++ ++ close(recv_pipe[1]); ++ close(notify[1]); ++ /* make sure child has set its signal handler to avoid race with iguana_deinit() */ ++ chk_read(notify[0], &dummy, 1); ++ close(notify[0]); ++ sendConn = iguanaConnect(drv.device); ++ if (sendConn == -1) { ++ log_error("couldn't open connection to iguanaIR daemon: %s", ++ strerror(errno)); ++ } else { ++ retval = 1; ++ } ++ } ++ } ++ } ++ ++ return retval; ++} ++ ++static pid_t dowaitpid(pid_t pid, int* stat_loc, int options) ++{ ++ pid_t retval; ++ ++ do ++ retval = waitpid(pid, stat_loc, options); ++ while (retval == (pid_t)-1 && errno == EINTR); ++ ++ return retval; ++} ++ ++static int iguana_deinit(void) ++{ ++ /* close the connection to the iguana daemon */ ++ if (sendConn != -1) { ++ iguanaClose(sendConn); ++ sendConn = -1; ++ } ++ ++ /* signal the child process to exit */ ++ if (child > 0 && (kill(child, SIGTERM) == -1 || dowaitpid(child, NULL, 0) != (pid_t)-1)) ++ child = 0; ++ ++ /* close drv.fd since otherwise we leak open files */ ++ close(drv.fd); ++ drv.fd = -1; ++ ++ return child == 0; ++} ++ ++static char* iguana_rec(struct ir_remote* remotes) ++{ ++ char* retval = NULL; ++ ++ if (rec_buffer_clear()) ++ retval = decode_all(remotes); ++ return retval; ++} ++ ++static bool daemonTransaction(unsigned char code, void* value, size_t size) ++{ ++ uint8_t* data; ++ bool retval = false; ++ ++ data = (uint8_t*)malloc(size); ++ if (data != NULL) { ++ iguanaPacket request, response = NULL; ++ ++ memcpy(data, value, size); ++ request = iguanaCreateRequest(code, size, data); ++ if (request) { ++ if (iguanaWriteRequest(request, sendConn)) ++ response = iguanaReadResponse(sendConn, 10000); ++ iguanaFreePacket(request); ++ } else { ++ free(data); ++ } ++ ++ /* handle success */ ++ if (!iguanaResponseIsError(response)) ++ retval = true; ++ iguanaFreePacket(response); ++ } ++ return retval; ++} ++ ++static int iguana_send(struct ir_remote* remote, struct ir_ncode* code) ++{ ++ int retval = 0; ++ uint32_t freq; ++ ++ /* set the carrier frequency if necessary */ ++ freq = htonl(remote->freq); ++ if (remote->freq != currentCarrier && remote->freq >= 25000 && remote->freq <= 100000 ++ && daemonTransaction(IG_DEV_SETCARRIER, &freq, sizeof(freq))) ++ currentCarrier = remote->freq; ++ ++ if (send_buffer_put(remote, code)) { ++ int length, x; ++ const lirc_t* signals; ++ uint32_t* igsignals; ++ ++ length = send_buffer_length(); ++ signals = send_buffer_data(); ++ ++ igsignals = (uint32_t*)malloc(sizeof(uint32_t) * length); ++ if (igsignals != NULL) { ++ iguanaPacket request, response = NULL; ++ ++ /* must pack the data into a unit32_t array */ ++ for (x = 0; x < length; x++) { ++ igsignals[x] = signals[x] & PULSE_MASK; ++ if (signals[x] & PULSE_BIT) ++ igsignals[x] |= IG_PULSE_BIT; ++ } ++ ++ /* construct a request and send it to the daemon ++ * TRICKY: IguanaFreePacket free()'s both the ++ * igsignals chunk and the request packet, but ++ * iguanaCreateRequest does not malloc that chunk. ++ */ ++ request = iguanaCreateRequest(IG_DEV_SEND, sizeof(uint32_t) * length, igsignals); ++ if (iguanaWriteRequest(request, sendConn)) { ++ /* response will only come back after the device has ++ * transmitted */ ++ response = iguanaReadResponse(sendConn, 10000); ++ if (!iguanaResponseIsError(response)) ++ retval = 1; ++ ++ iguanaFreePacket(response); ++ } ++ ++ /* free the packet and the data */ ++ iguanaFreePacket(request); ++ } ++ } ++ ++ return retval; ++} ++ ++static int iguana_ioctl(unsigned int code, void* arg) ++{ ++ int retcode = -1; ++ uint8_t channels = *(uint8_t*)arg; ++ ++ /* set the transmit channels: return 0 on success, 4 if ++ * out-of-range (see ioctl) */ ++ if (code == LIRC_SET_TRANSMITTER_MASK) { ++ if (channels > 0x0F) ++ retcode = 4; ++ else if (daemonTransaction(IG_DEV_SETCHANNELS, &channels, sizeof(channels))) ++ retcode = 0; ++ } ++ ++ return retcode; ++} ++ ++static lirc_t readdata(lirc_t timeout) ++{ ++ lirc_t code = 0; ++ struct pollfd pfd = {.fd = drv.fd, .events = POLLIN, .revents = 0}; ++ /* attempt a read with a timeout using select */ ++ if (poll(&pfd, 1, timeout / 1000) > 0) { ++ /* if we failed to get data return 0 */ ++ if (read(drv.fd, &code, sizeof(lirc_t)) <= 0) ++ iguana_deinit(); ++ } ++ return code; ++} ++ ++const struct driver hw_iguanaIR = { ++ .name = "iguanaIR", ++ .device = "0", ++ .features = LIRC_CAN_REC_MODE2 | \ ++ LIRC_CAN_SEND_PULSE | \ ++ LIRC_CAN_SET_SEND_CARRIER | \ ++ LIRC_CAN_SET_TRANSMITTER_MASK, ++ .send_mode = LIRC_MODE_PULSE, ++ .rec_mode = LIRC_MODE_MODE2, ++ .code_length = sizeof(int), ++ .init_func = iguana_init, ++ .deinit_func = iguana_deinit, ++ .open_func = default_open, ++ .close_func = default_close, ++ .send_func = iguana_send, ++ .rec_func = iguana_rec, ++ .decode_func = receive_decode, ++ .drvctl_func = iguana_ioctl, ++ .readdata = readdata, ++ .api_version = 3, ++ .driver_version = "0.9.3", ++ .info = "See file://" PLUGINDOCS "/iguanair.html", ++ .device_hint = "/var/run/iguanaIR/*", ++}; ++ ++const struct driver* hardwares[] = { &hw_iguanaIR, (const struct driver*)NULL }; +diff --git a/iguanair.conf b/iguanair.conf +index 12e9523..6d17d77 100755 +--- a/iguanair.conf ++++ b/iguanair.conf +@@ -1,13 +1,13 @@ +-# This is a lirc configuration for a capture device. +-# See README for more. +- +-config: +- driver: iguanaIR +- id: iguanaIR +- label: Iguanaworks USB IR Transceiver +- menu: usb +- note: This is the user-space driver from Iguanaworks, Inc. +- There is also a built-in kernel driver. Both can be used +- but not concurrently. +- product_driver: 1781:0938 +- modprobe: [blacklist iguanair] ++# This is a lirc configuration for a capture device. ++# See README for more. ++ ++config: ++ driver: iguanaIR ++ id: iguanaIR ++ label: Iguanaworks USB IR Transceiver ++ menu: usb ++ note: This is the user-space driver from Iguanaworks, Inc. ++ There is also a built-in kernel driver. Both can be used ++ but not concurrently. ++ product_driver: 1781:0938 ++ modprobe: [blacklist iguanair] +diff --git a/iguanair.html b/iguanair.html +index 99609c3..a62cdb1 100755 +--- a/iguanair.html ++++ b/iguanair.html +@@ -1,18 +1,18 @@ +-

+- This driver supports both receiving and sending (blasting) using +- the IguanaIR devices from +- http://iguanaworks.net/ir.

+-

+- The LIRC driver works on top of the IguanaIR low-level userspace +- driver which provides a socket interface. It is available from +- the same source, and also packaged for many distributions +- including Debian, Fedora and Arch Linux. +-

+- The --device argument to the driver is a socket designator created +- by the low-level driveri. It defaults to '0' which implies +- /run/iguanair/0. +-

+- The kernel has built-in support for these devices in the +- iguanair module. This can be used instead of this driver in +- many cases. If the userspace driver should be used, the +- kernel driver must be blacklisted.

++

++ This driver supports both receiving and sending (blasting) using ++ the IguanaIR devices from ++ http://iguanaworks.net/ir.

++

++ The LIRC driver works on top of the IguanaIR low-level userspace ++ driver which provides a socket interface. It is available from ++ the same source, and also packaged for many distributions ++ including Debian, Fedora and Arch Linux. ++

++ The --device argument to the driver is a socket designator created ++ by the low-level driveri. It defaults to '0' which implies ++ /run/iguanair/0. ++

++ The kernel has built-in support for these devices in the ++ iguanair module. This can be used instead of this driver in ++ many cases. If the userspace driver should be used, the ++ kernel driver must be blacklisted.

+diff --git a/iguanair.txt b/iguanair.txt +index 843baf6..4494163 100755 +--- a/iguanair.txt ++++ b/iguanair.txt +@@ -1,28 +1,28 @@ +-IguanaIR LIRC driver README +-=========================== +- +-This driver used to be part of the LIRC sources. In order to improve +-the maintenance it has been moved to Iguanaworks, Inc which is the +-primary hardware and software vendor. +- +-From 0.9.4 the driver is available at: https://github.com/iguanaworks/iguanair-lirc +- +-As a transition step the same files are available here during the 0.9.4 +-cycle. These files are a complete lirc driver for iguanair. Building requires +-lirc >= 0.9.4. If you are using a packaged version you probably need to +-have the -devel and -doc packages installed. Note that the downstream +-sources at https://github.com/iguanaworks/iguanair-lirc are preferred and +-will be the only option in next release. +- +-To build and install the driver together with the support files: +- +- $ make +- $ sudo make install +- +-Verifying the driver after make install: +- +- $ lirc-lsplugins -q iguanair +- --- /usr/lib64/lirc/plugins/iguanair.so +- +-You could also find the driver docs in the manual. The path varies, but +-in a packaged version typically /usr/share/doc/lirc/lirc.org/html/index.html. ++IguanaIR LIRC driver README ++=========================== ++ ++This driver used to be part of the LIRC sources. In order to improve ++the maintenance it has been moved to Iguanaworks, Inc which is the ++primary hardware and software vendor. ++ ++From 0.9.4 the driver is available at: https://github.com/iguanaworks/iguanair-lirc ++ ++As a transition step the same files are available here during the 0.9.4 ++cycle. These files are a complete lirc driver for iguanair. Building requires ++lirc >= 0.9.4. If you are using a packaged version you probably need to ++have the -devel and -doc packages installed. Note that the downstream ++sources at https://github.com/iguanaworks/iguanair-lirc are preferred and ++will be the only option in next release. ++ ++To build and install the driver together with the support files: ++ ++ $ make ++ $ sudo make install ++ ++Verifying the driver after make install: ++ ++ $ lirc-lsplugins -q iguanair ++ --- /usr/lib64/lirc/plugins/iguanair.so ++ ++You could also find the driver docs in the manual. The path varies, but ++in a packaged version typically /usr/share/doc/lirc/lirc.org/html/index.html. +-- +2.5.5 + diff --git a/0020-dont-update-docs.patch b/0020-dont-update-docs.patch new file mode 100644 index 0000000..76c142b --- /dev/null +++ b/0020-dont-update-docs.patch @@ -0,0 +1,10 @@ +--- a/Makefile 2017-01-25 10:15:24.889155859 +0100 ++++ b/Makefile 2017-01-25 10:15:52.311625145 +0100 +@@ -38,7 +38,4 @@ + install -pDm 644 $(MODPROBE_CONF) \ + $(DESTDIR)/etc/modprobe.d/$(MODPROBE_CONF) +-ifneq ($(wildcard $(PLUGINDOCS_MK)),) +- $(MAKE) update +-endif + + clean: diff --git a/iguanaIR.spec b/iguanaIR.spec index c9a927b..127b4c8 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,6 +1,10 @@ +%global commit6 e23b9d3726b010c9e747786ffe72e38debc8cfef +%global shortcommit %(c=%{commit6}; echo ${c:0:7}) +%global repo https://github.com/iguanaworks/iguanair-lirc/archive + Name: iguanaIR Version: 1.1.0 -Release: 17%{?dist} +Release: 19%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -13,49 +17,43 @@ Source2: iguanaIR-rescan Source3: README.fedora Source4: patch-soname Source5: iguanaIR.logrotate +Source6: %{repo}/%{commit6}/iguanair-lirc-%{shortcommit}.tar.gz # https://iguanaworks.net/projects/IguanaIR/ticket/317 Patch1: changeset_2710.patch Patch2: rpath.patch Patch3: cmake-args.patch +# https://github.com/iguanaworks/iguanair-lirc/pull/1 (Patch10..Patch13) +Source10: 0010-Change-iguanaIR.-iguanair.-to-match-other-plugins.patch +Source11: 0011-Rename-link-README-files-to-match-modified-install-r.patch +Source12: 0012-Makefile-Add-DESTDIR-support.patch +Source13: 0013-Convert-all-files-to-LF-line-endings-like-main-drive.patch + +Source20: 0020-dont-update-docs.patch + Requires: udev BuildRequires: cmake BuildRequires: libusb1-devel, libusb-devel BuildRequires: popt-devel BuildRequires: systemd-units - # For patch-soname (xxd, util-linux) -Buildrequires: /usr/bin/xxd -BuildRequires: util-linux Requires(post): systemd-units, systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units -# resolve cyclic dep iguanaIR <-> lirc. Once removed -# in lirc, we can do the required so-bump. -%ifarch x86_64 -Provides: libiguanaIR.so.0()(64bit) -Provides: libiguanaIR.so.0(IGUANAIR_0)(64bit) -%else -Provides: libiguanaIR.so.0 -Provides: libiguanaIR.so.0(IGUANAIR_0) -%endif - - # some features can be disabled during the rpm build %{?_without_clock_gettime: %define _disable_clock_gettime --disable-clock_gettime} -# Don't add provides for python .so files -%define __provides_exclude_from %{python_sitearch}/.*\.so$ +# Filter away versioned plugin deps (they only depend on ABI): +%global __provides_exclude_from ^%{_libdir}/lirc/plugins/.*$ -# Filter away patched soname form requires -%global __requires_exclude libiguanaIR.so.0.3 %description This package provides igdaemon and igclient, the programs necessary to control the Iguanaworks USB IR transceiver. + %package devel Summary: Library and header files for iguanaIR Group: Development/Libraries @@ -65,15 +63,6 @@ Requires: %{name} = %{epoch}:%{version}-%{release} The development files needed to interact with the iguanaIR igdaemon are included in this package. -%package python -Group: System Environment/Daemons -Summary: Python module for Iguanaworks USB IR transceiver -Requires: %{name} = %{epoch}:%{version}-%{release}, python >= 2.4 -BuildRequires: python-devel swig - -%description python -This package provides the swig-generated Python module for interfacing -with the Iguanaworks USB IR transceiver. %package reflasher Group: System Environment/Daemons @@ -86,13 +75,32 @@ versions for the Iguanaworks USB IR transceiver. If you have no idea what this means, you don't need it. +%if 0%{fedora} > 23 +%package -n lirc-drv-iguanair +Group: System Environment/Daemons +Summary: lirc plugin for iguanair user-space driver +Requires: lirc >= 0.9.4 +BuildRequires: lirc-devel >= 0.9.4 + +%description -n lirc-drv-iguanair +lirc plugin providing full support for the iguanaIR userspace driver, +the same as was built in into the lirc releases up to 0.9.3. +%endif + + %prep %setup -q -n %{name}-%{version} +%setup -q -T -D -a 6 %patch1 -p3 %patch2 -p1 %patch3 -p1 cp %{SOURCE3} README.fedora -cp %{SOURCE4} . +cd iguanair-lirc-%{commit6} +patch -p1 < %{SOURCE10} +patch -p1 < %{SOURCE11} +patch -p1 < %{SOURCE12} +patch -p1 < %{SOURCE20} +git apply --whitespace=fix %{SOURCE13} %build @@ -102,19 +110,24 @@ make CFLAGS="%{optflags} -fpic -DFEDORA=1" %{?_smp_mflags} cp %{SOURCE4} . - %install +%if 0%{fedora} > 23 +cd iguanair-lirc-%{commit6} +make DESTDIR=$RPM_BUILD_ROOT install +cd .. +%endif + cd build -make install PREFIX=$RPM_BUILD_ROOT/usr DESTDIR=$RPM_BUILD_ROOT INLIBDIR=$RPM_BUILD_ROOT%{_libdir} +make install PREFIX=$RPM_BUILD_ROOT/usr DESTDIR=$RPM_BUILD_ROOT \ + INLIBDIR=$RPM_BUILD_ROOT%{_libdir} +rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}/site-packages install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name} -# For now, patch bad soname introduced when they switched to cmake... -bash -c "./patch-soname $RPM_BUILD_ROOT%{_libdir}/libiguanaIR.so.0.3 \ - libiguanaIR.so.0.3 IGUANAIR_0" - # fix missing links pushd $RPM_BUILD_ROOT%{_libdir} +rm libiguanaIR.so.0.3 +mv libiguanaIR.so.0 libiguanaIR.so.0.3 ln -sf libiguanaIR.so.0.3 libiguanaIR.so.0 # Use /etc/sysconfig instead of /etc/default @@ -123,8 +136,7 @@ mv $RPM_BUILD_ROOT/etc/default/iguanaIR \ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig # Fix up some stray file permissions issues -chmod -x $RPM_BUILD_ROOT%{python_sitearch}/*.py \ - $RPM_BUILD_ROOT%{_includedir}/%{name}.h \ + chmod a-x $RPM_BUILD_ROOT%{_includedir}/%{name}.h \ $RPM_BUILD_ROOT%{_datadir}/%{name}-reflasher/hex/* # Remove the installed initfile and install the systemd support instead. @@ -135,8 +147,8 @@ install -m755 -D %{SOURCE2} $RPM_BUILD_ROOT%{_libexecdir}/iguanaIR/rescan # Install private log dir, tmpfiles.d setup. install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/log/iguanaIR -install -m755 -d $RPM_BUILD_ROOT/etc/tmpfiles.d -cat > $RPM_BUILD_ROOT/etc/tmpfiles.d/%{name}.conf < $RPM_BUILD_ROOT/%{_tmpfilesdir}/%{name}.conf < 23 +%files -n lirc-drv-iguanair +%config /etc/modprobe.d/60-blacklist-kernel-iguanair.conf +%{_libdir}/lirc/plugins/iguanair.so +%{_docdir}/lirc/plugindocs/iguanair.html +%{_datadir}/lirc/configs/iguanair.conf +%endif + + %changelog +* Wed Jan 25 2017 Alec Leamas - 2:1.1.0-19 +- -18 was a COPR release only. +- Drop the python package which does not compile cleanly any more. +- Add lirc plugin generation. +- Fix %%license usage for license files - #1413263. +- Use %%tmpfilesdir as required - #1413263. +- Remove horrible hacks from -10 to break circular dep lirc <=> iguanaIR. +- Filter away plugin deps - they only depend on ABI. +- Fix so-file links - #1409065 + * Tue Jul 19 2016 Fedora Release Engineering - 2:1.1.0-17 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages From 82ebf58b4dcd61d2206c8d8444127732f16ed69e Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 25 Jan 2017 11:03:48 +0100 Subject: [PATCH 23/63] Add missing plugin source. --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5970392..6fd9f52 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ clog /iguanaIR-1.0.5.tar.bz2 /iguanaIR-1.1.0-5.fc22.src.rpm bak +/iguanair-lirc-e23b9d3.tar.gz diff --git a/sources b/sources index 39942e8..abfd198 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -798eda1de8873c8da41fb50ffe221140 iguanaIR-1.1.0.tar.bz2 +SHA512 (iguanair-lirc-e23b9d3.tar.gz) = ad116c16ea9f18259e2b915f1e1589d08e4ddc787459bc8595876ec0cc2ea36265a2dcb6b7792e3d1e9faab8e8ad680fdf9f0f59fac6d87148464aeb0aba86fb From 5abea51dd5153c6ed3663674db536923047f8bcd Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 25 Jan 2017 11:14:09 +0100 Subject: [PATCH 24/63] More missing sources. --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index abfd198..523f894 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iguanair-lirc-e23b9d3.tar.gz) = ad116c16ea9f18259e2b915f1e1589d08e4ddc787459bc8595876ec0cc2ea36265a2dcb6b7792e3d1e9faab8e8ad680fdf9f0f59fac6d87148464aeb0aba86fb +SHA512 (iguanaIR-1.1.0.tar.bz2) = 19d793598043c203192c7de0066794629ef64cefe901beca4e894e2090a3d0a91d813de1ae5440a8d51c1f94ad4a960278dbe625302564dcc39c38a668cf18f2 From 281f0108739eaefe85d395d353e024c21d29388a Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 25 Jan 2017 15:43:38 +0100 Subject: [PATCH 25/63] Release 1.1.0-19 --- 0020-build-Fix-DESTDIR-dont-update-docs.patch | 60 +++++++++++++++++++ 0020-dont-update-docs.patch | 10 ---- iguanaIR.spec | 19 ++++-- 3 files changed, 75 insertions(+), 14 deletions(-) create mode 100644 0020-build-Fix-DESTDIR-dont-update-docs.patch delete mode 100644 0020-dont-update-docs.patch diff --git a/0020-build-Fix-DESTDIR-dont-update-docs.patch b/0020-build-Fix-DESTDIR-dont-update-docs.patch new file mode 100644 index 0000000..c31d14c --- /dev/null +++ b/0020-build-Fix-DESTDIR-dont-update-docs.patch @@ -0,0 +1,60 @@ +From 89f10c5f0c4374fb8ac51f1878b8b79329123c5b Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Wed, 25 Jan 2017 16:35:50 +0100 +Subject: [PATCH] fix + +--- + .../Makefile | 22 +++++----------------- + 1 file changed, 5 insertions(+), 17 deletions(-) + +diff --git a/iguanair-lirc-e23b9d3726b010c9e747786ffe72e38debc8cfef/Makefile b/iguanair-lirc-e23b9d3726b010c9e747786ffe72e38debc8cfef/Makefile +index dd093eb..be86c43 100755 +--- a/iguanair-lirc-e23b9d3726b010c9e747786ffe72e38debc8cfef/Makefile ++++ b/iguanair-lirc-e23b9d3726b010c9e747786ffe72e38debc8cfef/Makefile +@@ -3,9 +3,6 @@ + # Requires that lirc is installed in system locations, in + # particular that the /usr/lib[64]/pkgconfig/lirc-driver.pc + # is in place (/usr/local/lib/pkgconfig/... is also OK). +-# The required file plugindocs.mk might live in a -doc +-# package which then is needed. +-# + + + driver = iguanair +@@ -18,13 +15,7 @@ PLUGINDIR ?= $(shell pkg-config --variable=plugindir lirc-driver) + CONFIGDIR ?= $(shell pkg-config --variable=configdir lirc-driver) + PLUGINDOCS ?= $(shell pkg-config --variable=plugindocs lirc-driver) + +-PLUGINDOCS_MK = $(PLUGINDOCS)/plugindocs.mk +-MODPROBE_CONF = 60-blacklist-kernel-iguanair.conf +- +-ifneq ($(wildcard $(PLUGINDOCS_MK)),) +- include $(PLUGINDOCS_MK) +-endif +- ++MODPROBE_CONF = 60-blacklist-kernel-iguanair.conf + + $(driver).o: $(driver).c + +@@ -32,14 +23,11 @@ $(driver).so: $(driver).o + gcc --shared -fpic $(LDFLAGS) -o $@ $< + + install: $(driver).so +- install -pDm 755 $< $(DESTDIR)$(PLUGINDIR)/$< +- install -pDm 644 $(driver).html $(DESTDIR)$(PLUGINDOCS)/$(driver).html +- install -pDm 644 $(driver).conf $(DESTDIR)$(CONFIGDIR)/$(driver).conf +- install -pDm 644 $(MODPROBE_CONF) \ ++ install -D $< $(DESTDIR)$(PLUGINDIR)/$< ++ install -D $(driver).conf $(DESTDIR)$(CONFIGDIR)/$(driver).conf ++ install -D $(driver).html $(DESTDIR)$(PLUGINDOCS)/$(driver).html ++ install -Dm 644 $(MODPROBE_CONF) \ + $(DESTDIR)/etc/modprobe.d/$(MODPROBE_CONF) +-ifneq ($(wildcard $(PLUGINDOCS_MK)),) +- $(MAKE) update +-endif + + clean: + rm -f *.o *.so +-- +2.9.3 + diff --git a/0020-dont-update-docs.patch b/0020-dont-update-docs.patch deleted file mode 100644 index 76c142b..0000000 --- a/0020-dont-update-docs.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Makefile 2017-01-25 10:15:24.889155859 +0100 -+++ b/Makefile 2017-01-25 10:15:52.311625145 +0100 -@@ -38,7 +38,4 @@ - install -pDm 644 $(MODPROBE_CONF) \ - $(DESTDIR)/etc/modprobe.d/$(MODPROBE_CONF) --ifneq ($(wildcard $(PLUGINDOCS_MK)),) -- $(MAKE) update --endif - - clean: diff --git a/iguanaIR.spec b/iguanaIR.spec index 127b4c8..ec2da22 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -29,11 +29,13 @@ Source11: 0011-Rename-link-README-files-to-match-modified-install-r.patch Source12: 0012-Makefile-Add-DESTDIR-support.patch Source13: 0013-Convert-all-files-to-LF-line-endings-like-main-drive.patch -Source20: 0020-dont-update-docs.patch +Source20: 0020-build-Fix-DESTDIR-dont-update-docs.patch Requires: udev BuildRequires: cmake +BuildRequires: dos2unix +BuildRequires: git BuildRequires: libusb1-devel, libusb-devel BuildRequires: popt-devel BuildRequires: systemd-units @@ -99,24 +101,33 @@ cd iguanair-lirc-%{commit6} patch -p1 < %{SOURCE10} patch -p1 < %{SOURCE11} patch -p1 < %{SOURCE12} -patch -p1 < %{SOURCE20} git apply --whitespace=fix %{SOURCE13} +dos2unix Makefile +patch -l -p2 --fuzz 2 < %{SOURCE20} %build ./runCmake -DLIBDIR="%{_libdir}" cd build -make CFLAGS="%{optflags} -fpic -DFEDORA=1" %{?_smp_mflags} +make CFLAGS="%{optflags} -fpic -DFEDORA=1 -DHAVE_KERNEL_LIRC_H=1 -I.." %{?_smp_mflags} cp %{SOURCE4} . %install %if 0%{fedora} > 23 cd iguanair-lirc-%{commit6} -make DESTDIR=$RPM_BUILD_ROOT install +PLUGINDOCS=$(pkg-config --variable=plugindocs lirc-driver) +make CFLAGS="%{optflags} \ + -fpic -I.. -DHAVE_KERNEL_LIRC_H=1 -DPLUGINDOCS=\\\"$PLUGINDOCS\\\"" \ + DESTDIR=$RPM_BUILD_ROOT install cd .. %endif +mkdir -p $RPM_BUILD_ROOT/%{_datadir} || : +cp -ar files/python/usr/share/iguanaIR-reflasher $RPM_BUILD_ROOT/%{_datadir} +mkdir -p $RPM_BUILD_ROOT/%{_bindir} || : +cp -ar files/python/usr/bin/* $RPM_BUILD_ROOT/%{_bindir} + cd build make install PREFIX=$RPM_BUILD_ROOT/usr DESTDIR=$RPM_BUILD_ROOT \ INLIBDIR=$RPM_BUILD_ROOT%{_libdir} From cc23db1e0793fc099a273fd4fcf0701493e63450 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 25 Jan 2017 17:51:13 +0100 Subject: [PATCH 26/63] Add missing source --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 523f894..abfd198 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iguanaIR-1.1.0.tar.bz2) = 19d793598043c203192c7de0066794629ef64cefe901beca4e894e2090a3d0a91d813de1ae5440a8d51c1f94ad4a960278dbe625302564dcc39c38a668cf18f2 +SHA512 (iguanair-lirc-e23b9d3.tar.gz) = ad116c16ea9f18259e2b915f1e1589d08e4ddc787459bc8595876ec0cc2ea36265a2dcb6b7792e3d1e9faab8e8ad680fdf9f0f59fac6d87148464aeb0aba86fb From 50f9b62edef97eb92aa5ab8bef32162d9f24c489 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 25 Jan 2017 17:59:06 +0100 Subject: [PATCH 27/63] Re-add failing source, re-packed as .gz. --- .gitignore | 1 + iguanaIR.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6fd9f52..fc71eb1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ clog /iguanaIR-1.1.0-5.fc22.src.rpm bak /iguanair-lirc-e23b9d3.tar.gz +/iguanaIR-1.1.0.tar.gz diff --git a/iguanaIR.spec b/iguanaIR.spec index ec2da22..c932145 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -11,7 +11,7 @@ Summary: Driver for Iguanaworks USB IR transceiver Group: System Environment/Daemons License: GPLv2 and LGPLv2 URL: http://iguanaworks.net/ir -Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2 +Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.gz Source1: iguanaIR.service Source2: iguanaIR-rescan Source3: README.fedora diff --git a/sources b/sources index abfd198..c26af9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iguanair-lirc-e23b9d3.tar.gz) = ad116c16ea9f18259e2b915f1e1589d08e4ddc787459bc8595876ec0cc2ea36265a2dcb6b7792e3d1e9faab8e8ad680fdf9f0f59fac6d87148464aeb0aba86fb +SHA512 (iguanaIR-1.1.0.tar.gz) = 64f54ce117fc94e356433812ebc9a2fbc94f4f85d6688e628be49eb1ae66c9e99fc425da23ec09b919123dc7c9e0df8cc303ebe6aaae589881a0418ab3fa40ef From a10607fe433eb8fcab2e208157a7a5d39e610dd0 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Wed, 25 Jan 2017 18:07:32 +0100 Subject: [PATCH 28/63] Fix possibly bad sources file. --- sources | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources b/sources index c26af9c..79ef954 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ SHA512 (iguanaIR-1.1.0.tar.gz) = 64f54ce117fc94e356433812ebc9a2fbc94f4f85d6688e628be49eb1ae66c9e99fc425da23ec09b919123dc7c9e0df8cc303ebe6aaae589881a0418ab3fa40ef +SHA512 (iguanaIR-1.1.0.tar.bz2) = 19d793598043c203192c7de0066794629ef64cefe901beca4e894e2090a3d0a91d813de1ae5440a8d51c1f94ad4a960278dbe625302564dcc39c38a668cf18f2 +SHA512 (iguanair-lirc-e23b9d3.tar.gz) = ad116c16ea9f18259e2b915f1e1589d08e4ddc787459bc8595876ec0cc2ea36265a2dcb6b7792e3d1e9faab8e8ad680fdf9f0f59fac6d87148464aeb0aba86fb From 26c0476b9820482b875b0e034dd6edba1f04e116 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Fri, 27 Jan 2017 16:49:20 +0100 Subject: [PATCH 29/63] 1.1.0-2: Fix lirc-drv-iguanair linkage. --- iguanaIR.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index c932145..5a3fc0b 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -4,7 +4,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 19%{?dist} +Release: 20%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -117,7 +117,7 @@ cp %{SOURCE4} . %if 0%{fedora} > 23 cd iguanair-lirc-%{commit6} PLUGINDOCS=$(pkg-config --variable=plugindocs lirc-driver) -make CFLAGS="%{optflags} \ +make LDFLAGS="-liguanaIR -L../software/usb_ir/build" CFLAGS="%{optflags} \ -fpic -I.. -DHAVE_KERNEL_LIRC_H=1 -DPLUGINDOCS=\\\"$PLUGINDOCS\\\"" \ DESTDIR=$RPM_BUILD_ROOT install cd .. @@ -233,6 +233,9 @@ fi %changelog +* Fri Jan 27 2017 Alec Leamas - 2:1.1.0-20 +- Fix bad linkage for dynamic lirc-drv-iguanair module. + * Wed Jan 25 2017 Alec Leamas - 2:1.1.0-19 - -18 was a COPR release only. - Drop the python package which does not compile cleanly any more. From ab7a0e55e067ac599acc376baa40f90c837ee1ca Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Fri, 27 Jan 2017 17:02:24 +0100 Subject: [PATCH 30/63] 1.1.0-2: bugfix. --- iguanaIR.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 5a3fc0b..9235936 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -117,7 +117,7 @@ cp %{SOURCE4} . %if 0%{fedora} > 23 cd iguanair-lirc-%{commit6} PLUGINDOCS=$(pkg-config --variable=plugindocs lirc-driver) -make LDFLAGS="-liguanaIR -L../software/usb_ir/build" CFLAGS="%{optflags} \ +make LDFLAGS="-liguanaIR -L../build" CFLAGS="%{optflags} \ -fpic -I.. -DHAVE_KERNEL_LIRC_H=1 -DPLUGINDOCS=\\\"$PLUGINDOCS\\\"" \ DESTDIR=$RPM_BUILD_ROOT install cd .. From a08c25013a47f183ff8a2ef68c12f7f02e2f372f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 16:20:19 +0000 Subject: [PATCH 31/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 9235936..3454bf8 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -4,7 +4,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 20%{?dist} +Release: 21%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -233,6 +233,9 @@ fi %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 2:1.1.0-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Jan 27 2017 Alec Leamas - 2:1.1.0-20 - Fix bad linkage for dynamic lirc-drv-iguanair module. From 51cc74b60a315fb2c005160531b2920c7c341d49 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 13:27:40 +0000 Subject: [PATCH 32/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 3454bf8..6ebfae3 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -4,7 +4,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 21%{?dist} +Release: 22%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -233,6 +233,9 @@ fi %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 2:1.1.0-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 2:1.1.0-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From ad85f4bfd7efb65a5a8531d7a9aca8a727c9dd9d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 23:43:20 +0000 Subject: [PATCH 33/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 6ebfae3..d1c03ed 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -4,7 +4,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 22%{?dist} +Release: 23%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -233,6 +233,9 @@ fi %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 2:1.1.0-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 2:1.1.0-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 30cdb8e345a054344815031f533875da5926face Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Mon, 29 Jan 2018 13:30:48 -0600 Subject: [PATCH 34/63] Update to current packaging guidelines for systemd. --- iguanaIR.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index d1c03ed..ff117ff 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -38,11 +38,10 @@ BuildRequires: dos2unix BuildRequires: git BuildRequires: libusb1-devel, libusb-devel BuildRequires: popt-devel -BuildRequires: systemd-units +BuildRequires: systemd -Requires(post): systemd-units, systemd-sysv -Requires(preun): systemd-units -Requires(postun): systemd-units +%{?systemd_requires} +Requires(post): systemd-sysv # some features can be disabled during the rpm build %{?_without_clock_gettime: %define _disable_clock_gettime --disable-clock_gettime} From ce40c91989f270c628eeff0659f312a8c949402e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 17:20:31 +0000 Subject: [PATCH 35/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index ff117ff..8a25940 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -4,7 +4,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 23%{?dist} +Release: 24%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -232,6 +232,9 @@ fi %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 2:1.1.0-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Wed Aug 02 2017 Fedora Release Engineering - 2:1.1.0-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 2819c8baf18f3c8039c3de8c726558d4bbfd84fd Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Mon, 19 Feb 2018 09:18:39 -0600 Subject: [PATCH 36/63] Update build requirements for gcc/gcc-c++ per https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires --- iguanaIR.spec | 2 +- sources | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 8a25940..8df3d5d 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -33,7 +33,7 @@ Source20: 0020-build-Fix-DESTDIR-dont-update-docs.patch Requires: udev -BuildRequires: cmake +BuildRequires: cmake gcc BuildRequires: dos2unix BuildRequires: git BuildRequires: libusb1-devel, libusb-devel diff --git a/sources b/sources index 79ef954..21f6ca7 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ SHA512 (iguanaIR-1.1.0.tar.gz) = 64f54ce117fc94e356433812ebc9a2fbc94f4f85d6688e628be49eb1ae66c9e99fc425da23ec09b919123dc7c9e0df8cc303ebe6aaae589881a0418ab3fa40ef -SHA512 (iguanaIR-1.1.0.tar.bz2) = 19d793598043c203192c7de0066794629ef64cefe901beca4e894e2090a3d0a91d813de1ae5440a8d51c1f94ad4a960278dbe625302564dcc39c38a668cf18f2 SHA512 (iguanair-lirc-e23b9d3.tar.gz) = ad116c16ea9f18259e2b915f1e1589d08e4ddc787459bc8595876ec0cc2ea36265a2dcb6b7792e3d1e9faab8e8ad680fdf9f0f59fac6d87148464aeb0aba86fb From bb744fb0d82f13983ee5a2d8b0ac27e1730d61a4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 05:38:14 +0000 Subject: [PATCH 37/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 8df3d5d..d13c89d 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -4,7 +4,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 24%{?dist} +Release: 25%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -232,6 +232,9 @@ fi %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 2:1.1.0-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Feb 07 2018 Fedora Release Engineering - 2:1.1.0-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From b61c330e9cc56966d670fa5727ea7e2bc2919009 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:48 +0100 Subject: [PATCH 38/63] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- iguanaIR.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index d13c89d..e17491e 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -8,7 +8,6 @@ Release: 25%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver -Group: System Environment/Daemons License: GPLv2 and LGPLv2 URL: http://iguanaworks.net/ir Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.gz @@ -57,7 +56,6 @@ control the Iguanaworks USB IR transceiver. %package devel Summary: Library and header files for iguanaIR -Group: Development/Libraries Requires: %{name} = %{epoch}:%{version}-%{release} %description devel @@ -66,7 +64,6 @@ included in this package. %package reflasher -Group: System Environment/Daemons Summary: Reflasher for Iguanaworks USB IR transceiver BuildArch: noarch @@ -78,7 +75,6 @@ what this means, you don't need it. %if 0%{fedora} > 23 %package -n lirc-drv-iguanair -Group: System Environment/Daemons Summary: lirc plugin for iguanair user-space driver Requires: lirc >= 0.9.4 BuildRequires: lirc-devel >= 0.9.4 From f1e9e3b68c3a4c759a24cdaa6dfd6399e3136b8f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 03:15:01 +0000 Subject: [PATCH 39/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index e17491e..2bc587e 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -4,7 +4,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 25%{?dist} +Release: 26%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -228,6 +228,9 @@ fi %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 2:1.1.0-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Fedora Release Engineering - 2:1.1.0-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 29e3fb635b92c81440d158ccb0a359777784c7cc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 09:24:32 +0000 Subject: [PATCH 40/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 2bc587e..cc078f6 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -4,7 +4,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 26%{?dist} +Release: 27%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -228,6 +228,9 @@ fi %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 2:1.1.0-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Fri Feb 01 2019 Fedora Release Engineering - 2:1.1.0-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From fabe805ab620426670997481951ba288ad74be6f Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 22 Aug 2019 19:54:11 +0200 Subject: [PATCH 41/63] 2:1.1.0-28 --- ...atform-specific-python-extension-dir.patch | 25 ----- ...e-systemd-support-not-sysV-init-file.patch | 13 --- 0010-build-Remove-cmake-dist-generation.patch | 39 +++++++ 0011-lirc-drv-Fix-missing-linker-flag.patch | 25 +++++ ...-correct-permissions-when-installing.patch | 51 +++++++++ 0016-reflasher-Move-to-python3.patch | 106 ++++++++++++++++++ iguanaIR.spec | 43 +++---- 7 files changed, 245 insertions(+), 57 deletions(-) delete mode 100644 0003-Use-platform-specific-python-extension-dir.patch delete mode 100644 0006-udev-invoke-systemd-support-not-sysV-init-file.patch create mode 100644 0010-build-Remove-cmake-dist-generation.patch create mode 100644 0011-lirc-drv-Fix-missing-linker-flag.patch create mode 100644 0012-build-cmake-Use-correct-permissions-when-installing.patch create mode 100644 0016-reflasher-Move-to-python3.patch diff --git a/0003-Use-platform-specific-python-extension-dir.patch b/0003-Use-platform-specific-python-extension-dir.patch deleted file mode 100644 index 2dc94c8..0000000 --- a/0003-Use-platform-specific-python-extension-dir.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2877272703e7b9f59cd5c690c70555b101c69815 Mon Sep 17 00:00:00 2001 -From: Alec Leamas -Date: Tue, 25 Dec 2012 11:54:55 +0100 -Subject: [PATCH 3/7] Use platform specific python extension dir - ---- - configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure b/configure -index f901211..1a51327 100755 ---- a/configure -+++ b/configure -@@ -5167,7 +5167,7 @@ $as_echo "$PYTHON_LDFLAGS" >&6; } - $as_echo_n "checking for Python site-packages path... " >&6; } - if test -z "$PYTHON_SITE_PKG"; then - PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ -- print distutils.sysconfig.get_python_lib(0,0);"` -+ print distutils.sysconfig.get_python_lib(1,0);"` - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 - $as_echo "$PYTHON_SITE_PKG" >&6; } --- -1.7.11.7 - diff --git a/0006-udev-invoke-systemd-support-not-sysV-init-file.patch b/0006-udev-invoke-systemd-support-not-sysV-init-file.patch deleted file mode 100644 index bf08829..0000000 --- a/0006-udev-invoke-systemd-support-not-sysV-init-file.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/udev/iguanaIR.rules b/udev/iguanaIR.rules -index b3bc34f..21bc00d 100644 ---- a/udev/iguanaIR.rules -+++ b/udev/iguanaIR.rules -@@ -12,7 +12,7 @@ ATTR{manufacturer} == "IguanaWorks", ATTR{product} == "USB IR Transceiver", \ - OWNER = "iguanair", MODE = "0664", \ - RUN = "/bin/mkdir -p /var/run/iguanaIR", \ - RUN += "/bin/chown iguanair /var/run/iguanaIR", \ -- RUN += "/etc/init.d/iguanaIR rescan" -+ RUN += "/usr/libexec/iguanaIR/rescan" - - # FOR DEBUGGING TRY ADDING TO THE RUN LINES: - #RUN += "/bin/bash -c 'echo $major $minor r=$result i=$id n=$number k=$kernel p=$parent r=$root >> /tmp/udev.txt'" diff --git a/0010-build-Remove-cmake-dist-generation.patch b/0010-build-Remove-cmake-dist-generation.patch new file mode 100644 index 0000000..0384a9a --- /dev/null +++ b/0010-build-Remove-cmake-dist-generation.patch @@ -0,0 +1,39 @@ +From ac541ea506a82ab699bff42829f697e46755eb12 Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Mon, 30 Jan 2017 10:56:33 +0100 +Subject: [PATCH 10/14] build: Remove cmake dist generation. + +The cmake code is worse in at least two ways: It includes whatever +junk it finds in the source directory, and it isn't aware of the +lirc-driver-iguanair in the parent directory. The make-dist.sh +script just is better, so drop the cmake code. +--- + software/usb_ir/CMakeLists.txt | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/software/usb_ir/CMakeLists.txt b/software/usb_ir/CMakeLists.txt +index e056483..8a55372 100644 +--- a/software/usb_ir/CMakeLists.txt ++++ b/software/usb_ir/CMakeLists.txt +@@ -15,18 +15,6 @@ Set(SO_AGE 3) + + Set(SOVERSION 0) + +-# Source dist setup +-set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${FULLVER}") +-set(CPACK_SOURCE_IGNORE_FILES +- "/build/;/.git/;~$;${CPACK_SOURCE_IGNORE_FILES}") +-set(CPACK_SOURCE_GENERATOR TGZ) +-include(CPack) +- +-add_custom_target(check_git ${CMAKE_COMMAND} +- -P ${CMAKE_SOURCE_DIR}/check_git_status.cmake) +-add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source +- DEPENDS check_git) +- + #Set(TARGET_ANDROID true) + + If(TARGET_ANDROID) +-- +2.9.3 + diff --git a/0011-lirc-drv-Fix-missing-linker-flag.patch b/0011-lirc-drv-Fix-missing-linker-flag.patch new file mode 100644 index 0000000..d4127e5 --- /dev/null +++ b/0011-lirc-drv-Fix-missing-linker-flag.patch @@ -0,0 +1,25 @@ +From db05b2629b6b5a5972a51e2d2fbbf04e45e56cc8 Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Fri, 3 Feb 2017 00:01:08 +0100 +Subject: [PATCH 11/14] lirc-drv: Fix missing linker flag. + +--- + software/lirc-drv-iguanair/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/software/lirc-drv-iguanair/Makefile b/software/lirc-drv-iguanair/Makefile +index 3bae4e9..6aff458 100755 +--- a/software/lirc-drv-iguanair/Makefile ++++ b/software/lirc-drv-iguanair/Makefile +@@ -17,7 +17,7 @@ driver = iguanair + + all: $(driver).so + +-LDFLAGS += -liguanaIR -L../usb_ir/build ++LDFLAGS += -lusb -liguanaIR -L../usb_ir/build + CFLAGS += -I../usb_ir + MODPROBE_CONF = 60-blacklist-kernel-iguanair.conf + +-- +2.9.3 + diff --git a/0012-build-cmake-Use-correct-permissions-when-installing.patch b/0012-build-cmake-Use-correct-permissions-when-installing.patch new file mode 100644 index 0000000..1f5a353 --- /dev/null +++ b/0012-build-cmake-Use-correct-permissions-when-installing.patch @@ -0,0 +1,51 @@ +From 4264b5d65c012fdbe4e2b676ef1987ab4a0778dd Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Sat, 4 Feb 2017 10:56:21 +0100 +Subject: [PATCH 12/14] build: cmake: Use correct permissions when installing. + +--- + software/usb_ir/CMakeLists.txt | 2 ++ + software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan | 12 ++++++------ + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/software/usb_ir/CMakeLists.txt b/software/usb_ir/CMakeLists.txt +index 8a55372..665ae82 100644 +--- a/software/usb_ir/CMakeLists.txt ++++ b/software/usb_ir/CMakeLists.txt +@@ -245,9 +245,11 @@ install(FILES iguanaIR.h + DESTINATION /usr/include) + if (${SYSTEMD_FOUND} EQUAL 1) + install(DIRECTORY files/systemd/usr ++ USE_SOURCE_PERMISSIONS + DESTINATION /) + else() + install(DIRECTORY files/sysV/usr files/sysV/etc ++ USE_SOURCE_PERMISSIONS + DESTINATION /) + endif() + +diff --git a/software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan b/software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan +index a41a59d..9d0a700 100755 +--- a/software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan ++++ b/software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan +@@ -4,11 +4,11 @@ + # signal fails, restart daemon. + + if systemctl --quiet is-active iguanaIR.service; then +- pid=$( systemctl --property=MainPID show iguanaIR.service ) || \ +- pid='' +- pid=${pid##*=} +- [ -n "$pid" ] && kill -HUP $pid &>/dev/null && exit 0 ++ pid=$( systemctl --property=MainPID show iguanaIR.service ) || \ ++ pid='' ++ pid=${pid##*=} ++ [ -n "$pid" ] && kill -HUP $pid &>/dev/null && exit 0 + fi + systemctl show --property=UnitFileState iguanaIR.service | +- grep -q enabled && \ +- systemctl restart iguanaIR.service ++ grep -q enabled && \ ++ systemctl restart iguanaIR.service +-- +2.9.3 + diff --git a/0016-reflasher-Move-to-python3.patch b/0016-reflasher-Move-to-python3.patch new file mode 100644 index 0000000..516c9bd --- /dev/null +++ b/0016-reflasher-Move-to-python3.patch @@ -0,0 +1,106 @@ +From ad3c951d613fd8926f2afc4ce219dee592418fad Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Thu, 22 Aug 2019 18:42:11 +0200 +Subject: [PATCH] reflasher: Move to python3. + +--- + files/python/usr/bin/iguanaIR-reflasher | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/files/python/usr/share/iguanaIR-reflasher/iguanaIR-reflasher b/files/python/usr/bin/iguanaIR-reflasher/iguanaIR-reflasher +index 97cacc2..abfbc50 100755 +--- a/files/python/usr/share/iguanaIR-reflasher/iguanaIR-reflasher ++++ b/files/python/usr/share/iguanaIR-reflasher/iguanaIR-reflasher +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2.7 -tt ++#!/usr/bin/python3 + # + # ************************************************************************** + # ** upgrade-usb *********************************************************** +@@ -215,7 +215,7 @@ def listDevices(path = iguanaIR.IGSOCK_NAME): + if device != 'ctl' and \ + not stat.S_ISLNK(os.lstat(os.path.join(path, device)).st_mode): + devices.append(device) +- except Exception, inst: ++ except Exception as inst: + devices = ['0'] + if MessageCannotlistdevice == False: + message(LOG_WARN,"""Guessing device "0", failed to list devices:\n %s\n""" % inst) +@@ -466,7 +466,7 @@ def writePagesToDevice(pages): + count += 1 + if count == rebootPage: + sys.stdout.write('\n Rebooting device') +- print deviceTransaction(iguanaIR.IG_DEV_RESET) ++ print(deviceTransaction(iguanaIR.IG_DEV_RESET)) + if deviceVersion() != version: + message(LOG_WARN, "Mid-write reboot unsuccessful.\n") + +@@ -506,7 +506,7 @@ def writeHexFile(filename, blank_pages = False, setFeatures = False): + pages = readPages(open(filename, 'r')) + + if blank_pages: +- blanks = range(128) ++ blanks = list(range(128)) + for page in pages: + blanks.remove(page['start'] / 64) + +@@ -538,7 +538,7 @@ def writeHexFile(filename, blank_pages = False, setFeatures = False): + def checkFileExists(path): + try: + os.stat(path) +- except OSError, inst: ++ except OSError as inst: + if inst[0] != errno.ENOENT: + raise + return False +-- +2.20.1 + +diff --git a/files/python/usr/bin/iguanaIR-reflasher b/files/python/usr/bin/iguanaIR-reflasher +index 97cacc2..abfbc50 100755 +--- a/files/python/usr/bin/iguanaIR-reflasher ++++ b/files/python/usr/bin/iguanaIR-reflasher +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2.7 -tt ++#!/usr/bin/python3 + # + # ************************************************************************** + # ** upgrade-usb *********************************************************** +@@ -215,7 +215,7 @@ def listDevices(path = iguanaIR.IGSOCK_NAME): + if device != 'ctl' and \ + not stat.S_ISLNK(os.lstat(os.path.join(path, device)).st_mode): + devices.append(device) +- except Exception, inst: ++ except Exception as inst: + devices = ['0'] + if MessageCannotlistdevice == False: + message(LOG_WARN,"""Guessing device "0", failed to list devices:\n %s\n""" % inst) +@@ -466,7 +466,7 @@ def writePagesToDevice(pages): + count += 1 + if count == rebootPage: + sys.stdout.write('\n Rebooting device') +- print deviceTransaction(iguanaIR.IG_DEV_RESET) ++ print(deviceTransaction(iguanaIR.IG_DEV_RESET)) + if deviceVersion() != version: + message(LOG_WARN, "Mid-write reboot unsuccessful.\n") + +@@ -506,7 +506,7 @@ def writeHexFile(filename, blank_pages = False, setFeatures = False): + pages = readPages(open(filename, 'r')) + + if blank_pages: +- blanks = range(128) ++ blanks = list(range(128)) + for page in pages: + blanks.remove(page['start'] / 64) + +@@ -538,7 +538,7 @@ def writeHexFile(filename, blank_pages = False, setFeatures = False): + def checkFileExists(path): + try: + os.stat(path) +- except OSError, inst: ++ except OSError as inst: + if inst[0] != errno.ENOENT: + raise + return False +-- +2.20.1 diff --git a/iguanaIR.spec b/iguanaIR.spec index cc078f6..d0d2b64 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -1,16 +1,17 @@ %global commit6 e23b9d3726b010c9e747786ffe72e38debc8cfef %global shortcommit %(c=%{commit6}; echo ${c:0:7}) %global repo https://github.com/iguanaworks/iguanair-lirc/archive +%global __python %{__python3} Name: iguanaIR Version: 1.1.0 -Release: 27%{?dist} +Release: 28%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver License: GPLv2 and LGPLv2 URL: http://iguanaworks.net/ir -Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.gz +Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2 Source1: iguanaIR.service Source2: iguanaIR-rescan Source3: README.fedora @@ -29,6 +30,7 @@ Source12: 0012-Makefile-Add-DESTDIR-support.patch Source13: 0013-Convert-all-files-to-LF-line-endings-like-main-drive.patch Source20: 0020-build-Fix-DESTDIR-dont-update-docs.patch +Source21: 0016-reflasher-Move-to-python3.patch Requires: udev @@ -99,6 +101,9 @@ patch -p1 < %{SOURCE12} git apply --whitespace=fix %{SOURCE13} dos2unix Makefile patch -l -p2 --fuzz 2 < %{SOURCE20} +cd .. +patch -p1 --fuzz 2 < %{SOURCE21} + %build @@ -118,6 +123,7 @@ make LDFLAGS="-liguanaIR -L../build" CFLAGS="%{optflags} \ cd .. %endif + mkdir -p $RPM_BUILD_ROOT/%{_datadir} || : cp -ar files/python/usr/share/iguanaIR-reflasher $RPM_BUILD_ROOT/%{_datadir} mkdir -p $RPM_BUILD_ROOT/%{_bindir} || : @@ -130,6 +136,10 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}/site-packages install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name} +%if 0%{fedora} > 30 +rm -rf $RPM_BUILD_ROOT/%{_libdir}/python2.7/site-packages +%endif + # fix missing links pushd $RPM_BUILD_ROOT%{_libdir} rm libiguanaIR.so.0.3 @@ -161,7 +171,6 @@ install -m 755 -d $RPM_BUILD_ROOT/run/%{name} install -m 644 -D %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} - %pre getent group iguanair >/dev/null || groupadd -r iguanair getent passwd iguanair >/dev/null || \ @@ -170,26 +179,13 @@ getent passwd iguanair >/dev/null || \ exit 0 %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi -/sbin/ldconfig +%systemd_post %{name}.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || : - /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : -fi +%systemd_preun %{name}.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : -fi -/sbin/ldconfig +%systemd_postun_with_restart %{name}.service %files @@ -210,6 +206,10 @@ fi %ghost %attr(755, iguanair, iguanair) /run/%{name} %attr(775, iguanair, iguanair) %{_localstatedir}/log/%{name} +%if 0%{fedora} < 30 +%{_libdir}/python2.7/* +%endif + %files devel %{_includedir}/%{name}.h %{_libdir}/lib%{name}.so @@ -228,6 +228,11 @@ fi %changelog +* Thu Aug 22 2019 Alec Leamas - 2:1.1.0-28 +- Move to python3 (Closes: #1737981). +- Drop the SWIG-generated python bindings. +- Update ancient systemd scriptlets. + * Thu Jul 25 2019 Fedora Release Engineering - 2:1.1.0-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 9e7e4c4294b81b224416543f903aa6b46c68006a Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 22 Aug 2019 20:07:57 +0200 Subject: [PATCH 42/63] 2:1.1.0-28: Add updated sources. --- sources | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sources b/sources index 21f6ca7..523f894 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (iguanaIR-1.1.0.tar.gz) = 64f54ce117fc94e356433812ebc9a2fbc94f4f85d6688e628be49eb1ae66c9e99fc425da23ec09b919123dc7c9e0df8cc303ebe6aaae589881a0418ab3fa40ef -SHA512 (iguanair-lirc-e23b9d3.tar.gz) = ad116c16ea9f18259e2b915f1e1589d08e4ddc787459bc8595876ec0cc2ea36265a2dcb6b7792e3d1e9faab8e8ad680fdf9f0f59fac6d87148464aeb0aba86fb +SHA512 (iguanaIR-1.1.0.tar.bz2) = 19d793598043c203192c7de0066794629ef64cefe901beca4e894e2090a3d0a91d813de1ae5440a8d51c1f94ad4a960278dbe625302564dcc39c38a668cf18f2 From 777102e450a01143b78ddefc5e69ec1acb3063da Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 22 Aug 2019 20:14:00 +0200 Subject: [PATCH 43/63] 2:1.1.0-28: More missing sources. --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 523f894..abfd198 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iguanaIR-1.1.0.tar.bz2) = 19d793598043c203192c7de0066794629ef64cefe901beca4e894e2090a3d0a91d813de1ae5440a8d51c1f94ad4a960278dbe625302564dcc39c38a668cf18f2 +SHA512 (iguanair-lirc-e23b9d3.tar.gz) = ad116c16ea9f18259e2b915f1e1589d08e4ddc787459bc8595876ec0cc2ea36265a2dcb6b7792e3d1e9faab8e8ad680fdf9f0f59fac6d87148464aeb0aba86fb From 68737d2c21258efcc4896c620e010e1b30ff6d8f Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Thu, 22 Aug 2019 20:18:13 +0200 Subject: [PATCH 44/63] 2:1.1.0-28: Again: missing sources. --- sources | 1 + 1 file changed, 1 insertion(+) diff --git a/sources b/sources index abfd198..30c49ff 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ +SHA512 (iguanaIR-1.1.0.tar.bz2) = 19d793598043c203192c7de0066794629ef64cefe901beca4e894e2090a3d0a91d813de1ae5440a8d51c1f94ad4a960278dbe625302564dcc39c38a668cf18f2 SHA512 (iguanair-lirc-e23b9d3.tar.gz) = ad116c16ea9f18259e2b915f1e1589d08e4ddc787459bc8595876ec0cc2ea36265a2dcb6b7792e3d1e9faab8e8ad680fdf9f0f59fac6d87148464aeb0aba86fb From 6e19728d4c47f4b0e3e944993d0c5f29c736dee1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 05:20:03 +0000 Subject: [PATCH 45/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index d0d2b64..985592d 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 28%{?dist} +Release: 29%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -228,6 +228,9 @@ exit 0 %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 2:1.1.0-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Aug 22 2019 Alec Leamas - 2:1.1.0-28 - Move to python3 (Closes: #1737981). - Drop the SWIG-generated python bindings. From 267ea60e5894d7e5bccaaecc6947b994f38a6c73 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 01:42:22 +0000 Subject: [PATCH 46/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 985592d..c7d827f 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 29%{?dist} +Release: 30%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -228,6 +228,9 @@ exit 0 %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 2:1.1.0-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jan 29 2020 Fedora Release Engineering - 2:1.1.0-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 1690fe5582da6777439747f95033b77f846c61e9 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 19 Dec 2020 00:46:08 +0000 Subject: [PATCH 47/63] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- iguanaIR.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/iguanaIR.spec b/iguanaIR.spec index c7d827f..a80a998 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -80,6 +80,7 @@ what this means, you don't need it. Summary: lirc plugin for iguanair user-space driver Requires: lirc >= 0.9.4 BuildRequires: lirc-devel >= 0.9.4 +BuildRequires: make %description -n lirc-drv-iguanair lirc plugin providing full support for the iguanaIR userspace driver, From fd723a7de699dc838d8bb2949d8bd4e4ee491a53 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 14:15:42 +0000 Subject: [PATCH 48/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index a80a998..efdee95 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 30%{?dist} +Release: 31%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -229,6 +229,9 @@ exit 0 %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 2:1.1.0-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 2:1.1.0-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 78edd1d424c4766a0d23a28a2f957282c1627e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:13:38 +0100 Subject: [PATCH 49/63] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- iguanaIR.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index efdee95..d64fb05 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 31%{?dist} +Release: 32%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -229,6 +229,10 @@ exit 0 %changelog +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2:1.1.0-32 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Tue Jan 26 2021 Fedora Release Engineering - 2:1.1.0-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 16cc3fdb075cd9c8d3afc36d69e31834b6a2cbc9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 08:28:38 +0000 Subject: [PATCH 50/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index d64fb05..4486fea 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 32%{?dist} +Release: 33%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -229,6 +229,9 @@ exit 0 %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 2:1.1.0-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2:1.1.0-32 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. From fbb5c22a8b0b9fa1894291020414c1a26fc555e7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 13:12:19 +0000 Subject: [PATCH 51/63] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 4486fea..d901728 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 33%{?dist} +Release: 34%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -229,6 +229,9 @@ exit 0 %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 2:1.1.0-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jul 22 2021 Fedora Release Engineering - 2:1.1.0-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 2912c5eaf5c66edea2116779ae38ef6fc8303801 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 14:33:50 +0000 Subject: [PATCH 52/63] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index d901728..910222d 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 34%{?dist} +Release: 35%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -229,6 +229,9 @@ exit 0 %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 2:1.1.0-35 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Jan 20 2022 Fedora Release Engineering - 2:1.1.0-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 20cc2ba899c2e96444775ffe7c0676d0007da228 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Mon, 25 Jul 2022 21:51:50 -0500 Subject: [PATCH 53/63] Add conditional for libusb-devel as it is retired as of f37. --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 910222d..a8107d7 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -37,7 +37,10 @@ Requires: udev BuildRequires: cmake gcc BuildRequires: dos2unix BuildRequires: git -BuildRequires: libusb1-devel, libusb-devel +BuildRequires: libusb1-devel +%if 0%{?fedora} < 37 +libusb-devel +%endif BuildRequires: popt-devel BuildRequires: systemd From df93d3e47b9a844a59f51fead3d71ca1f2fac3d4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 13:03:18 +0000 Subject: [PATCH 54/63] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index a8107d7..2c5dfcf 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 35%{?dist} +Release: 36%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -232,6 +232,9 @@ exit 0 %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 2:1.1.0-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 2:1.1.0-35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 75cea5824451b69cf23ec413388b51419c14852e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 07:18:28 +0000 Subject: [PATCH 55/63] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 2c5dfcf..b6d509d 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 36%{?dist} +Release: 37%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -232,6 +232,9 @@ exit 0 %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 2:1.1.0-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jan 19 2023 Fedora Release Engineering - 2:1.1.0-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 12ed67895361c72f1098009633695ff719f4d1cc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 22:59:25 +0000 Subject: [PATCH 56/63] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index b6d509d..e6e1d8c 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 37%{?dist} +Release: 38%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -232,6 +232,9 @@ exit 0 %changelog +* Sat Jan 20 2024 Fedora Release Engineering - 2:1.1.0-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jul 20 2023 Fedora Release Engineering - 2:1.1.0-37 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 9445d7f940218a2c0631e9ce49f1c1da80469d73 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 22:37:39 +0000 Subject: [PATCH 57/63] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index e6e1d8c..ebdbff5 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 38%{?dist} +Release: 39%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -232,6 +232,9 @@ exit 0 %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 2:1.1.0-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jan 20 2024 Fedora Release Engineering - 2:1.1.0-38 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From b1d6f9ca285237b9f6cd870b406074c6919ebb8e Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:47 +0200 Subject: [PATCH 58/63] Eliminate use of obsolete %patchN syntax (#2283636) --- iguanaIR.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index ebdbff5..df1ad86 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -94,9 +94,9 @@ the same as was built in into the lirc releases up to 0.9.3. %prep %setup -q -n %{name}-%{version} %setup -q -T -D -a 6 -%patch1 -p3 -%patch2 -p1 -%patch3 -p1 +%patch -P1 -p3 +%patch -P2 -p1 +%patch -P3 -p1 cp %{SOURCE3} README.fedora cd iguanair-lirc-%{commit6} patch -p1 < %{SOURCE10} From 418bfab76520b6de32cb08c78350a1b5fecdad92 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 10:15:39 +0000 Subject: [PATCH 59/63] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index df1ad86..5b68eb7 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 39%{?dist} +Release: 40%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -232,6 +232,9 @@ exit 0 %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 2:1.1.0-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jan 24 2024 Fedora Release Engineering - 2:1.1.0-39 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From f8d5981bb12607aa6f3fd21a46f6bf588f791c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 2 Sep 2024 08:52:11 +0200 Subject: [PATCH 60/63] convert license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- iguanaIR.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 5b68eb7..0e0d8f9 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,11 +5,12 @@ Name: iguanaIR Version: 1.1.0 -Release: 40%{?dist} +Release: 41%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver -License: GPLv2 and LGPLv2 +# Automatically converted from old format: GPLv2 and LGPLv2 - review is highly recommended. +License: GPL-2.0-only AND LicenseRef-Callaway-LGPLv2 URL: http://iguanaworks.net/ir Source0: http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2 Source1: iguanaIR.service @@ -232,6 +233,9 @@ exit 0 %changelog +* Mon Sep 02 2024 Miroslav Suchý - 2:1.1.0-41 +- convert license to SPDX + * Thu Jul 18 2024 Fedora Release Engineering - 2:1.1.0-40 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 8525e49f0d9586b629ddccf0e4458f2135f0724e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 07:01:55 +0000 Subject: [PATCH 61/63] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index 0e0d8f9..f6ea3a2 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 41%{?dist} +Release: 42%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -233,6 +233,9 @@ exit 0 %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 2:1.1.0-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Sep 02 2024 Miroslav Suchý - 2:1.1.0-41 - convert license to SPDX From 42c0cc778a6d3433eb6277002fe57b5982a4a07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 11 Feb 2025 15:35:20 +0100 Subject: [PATCH 62/63] Add sysusers.d config file to allow rpm to create users/groups automatically See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers. --- iguanaIR.spec | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index f6ea3a2..d34e067 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 42%{?dist} +Release: 43%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -109,6 +109,11 @@ patch -l -p2 --fuzz 2 < %{SOURCE20} cd .. patch -p1 --fuzz 2 < %{SOURCE21} +# Create a sysusers.d config file +cat >iguanair.sysusers.conf </dev/null || groupadd -r iguanair -getent passwd iguanair >/dev/null || \ - useradd -r -g iguanair -d %{_localstatedir}/run/%{name} -s /sbin/nologin \ - -c "Iguanaworks IR Daemon" iguanair -exit 0 %post %systemd_post %{name}.service @@ -214,6 +215,7 @@ exit 0 %if 0%{fedora} < 30 %{_libdir}/python2.7/* %endif +%{_sysusersdir}/iguanair.conf %files devel %{_includedir}/%{name}.h @@ -233,6 +235,9 @@ exit 0 %changelog +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 2:1.1.0-43 +- Add sysusers.d config file to allow rpm to create users/groups automatically + * Fri Jan 17 2025 Fedora Release Engineering - 2:1.1.0-42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From fde01fd9fb28748aaf0e1456b263964b96d1565b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 17:35:56 +0000 Subject: [PATCH 63/63] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- iguanaIR.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguanaIR.spec b/iguanaIR.spec index d34e067..b57c995 100644 --- a/iguanaIR.spec +++ b/iguanaIR.spec @@ -5,7 +5,7 @@ Name: iguanaIR Version: 1.1.0 -Release: 43%{?dist} +Release: 44%{?dist} Epoch: 2 Summary: Driver for Iguanaworks USB IR transceiver @@ -235,6 +235,9 @@ install -m0644 -D iguanair.sysusers.conf %{buildroot}%{_sysusersdir}/iguanair.co %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 2:1.1.0-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 2:1.1.0-43 - Add sysusers.d config file to allow rpm to create users/groups automatically