[packages/iguanaIR] - updated to 1.2.0 (actually some post-1.2.0 snapshot) - updated opt,pld patches - removed obsolete

qboosh qboosh at pld-linux.org
Sat Dec 23 12:14:50 CET 2017


commit 0c70bdbaf0df7b23cc3a0ce969ac80757fbae6eb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 23 12:16:12 2017 +0100

    - updated to 1.2.0 (actually some post-1.2.0 snapshot)
    - updated opt,pld patches
    - removed obsolete soname patch
    - added lirc patch; for lirc 0.9.4+ lirc driver will be built here

 iguanaIR-lirc.patch   |  11 +++++
 iguanaIR-opt.patch    |  19 ++++----
 iguanaIR-pld.patch    |  20 ++++++++-
 iguanaIR-soname.patch |  10 -----
 iguanaIR.spec         | 122 +++++++++++++++++++++++++++++++++++++++++---------
 5 files changed, 140 insertions(+), 42 deletions(-)
---
diff --git a/iguanaIR.spec b/iguanaIR.spec
index 3cddea6..c419d89 100644
--- a/iguanaIR.spec
+++ b/iguanaIR.spec
@@ -1,24 +1,39 @@
-# TODO: PLDize init script further
+# TODO: PLDize SysV init script further
+#
+# Conditional build:
+%bcond_without	lirc	# LIRC driver
+
 Summary:	Driver for Iguanaworks USB IR transceiver
 Summary(pl.UTF-8):	Sterownik do nadajnika-odbiornika podczerwieni na USB firmy Iguanaworks
 Name:		iguanaIR
-Version:	1.1.0
-Release:	2
+Version:	1.2.0
+%define	snap	20171020
+%define	gitref	9336f121b4127f4ac494e5b26b82ce9c6b86a0ac
+%define	rel	1
+Release:	1.%{snap}.%{rel}
 License:	GPL v2
 Group:		Applications/Communications
-#Source0Download: http://www.iguanaworks.net/files/
-Source0:	http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2
-# Source0-md5:	798eda1de8873c8da41fb50ffe221140
+# formerly (up to 1.1.0): http://www.iguanaworks.net/files/
+# now https://github.com/iguanaworks/iguanair/releases /usb_ir- (but 1.2.0 is not tagged)
+Source0:	https://github.com/iguanaworks/iguanair/archive/%{gitref}/iguanair-%{snap}.tar.gz
+# Source0-md5:	a20ba738cbdf654526190d2b86e70992
 Patch0:		%{name}-opt.patch
-Patch1:		%{name}-soname.patch
-Patch2:		%{name}-pld.patch
+Patch1:		%{name}-pld.patch
+Patch2:		%{name}-lirc.patch
 URL:		http://iguanaworks.net/
 BuildRequires:	cmake >= 2.6
 BuildRequires:	libusb-devel >= 1.0
+%{?with_lirc:BuildRequires:	lirc-devel >= 0.9.4}
+BuildRequires:	pkgconfig
 BuildRequires:	popt-devel
-BuildRequires:	python-devel
-BuildRequires:	python-modules
+BuildRequires:	python-devel >= 2
+BuildRequires:	python-modules >= 2
+BuildRequires:	python3-devel >= 1:3.2
+BuildRequires:	python3-modules >= 1:3.2
 BuildRequires:	rpm-pythonprov
+BuildRequires:	swig-python
+BuildRequires:	udev-devel
+BuildRequires:	systemd-devel >= 1:209
 BuildRequires:	swig-python >= 1.3.31
 Requires:	%{name}-libs = %{version}-%{release}
 Obsoletes:	udev-iguanaIR
@@ -58,20 +73,45 @@ Header files for iguanaIR library.
 Pliki nagłówkowe biblioteki iguanaIR.
 
 %package -n python-%{name}
-Summary:	Python binding for iguanaIR library
-Summary(pl.UTF-8):	Interfejs Pythona do biblioteki iguanaIR
+Summary:	Python 2 binding for iguanaIR library
+Summary(pl.UTF-8):	Interfejs Pythona 2 do biblioteki iguanaIR
 License:	GPL v2
 Group:		Libraries/Python
 Requires:	%{name}-libs = %{version}-%{release}
 
 %description -n python-%{name}
-Python binding for iguanaIR library.
+Python 2 binding for iguanaIR library.
 
 %description -n python-%{name} -l pl.UTF-8
-Interfejs Pythona do biblioteki iguanaIR.
+Interfejs Pythona 2 do biblioteki iguanaIR.
+
+%package -n python3-%{name}
+Summary:	Python 3 binding for iguanaIR library
+Summary(pl.UTF-8):	Interfejs Pythona 3 do biblioteki iguanaIR
+License:	GPL v2
+Group:		Libraries/Python
+Requires:	%{name}-libs = %{version}-%{release}
+
+%description -n python3-%{name}
+Python 3 binding for iguanaIR library.
+
+%description -n python3-%{name} -l pl.UTF-8
+Interfejs Pythona 3 do biblioteki iguanaIR.
+
+%package -n lirc-plugin-iguanaIR
+Summary:	iguanaIR driver for LIRC
+Summary(pl.UTF-8):	Sterownik iguanaIR dla LIRC-a
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description -n lirc-plugin-iguanaIR
+iguanaIR driver for LIRC.
+
+%description -n lirc-plugin-iguanaIR -l pl.UTF-8
+Sterownik iguanaIR dla LIRC-a.
 
 %prep
-%setup -q
+%setup -q -n iguanair-%{gitref}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -79,10 +119,19 @@ Interfejs Pythona do biblioteki iguanaIR.
 %build
 install -d build
 cd build
-%cmake .. \
+%cmake ../software/usb_ir \
 	-DLIBDIR:PATH=%{_libdir}
 
 %{__make}
+cd ..
+
+%if %{with lirc}
+%{__make} -C software/lirc-drv-iguanair \
+	CC="%{__cc}" \
+	CFLAGS="%{rpmcflags}" \
+	CPPFLAGS="%{rpmcppflags}" \
+	LDFLAGS="%{rpmldflags}"
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -90,6 +139,11 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with lirc}
+%{__make} -C software/lirc-drv-iguanair install \
+	DESTDIR=$RPM_BUILD_ROOT
+%endif
+
 install -d $RPM_BUILD_ROOT/etc/rc.d
 %{__mv} $RPM_BUILD_ROOT/etc/init.d $RPM_BUILD_ROOT/etc/rc.d
 %{__mv} $RPM_BUILD_ROOT/etc/default $RPM_BUILD_ROOT/etc/sysconfig
@@ -98,7 +152,10 @@ install -d $RPM_BUILD_ROOT/etc/rc.d
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
 %py_postclean
 
-%{__rm} docs/Makefile
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
+
+%{__rm} software/usb_ir/docs/Makefile
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -108,26 +165,36 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README.txt WHY docs
+%doc ChangeLog software/usb_ir/{AUTHORS,README.txt,WHY,docs}
 %attr(755,root,root) %{_bindir}/igclient
 %attr(755,root,root) %{_bindir}/igdaemon
 %attr(755,root,root) %{_bindir}/iguanaIR-reflasher
 %attr(755,root,root) %{_bindir}/iguanaIR-rescan
 %dir %{_libdir}/iguanaIR
-%attr(755,root,root) %{_libdir}/iguanaIR/libusb.so
+%attr(755,root,root) %{_libdir}/iguanaIR/libusbdrv.so
 %dir %{_datadir}/iguanaIR-reflasher
 %attr(755,root,root) %dir %{_datadir}/iguanaIR-reflasher/iguanaIR-reflasher
 %{_datadir}/iguanaIR-reflasher/hex
 /lib/udev/rules.d/80-iguanaIR.rules
 %attr(754,root,root) /etc/rc.d/init.d/iguanaIR
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/iguanaIR
+%{systemdunitdir}/iguanaIR.service
+%{systemdtmpfilesdir}/iguanair.conf
+%{_mandir}/man1/igclient.1*
+%{_mandir}/man1/iguanaIR-reflasher.1*
+%{_mandir}/man1/iguanaIR-rescan.1*
+%{_mandir}/man8/igdaemon.8*
 
 %files libs
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libiguanaIR.so.0
+%attr(755,root,root) %{_libdir}/libdirectIguanaIR.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libdirectIguanaIR.so.0
+%attr(755,root,root) %{_libdir}/libiguanaIR.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libiguanaIR.so.0
 
 %files devel
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libdirectIguanaIR.so
 %attr(755,root,root) %{_libdir}/libiguanaIR.so
 %{_includedir}/iguanaIR.h
 
@@ -135,3 +202,18 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/_iguanaIR.so
 %{py_sitedir}/iguanaIR.py[co]
+
+%files -n python3-%{name}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/_iguanaIR.so
+%{py3_sitedir}/iguanaIR.py
+%{py3_sitedir}/__pycache__/iguanaIR.cpython-*.py[co]
+
+%if %{with lirc}
+%files -n lirc-plugin-iguanaIR
+%doc software/lirc-drv-iguanair/iguanair.txt
+%attr(755,root,root) %{_libdir}/lirc/plugins/iguanair.so
+%{_datadir}/lirc/configs/iguanair.conf
+%{_datadir}/lirc/plugindocs/iguanair.html
+/etc/modprobe.d/60-blacklist-kernel-iguanair.conf
+%endif
diff --git a/iguanaIR-lirc.patch b/iguanaIR-lirc.patch
new file mode 100644
index 0000000..0682cfe
--- /dev/null
+++ b/iguanaIR-lirc.patch
@@ -0,0 +1,11 @@
+--- iguanair-9336f121b4127f4ac494e5b26b82ce9c6b86a0ac/software/lirc-drv-iguanair/Makefile.orig	2017-10-19 03:17:33.000000000 +0200
++++ iguanair-9336f121b4127f4ac494e5b26b82ce9c6b86a0ac/software/lirc-drv-iguanair/Makefile	2017-12-23 11:35:43.997517116 +0100
+@@ -42,7 +42,7 @@
+ $(driver).o: $(driver).c
+ 
+ $(driver).so: $(driver).o
+-	gcc --shared -fpic -o $@ $< $(LDFLAGS)
++	$(CC) $(LDFLAGS) $(CFLAGS) --shared -fpic -o $@ $<
+ 
+ install: $(driver).so
+ 	install -D $< $(DESTDIR)$(PLUGINDIR)/$<
diff --git a/iguanaIR-opt.patch b/iguanaIR-opt.patch
index e3f701c..3d69a2f 100644
--- a/iguanaIR-opt.patch
+++ b/iguanaIR-opt.patch
@@ -1,11 +1,10 @@
---- iguanaIR-1.1.0/CMakeLists.txt.orig	2013-07-28 19:08:08.000000000 +0200
-+++ iguanaIR-1.1.0/CMakeLists.txt	2015-10-05 16:07:49.326406232 +0200
-@@ -68,7 +68,7 @@
-       Set(DAEMONLIBS pthread dl)
-     EndIf()
+--- iguanair-9336f121b4127f4ac494e5b26b82ce9c6b86a0ac/software/usb_ir/CMakeLists.txt.orig	2017-12-22 16:26:48.778304231 +0100
++++ iguanair-9336f121b4127f4ac494e5b26b82ce9c6b86a0ac/software/usb_ir/CMakeLists.txt	2017-12-22 16:52:15.058286803 +0100
+@@ -62,7 +62,6 @@
+   Set(DAEMONSRC daemon.c)
+   List(APPEND BASESRC compat-unix.c)
+   Set(CMAKE_REQUIRED_FLAGS "-I/usr/include")
+-  add_c_flag(-pedantic -g -O2)
  
--    Set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -Wall -pedantic")
-+    Set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
- 
-     # see if we have clock_gettime in time.h
-     Set(CMAKE_REQUIRED_LIBRARIES rt)
+   # see if we have clock_gettime possibly in rt
+   check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
diff --git a/iguanaIR-pld.patch b/iguanaIR-pld.patch
index 6037738..3a31219 100644
--- a/iguanaIR-pld.patch
+++ b/iguanaIR-pld.patch
@@ -1,5 +1,5 @@
---- iguanaIR-1.1.0/files/base/etc/init.d/iguanaIR.orig	2013-07-22 19:09:46.000000000 +0200
-+++ iguanaIR-1.1.0/files/base/etc/init.d/iguanaIR	2015-10-05 19:33:06.875889209 +0200
+--- iguanair-1.2.0/software/usb_ir/files/sysV/etc/init.d/iguanaIR.orig	2013-07-22 19:09:46.000000000 +0200
++++ iguanair-1.2.0/software/usb_ir/files/sysV/etc/init.d/iguanaIR	2015-10-05 19:33:06.875889209 +0200
 @@ -22,7 +22,7 @@
  ######################
  
@@ -78,3 +78,19 @@
      fi
      RETVAL=1
  }
+--- iguanair-9336f121b4127f4ac494e5b26b82ce9c6b86a0ac/software/usb_ir/CMakeLists.txt.orig	2017-12-22 18:30:06.221553102 +0100
++++ iguanair-9336f121b4127f4ac494e5b26b82ce9c6b86a0ac/software/usb_ir/CMakeLists.txt	2017-12-22 21:47:59.598084195 +0100
+@@ -303,12 +303,11 @@
+               DESTINATION bin)
+     ElseIf("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+       message(STATUS "No initscript or iguanaIR-rescan installed in OS X.")
+-    Else()
++    EndIf()
+       install(PROGRAMS files/sysV/usr/bin/iguanaIR-rescan
+               DESTINATION bin)
+       install(DIRECTORY files/sysV/etc
+               USE_SOURCE_PERMISSIONS
+               DESTINATION ${ETC_PARENT})
+-    EndIf()
+   EndIf()
+ EndIf()
diff --git a/iguanaIR-soname.patch b/iguanaIR-soname.patch
deleted file mode 100644
index 9d4b401..0000000
--- a/iguanaIR-soname.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- iguanaIR-1.1.0/CMakeLists.txt.orig	2015-10-05 16:47:55.412971926 +0200
-+++ iguanaIR-1.1.0/CMakeLists.txt	2015-10-05 17:03:10.749600180 +0200
-@@ -97,6 +97,7 @@
- add_library(iguanaIR SHARED
-                      iguanaIR.c dataPackets.c ${PIPESRC}
-                      ${BASESRC})
-+	     set_target_properties(iguanaIR PROPERTIES SOVERSION 0)
- set_property(TARGET iguanaIR
-              APPEND PROPERTY COMPILE_DEFINITIONS IGUANAIR_EXPORTS)
- install(TARGETS iguanaIR
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/iguanaIR.git/commitdiff/0c70bdbaf0df7b23cc3a0ce969ac80757fbae6eb



More information about the pld-cvs-commit mailing list