[packages/iguanaIR] - updated to 1.1.0 - updated opt patch - added soname patch (set soname again) - added pld patch (ch

qboosh qboosh at pld-linux.org
Mon Oct 5 20:44:31 CEST 2015


commit ee041f1262b9cea504f650ec16c8cccbac64bb86
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Oct 5 20:45:35 2015 +0200

    - updated to 1.1.0
    - updated opt patch
    - added soname patch (set soname again)
    - added pld patch (change /etc/default to /etc/sysconfig, workaround distro detection)

 iguanaIR-opt.patch    | 34 ++++++----------------
 iguanaIR-pld.patch    | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++
 iguanaIR-soname.patch | 10 +++++++
 iguanaIR.spec         | 45 +++++++++++++++--------------
 4 files changed, 123 insertions(+), 46 deletions(-)
---
diff --git a/iguanaIR.spec b/iguanaIR.spec
index ebf0fe7..c92b51c 100644
--- a/iguanaIR.spec
+++ b/iguanaIR.spec
@@ -1,18 +1,20 @@
-# TODO: PLDize init script, use /etc/sysconfig instead of /etc/default
+# TODO: PLDize init script further
 Summary:	Driver for Iguanaworks USB IR transceiver
 Summary(pl.UTF-8):	Sterownik do nadajnika-odbiornika podczerwieni na USB firmy Iguanaworks
 Name:		iguanaIR
-Version:	1.0.1
-Release:	2
+Version:	1.1.0
+Release:	1
 License:	GPL v2
 Group:		Applications/Communications
+#Source0Download: http://www.iguanaworks.net/files/
 Source0:	http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2
-# Source0-md5:	cf9e6e7939ff9d76aa985fab8c6f5af7
+# Source0-md5:	798eda1de8873c8da41fb50ffe221140
 Patch0:		%{name}-opt.patch
+Patch1:		%{name}-soname.patch
+Patch2:		%{name}-pld.patch
 URL:		http://iguanaworks.net/
-BuildRequires:	autoconf >= 2.59
-BuildRequires:	automake
-BuildRequires:	libusb-compat-devel >= 0.1.0
+BuildRequires:	cmake >= 2.6
+BuildRequires:	libusb-devel >= 1.0
 BuildRequires:	popt-devel
 BuildRequires:	python-devel
 BuildRequires:	python-modules
@@ -71,25 +73,25 @@ Interfejs Pythona do biblioteki iguanaIR.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
-cd autoconf
-%{__aclocal}
-%{__autoconf} --output=../configure
-%{__autoheader}
-cd ..
-%configure \
-	PYTHON_SITE_PKG=%{py_sitedir}
+install -d build
+cd build
+%cmake ..
+
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT/etc/rc.d
-mv -f $RPM_BUILD_ROOT/etc/init.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
 
 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
@@ -109,13 +111,15 @@ rm -rf $RPM_BUILD_ROOT
 %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/*.so
-%dir %{_libdir}/iguanaIR-reflasher
-%attr(755,root,root) %{_libdir}/iguanaIR-reflasher/iguanaIR-reflasher
-%{_libdir}/iguanaIR-reflasher/hex
+%attr(755,root,root) %{_libdir}/iguanaIR/libusb.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
 
 %files libs
 %defattr(644,root,root,755)
@@ -123,7 +127,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(644,root,root,755)
-%doc protocols.txt
 %attr(755,root,root) %{_libdir}/libiguanaIR.so
 %{_includedir}/iguanaIR.h
 
diff --git a/iguanaIR-opt.patch b/iguanaIR-opt.patch
index b804f0d..e3f701c 100644
--- a/iguanaIR-opt.patch
+++ b/iguanaIR-opt.patch
@@ -1,27 +1,11 @@
---- iguanaIR-1.0pre2/autoconf/configure.ac.orig	2009-11-05 02:57:36.000000000 +0100
-+++ iguanaIR-1.0pre2/autoconf/configure.ac	2010-09-22 20:02:11.700556463 +0200
-@@ -59,14 +59,11 @@
- AC_CHECK_FUNCS([floor gettimeofday memset mkdir select socket strchr strdup strerror strrchr strspn strstr mach_absolute_time])
+--- 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()
  
- # Some default environment variable values
--CFLAGS="-Wall -pedantic"
-+CFLAGS="$CFLAGS -Wall -pedantic"
+-    Set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -Wall -pedantic")
++    Set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
  
- # use -Wextra when possible
- AX_CFLAGS_GCC_OPTION(-Wextra)
- 
--# TODO: really just want this when we NEED -fPIC
--# AX_CFLAGS_GCC_OPTION(-fPIC)
--
- # enable and disable debugging
- AC_ARG_ENABLE(debug,
-   [  --enable-debug configure with debugging features enabled ],
-@@ -77,8 +74,6 @@
- if test x$ENABLE_DEBUG_FLAGS = xyes; then
-   CPPFLAGS="$CPPFLAGS -D_DEBUG"
-   CFLAGS="$CFLAGS -g"
--else
--  CFLAGS="$CFLAGS -O2"
- fi
- 
- # Allow the user to override clock_gettime detection
+     # see if we have clock_gettime in time.h
+     Set(CMAKE_REQUIRED_LIBRARIES rt)
diff --git a/iguanaIR-pld.patch b/iguanaIR-pld.patch
new file mode 100644
index 0000000..6037738
--- /dev/null
+++ b/iguanaIR-pld.patch
@@ -0,0 +1,80 @@
+--- 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
+@@ -22,7 +22,7 @@
+ ######################
+ 
+ # load the default settings
+-[ -f /etc/default/iguanaIR ] && . /etc/default/iguanaIR
++[ -f /etc/sysconfig/iguanaIR ] && . /etc/sysconfig/iguanaIR
+ # combine some variables into a command line
+ IGUANAIR_OPTIONS="$OPTIONS --log-level=$LOGLEVEL --send-timeout=$SENDTIMEOUT --receive-timeout=$RECEIVETIMEOUT $DRIVERS"
+ SOCKDIR=/var/run/iguanaIR
+@@ -32,20 +32,7 @@
+ # First try lsb, if it exists, if not then use our
+ # /etc/issue hack.
+ 
+-LSBLOCATION=`which lsb_release`
+-
+-if [ "$DISTRO" = "" ]; then
+-
+-	if [ -x "$LSBLOCATION" ]; then
+-		DISTRO=`lsb_release -s -i | tr 'A-Z' 'a-z'`
+-	else
+-		DISTRO=`head -1 /etc/issue | sed 's/ .*//' | tr 'A-Z' 'a-z'`
+-	fi
+-fi
+-
+-if [ "$DISTRO" = "fedora" -o "$DISTRO" = "mythdora" -o "$DISTRO" = "centos" -o "$DISTRO" = "rhel" -o "$DISTRO" = "scientific" ]; then
+-    # welcome to fedora land
+-    . /etc/init.d/functions
++    . /etc/rc.d/init.d/functions
+ 
+     # fedora needs these variables
+     LOCKFILE=/var/lock/subsys/iguanaIR
+@@ -60,24 +47,7 @@
+     {
+         echo
+     }
+-elif [ "$DISTRO" = "gentoo" ]; then
+-    # hello gentoo?
+-    . /etc/init.d/functions.sh
+-    log_begin_msg()
+-    {
+-        ebegin $*
+-    }
+-    log_end_msg()
+-    {
+-        eend $*
+-    }
+-else
+-    if [ "$DISTRO" != "debian" -a "$DISTRO" != "ubuntu" ]; then
+-        echo "WARNING: failed to recognize distro, defaulting to Debian."
+-    fi
+-    # ubuntu and others
+-    . /lib/lsb/init-functions
+-fi
++
+ # common defaults
+ IGPATH=/usr/bin/igdaemon
+ LOGFILE=/var/log/iguanaIR.log
+@@ -85,7 +55,7 @@
+ 
+ # check for the executable exists
+ if [ ! -x $IGPATH ]; then
+-    echo $"Failed to find igdaemon executable."
++    echo "Failed to find igdaemon executable."
+     exit 1
+ fi
+ 
+@@ -161,9 +131,9 @@
+ usage()
+ {
+     if [ "$LOCKFILE" != "" ]; then
+-        echo $"Usage: $0 {start|stop|status|restart|condrestart|force-restart}"
++        echo "Usage: $0 {start|stop|status|restart|condrestart|force-restart}"
+     else
+-        echo $"Usage: $0 {start|stop|status|restart|force-restart}"
++        echo "Usage: $0 {start|stop|status|restart|force-restart}"
+     fi
+     RETVAL=1
+ }
diff --git a/iguanaIR-soname.patch b/iguanaIR-soname.patch
new file mode 100644
index 0000000..9d4b401
--- /dev/null
+++ b/iguanaIR-soname.patch
@@ -0,0 +1,10 @@
+--- 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/ee041f1262b9cea504f650ec16c8cccbac64bb86



More information about the pld-cvs-commit mailing list