From bb0ad10aceb81718fe0e2a6aff5967a947f9ba06 Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Thu, 3 May 2012 00:59:45 +0100 Subject: Initial packaging --- debian/changelog | 5 ++ debian/compat | 1 + debian/control | 52 +++++++++++++++++ debian/copyright | 41 ++++++++++++++ debian/docs | 2 + debian/libphidget21-0.dirs | 1 + debian/libphidget21-0.install | 2 + debian/libphidget21-dev.dirs | 2 + debian/libphidget21-dev.install | 3 + debian/libphidget21-java.install | 1 + debian/patches/add-pkgconfig-support.patch | 45 +++++++++++++++ debian/patches/fix-recieved-typos.patch | 90 ++++++++++++++++++++++++++++++ debian/patches/series | 2 + debian/rules | 15 +++++ debian/source/format | 1 + debian/watch | 3 + 16 files changed, 266 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/libphidget21-0.dirs create mode 100644 debian/libphidget21-0.install create mode 100644 debian/libphidget21-dev.dirs create mode 100644 debian/libphidget21-dev.install create mode 100644 debian/libphidget21-java.install create mode 100644 debian/patches/add-pkgconfig-support.patch create mode 100644 debian/patches/fix-recieved-typos.patch create mode 100644 debian/patches/series create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..25744d8 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +libphidget21 (2.1.8.20120216-1) UNRELEASED; urgency=low + + * Initial release (Closes: #670984) + + -- Jonathan McCrohan Thu, 03 May 2012 01:45:01 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d76ce89 --- /dev/null +++ b/debian/control @@ -0,0 +1,52 @@ +Source: libphidget21 +Priority: optional +Maintainer: Jonathan McCrohan +Build-Depends: debhelper (>= 8), autotools-dev, dh-autoreconf, libusb-dev, default-jdk +Standards-Version: 3.9.3 +Section: libs +Homepage: http://www.phidgets.com + +Package: libphidget21-0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Phidgets runtime library + Runtime library for the libphidgets API. + . + Phidgets are a set of "plug and play" building blocks for low cost USB + sensing and control from your PC. All the USB complexity is taken care + of by the robust libphidget API. + +Package: libphidget21-dev +Section: libdevel +Architecture: any +Depends: libphidget21-0 (= ${binary:Version}), libusb-dev, ${misc:Depends} +Description: Phidgets development files + This package contains Development libraries and header files for the + libphidget API. + . + Phidgets are a set of "plug and play" building blocks for low cost USB + sensing and control from your PC. All the USB complexity is taken care + of by the robust libphidget API. + +Package: libphidget21-dbg +Section: debug +Priority: extra +Architecture: any +Depends: libphidget21-0 (= ${binary:Version}), ${misc:Depends} +Description: Phidgets debug symbols + This package contains debugging symbols for the libphidget API. + . + Phidgets are a set of "plug and play" building blocks for low cost USB + sensing and control from your PC. All the USB complexity is taken care + of by the robust libphidget API. + +Package: libphidget21-java +Section: java +Architecture: all +Depends: libphidget21-dev, ${misc:Depends} +Description: Phidgets Java library + This package contains java bindings for the libphidget API. + . + Phidgets are a set of "plug and play" building blocks for low cost USB + sensing and control from your PC. All the USB complexity is taken care + of by the robust libphidget API. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..a9a813f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,41 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: libphidget21 +Source: http://www.phidgets.com/ + +Files: * +Copyright: 2007-2012 Phidgets Inc. +License: LGPL-3 + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + . + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU Lesser General Public + License can be found in the file `/usr/share/common-licenses/LGPL-3'. + +Files: debian/* +Copyright: 2012 Jonathan McCrohan +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..50bd824 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +NEWS +README diff --git a/debian/libphidget21-0.dirs b/debian/libphidget21-0.dirs new file mode 100644 index 0000000..6845771 --- /dev/null +++ b/debian/libphidget21-0.dirs @@ -0,0 +1 @@ +usr/lib diff --git a/debian/libphidget21-0.install b/debian/libphidget21-0.install new file mode 100644 index 0000000..916be9c --- /dev/null +++ b/debian/libphidget21-0.install @@ -0,0 +1,2 @@ +usr/lib/lib*.so.* +udev/99-phidgets.rules lib/udev/rules.d diff --git a/debian/libphidget21-dev.dirs b/debian/libphidget21-dev.dirs new file mode 100644 index 0000000..4418816 --- /dev/null +++ b/debian/libphidget21-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include diff --git a/debian/libphidget21-dev.install b/debian/libphidget21-dev.install new file mode 100644 index 0000000..5774e64 --- /dev/null +++ b/debian/libphidget21-dev.install @@ -0,0 +1,3 @@ +usr/include/* +usr/lib/lib*.so +usr/lib/pkgconfig/* diff --git a/debian/libphidget21-java.install b/debian/libphidget21-java.install new file mode 100644 index 0000000..20602f7 --- /dev/null +++ b/debian/libphidget21-java.install @@ -0,0 +1 @@ +/usr/share/java/*.jar diff --git a/debian/patches/add-pkgconfig-support.patch b/debian/patches/add-pkgconfig-support.patch new file mode 100644 index 0000000..bc68540 --- /dev/null +++ b/debian/patches/add-pkgconfig-support.patch @@ -0,0 +1,45 @@ +Description: Add pkgconfig support +Author: Jonathan McCrohan +Date: Thu, 26 Apr 2012 00:26:23 +0100 +--- +--- /dev/null ++++ libphidget-2.1.8.20120216/libphidget21.pc.in +@@ -0,0 +1,10 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: libphidget21 ++Description: Phidgets library ++Version: @VERSION@ ++Libs: -L${libdir} -lphidgets21 ++Cflags: -I${includedir} +--- libphidget-2.1.8.20120216.orig/configure.ac ++++ libphidget-2.1.8.20120216/configure.ac +@@ -91,4 +91,4 @@ AM_CONDITIONAL([INTERNAL_UNICONV], [test + + AC_CONFIG_FILES([Makefile + examples/Makefile]) +-AC_OUTPUT ++AC_OUTPUT([libphidget21.pc]) +--- libphidget-2.1.8.20120216.orig/Makefile.am ++++ libphidget-2.1.8.20120216/Makefile.am +@@ -2,6 +2,9 @@ + + AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/utils -I$(top_srcdir)/dict -I$(top_srcdir)/linux -I$(top_srcdir)/include -D_LINUX + ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = libphidget21.pc ++ + lib_LTLIBRARIES = libphidget21.la + + # Rules for unpdating the libtool version: +@@ -119,6 +122,7 @@ EXTRA_DIST = examples/ifkit.c \ + hotplug/phidgets.usermap \ + hotplug/phidgets \ + version.sh \ ++ libphidget21.pc.in \ + Java/com/phidgets/DictionaryKeyListener.java \ + Java/com/phidgets/TextLCDPhidget.java \ + Java/com/phidgets/SpatialEventData.java \ diff --git a/debian/patches/fix-recieved-typos.patch b/debian/patches/fix-recieved-typos.patch new file mode 100644 index 0000000..17aba79 --- /dev/null +++ b/debian/patches/fix-recieved-typos.patch @@ -0,0 +1,90 @@ +Description: Fix 'recieved' typos +Author: Jonathan McCrohan +Date: Thu, 26 Apr 2012 00:28:52 +0100 +--- +--- libphidget-2.1.8.20120216.orig/cphidgetstepper.c ++++ libphidget-2.1.8.20120216/cphidgetstepper.c +@@ -238,7 +238,7 @@ CPHIDGETDATA(Stepper) + phid->motorPositionEcho[i] = position[i]; + + if(speed[i] > phid->motorSpeedMax || speed[i] < -phid->motorSpeedMax) +- LOG(PHIDGET_LOG_WARNING, "Phidget stepper recieved out of range speed data: %lE", speed[i]); ++ LOG(PHIDGET_LOG_WARNING, "Phidget stepper received out of range speed data: %lE", speed[i]); + else + phid->motorSpeedEcho[i] = speed[i]; + +--- libphidget-2.1.8.20120216.orig/cphidgetadvancedservo.c ++++ libphidget-2.1.8.20120216/cphidgetadvancedservo.c +@@ -310,7 +310,7 @@ CPHIDGETDATA(AdvancedServo) + else + phid->motorPositionEcho[i] = position[i]; + if(velocity[i] > phid->velocityMaxLimit || velocity[i] < -phid->velocityMaxLimit) +- LOG(PHIDGET_LOG_WARNING, "Phidget advanced servo recieved out of range velocity data: %lE", velocity[i]); ++ LOG(PHIDGET_LOG_WARNING, "Phidget advanced servo received out of range velocity data: %lE", velocity[i]); + else + phid->motorVelocityEcho[i] = velocity[i]; + +--- libphidget-2.1.8.20120216.orig/csocketopen.c ++++ libphidget-2.1.8.20120216/csocketopen.c +@@ -1269,7 +1269,7 @@ start: + { + //if we've been waiting too long, then signal disconnect + double waitTime = timeSince(&server->lastHeartbeatTime); +- //if we haven't recieved any heartbeats, set the timeout high (4*4 = 16 seconds) ++ //if we haven't received any heartbeats, set the timeout high (4*4 = 16 seconds) + //This is so that really slow connections will get through the auth stage + double avgPingTime = ((server->avgHeartbeatTimeCount > 0) ? (server->avgHeartbeatTime / server->avgHeartbeatTimeCount) : 4.0); + +--- libphidget-2.1.8.20120216.orig/cphidgetgps.c ++++ libphidget-2.1.8.20120216/cphidgetgps.c +@@ -76,7 +76,7 @@ CPHIDGETINIT(GPS) + CUSBSendPacket((CPhidgetHandle)phid, buffer);*/ + + //read some initial data - rate is 10Hz so we shouldn't have to wait long +- //This ensures we have recieved at least one GGA and one RMC ++ //This ensures we have received at least one GGA and one RMC + readtries = 30; //250ms + while((phid->fix==PUNK_BOOL || phid->haveTime==PUNK_BOOL || phid->haveDate==PUNK_BOOL) && readtries) + { +--- libphidget-2.1.8.20120216.orig/Java/com/phidgets/IRPhidget.java ++++ libphidget-2.1.8.20120216/Java/com/phidgets/IRPhidget.java +@@ -124,7 +124,7 @@ public final class IRPhidget extends Phi + return readRaw (buffer, 0, buffer.length); + } + /** +- * Returns the last recieved code. This is updated right after the code event returns. ++ * Returns the last received code. This is updated right after the code event returns. + * @return last code + * @throws PhidgetException If this Phidget is not opened and attached. + * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. +@@ -207,7 +207,7 @@ public final class IRPhidget extends Phi + } + private native void enableLearnEvents (boolean b); + /** +- * Adds a rawData listener. The rawData handler is a method that will be called when a raw IR data is recieved. ++ * Adds a rawData listener. The rawData handler is a method that will be called when a raw IR data is received. + *

+ * There is no limit on the number of rawData handlers that can be registered for a particular Phidget. + * +--- libphidget-2.1.8.20120216.orig/Java/com/phidgets/Manager.java ++++ libphidget-2.1.8.20120216/Java/com/phidgets/Manager.java +@@ -195,7 +195,7 @@ public class Manager + + /** + * Shuts down the Phidget Manager. This method should be called to close down the Phidget Manager. +- * Events will no longer be recieved. This method gets calledd automatically when the class is ++ * Events will no longer be received. This method gets calledd automatically when the class is + * destroyed so calling it is not required. + */ + public final void close() throws PhidgetException { +--- libphidget-2.1.8.20120216.orig/utils/utils.c ++++ libphidget-2.1.8.20120216/utils/utils.c +@@ -911,7 +911,7 @@ tryagain: + return 0; + } else + { +- pu_log(PUL_VERB,0,"Recieved: \"%s\"", (char *)buf); ++ pu_log(PUL_VERB,0,"Received: \"%s\"", (char *)buf); + return res; + } + } diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..ba9de47 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +add-pkgconfig-support.patch +fix-recieved-typos.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..14d2fe9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +override_dh_auto_build: + make + make phidget21.jar + +override_dh_strip: + dh_strip -p libphidget21-0 --dbg-package=libphidget21-dbg + +%: + dh $@ --with autoreconf --with autotools-dev diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..817a88c --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://www.phidgets.com/drivers.php .*libphidget_(.*)\.tar\.gz -- cgit v1.2.3