debian/0000755000000000000000000000000012127551460007171 5ustar debian/watch0000644000000000000000000000027012127551033010215 0ustar version=3 opts="dversionmangle=s/1\.0beta1\+//" \ http://www.lomoco.org/ lomoco-(\d[\d\.]+)\.(?:zip|tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) # Emmet Hikory 2012-12-21 debian/compat0000644000000000000000000000000212127550143010364 0ustar 9 debian/copyright0000644000000000000000000000223412127550143011122 0ustar This package was debianized by Thibaut VARENE on Sat, 14 Jan 2006 00:20:51 +0100. It was downloaded from http://lomoco.linux-gamers.net/ Copyright Holder: Alexios Chouchoulas Andreas Schneider Tobias Schleuss License: 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. debian/docs0000644000000000000000000000000712127550143010036 0ustar README debian/install0000644000000000000000000000003312127550143010553 0ustar udev/udev.lomoco /lib/udev debian/control0000644000000000000000000000207112127550143010571 0ustar Source: lomoco Section: utils Priority: optional Maintainer: Debian QA Group Build-Depends: debhelper (>= 9), autotools-dev, libusb-dev, gawk, dh-autoreconf Build-Conflicts: autoconf2.13, automake1.4 Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/lomoco.git Vcs-Git: git://anonscm.debian.org/collab-maint/lomoco.git Homepage: http://www.lomoco.org/ Package: lomoco Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: udev Breaks: udev (<< 136-1) Description: Logitech Mouse Control for USB mice lomoco can configure vendor-specific options on Logitech USB mice (or dual-personality mice plugged into the USB port). A number of recent devices are supported. The program is mostly useful in setting the resolution to 800 cpi or higher on mice that boot at 400 cpi (such as the MX500, MX510, MX1000 etc.), and disabling SmartScroll or Cruise Control for those who would rather use the two extra buttons as ordinary mouse buttons. It can also retrieve battery level from wireless mice. debian/dirs0000644000000000000000000000002512127550143010047 0ustar etc/default lib/udev debian/postinst0000644000000000000000000000243712127550143011002 0ustar #! /bin/sh # postinst script for lomoco # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # install_udev() { # cleanup old alias if [ -n "$1" ] && dpkg --compare-versions "$1" lt 1.0beta1+1.0-2; then rm -f /etc/udev/rules.d/lomoco.rules fi # /etc/udev/scripts is now /lib/udev. Clean up the former if [ -n "$1" ] && dpkg --compare-versions "$1" lt 1.0beta1-2; then rm -f /etc/udev/scripts/udev.lomoco fi } case "$1" in configure) # install the udev rules file install_udev $2 ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/source/0000755000000000000000000000000012127550143010466 5ustar debian/source/format0000644000000000000000000000001412127550143011674 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012127550143010615 5ustar debian/patches/02_MX518.patch0000644000000000000000000000164012127550143012722 0ustar Author: B. Clausius Date: Tue Jul 14 20:42:00 2009 +0200 Description: Support Logitech MX518 Optical Mouse with product id c051 Bug-Ubuntu: 406007 diff --git a/src/lomoco.c b/src/lomoco.c index ac0b950..2c88ed9 100644 --- a/src/lomoco.c +++ b/src/lomoco.c @@ -42,6 +42,7 @@ mouse_t mice [] = { {0xc012, "MouseMan Dual Optical", "M-BL63B", 0, 1, 0, 0, 0}, {0xc01d, "MX510 Optical Mouse", "M-BS81A", 0, 1, 1, 1, 0}, {0xc01e, "MX518 Optical Mouse", "M-BS81A", 0, 1, 1, 0, 0}, + {0xc051, "MX518 Optical Mouse", "M-BS81A", 0, 1, 1, 0, 0}, {0xc024, "MX300 Optical Mouse", "M-BP82", 0, 1, 0, 0, 0}, {0xc01b, "MX310 Optical Mouse", "M-BP86", 0, 1, 0, 0, 0}, {0xc025, "MX500 Optical Mouse", "M-BP81A", 0, 1, 1, 1, 0}, debian/patches/series0000644000000000000000000000020012127550143012022 0ustar 00_no_uninitialized_buffers.patch 01_Support_for_COM_for_Notebooks.patch 02_MX518.patch 02_M500.patch 03_fix_udev_scripts.patch debian/patches/03_fix_udev_scripts.patch0000644000000000000000000000462112127550143015523 0ustar Description: Fix udev scripts Author: Thibaut VARENE Author: B. Clausius Bug-Debian: 356338 Bug-Debian: 359783 Bug-Ubuntu: 214226 diff --git a/udev/toudev.awk b/udev/toudev.awk index 822421d..ddba82d 100644 --- a/udev/toudev.awk +++ b/udev/toudev.awk @@ -1,16 +1,22 @@ #!/bin/awk -f BEGIN { FS = "," + print "# udev.rules file for Logitech mouse control using lomoco" + print "#" + print "" print "ACTION != \"add\", GOTO=\"lomoco_end\"" - print "SUBSYSTEM != \"usb\", GOTO=\"lomoco_end\"" - print "SYSFS{idVendor} != \"046d\", GOTO=\"lomoco_end\"" + print "SUBSYSTEM == \"usb\", ENV{DEVTYPE}==\"usb_device\", GOTO=\"lomoco_start\"" + print "SUBSYSTEM != \"usb_device\", GOTO=\"lomoco_end\"" + print "" + print "LABEL=\"lomoco_start\"" print "" } $1 ~ /0xc[a-f0-9][a-f0-9][a-f0-9]/ { print "# " substr($3, index($3, "\"")) ", " $2 - print "SYSFS{idProduct}==\"" substr($1, index($1, "x")+1) \ - "\", RUN=\"lomoco\"" + print "ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"" substr($1, index($1, "x")+1) \ + "\", RUN+=\"udev.lomoco\"" + print "" } END { @@ -18,3 +24,4 @@ END { print "LABEL=\"lomoco_end\"" } + diff --git a/udev/udev.lomoco b/udev/udev.lomoco index 9e55511..4541cac 100755 --- a/udev/udev.lomoco +++ b/udev/udev.lomoco @@ -1,26 +1,24 @@ -#!/bin/bash +#!/bin/sh +# +# udev helper script for the locomo utility +# -case "$DEVPATH" in - *usbdev*.*) - dev=${DEVPATH##*usbdev} - bus=$(printf %03d ${dev%.*}) - dev=$(printf %03d ${dev#*.}) +test -x /usr/bin/lomoco || exit 0 +test -r /etc/default/lomoco || exit 0 - . /etc/sysconfig/logitech_mouse +options= +. /etc/default/lomoco - options= +if [ -n "$LOGITECH_MOUSE_RESOLUTION" ]; then + options="--$LOGITECH_MOUSE_RESOLUTION" +fi - if [ -n "$LOGITECH_MOUSE_RESOLUTION" ]; then - options="--$LOGITECH_MOUSE_RESOLUTION" - fi - - if [ -z "$LOGITECH_MOUSE_DISABLE_CC" -o "$LOGITECH_MOUSE_DISABLE_CC" = yes ]; then - options="$options --no-sms" - fi - - if [ -n "$options" ]; then - /usr/bin/lomoco -b $bus -d $dev $options - fi - ;; -esac 2>&1 | /bin/logger -t lomoco +if [ -z "$LOGITECH_MOUSE_DISABLE_CC" -o "$LOGITECH_MOUSE_DISABLE_CC" = yes ]; then + options="$options --no-sms" +fi +if [ -n "$options" ]; then + /usr/bin/lomoco -b $BUSNUM -d $DEVNUM -p $ID_MODEL_ID $options 2>&1 |\ + sed -e 's/^[[:blank:]]\+//' -e 's/ \+$//' -e '/^$/ d' |\ + logger -t lomoco -p daemon.info +fi debian/patches/01_Support_for_COM_for_Notebooks.patch0000644000000000000000000000314412127550143020051 0ustar Author: Thibaut VARENE Date: Sat Nov 25 00:32:15 2006 +0100 Description: Support for COM for Notebooks, patch from Ari Pollak Bug-Debian: 398159 diff --git a/src/lomoco.c b/src/lomoco.c index 2dbab4d..ac0b950 100644 --- a/src/lomoco.c +++ b/src/lomoco.c @@ -54,6 +54,7 @@ mouse_t mice [] = { {0xc505, "Receiver for Cordless Elite Duo", "C-BG17-DUAL", 1, 0, 0, 0, 1}, {0xc506, "Receiver for MX700 Optical Mouse", "C-BF16-MSE", 1, 0, 0, 1, 0}, {0xc508, "Receiver for Cordless Optical TrackMan", "C-BA4-MSE", 1, 0, 0, 1, 0}, + {0xc50a, "Receiver for Cordless Optical Mouse for Notebooks", "C-BJ27-MSE", 1, 0, 0, 1, 0}, {0xc702, "Receiver for Cordless Presenter", "C-UF15", 1, 0, 0, 0, 0}, {0xc704, "Receiver for diNovo Media Desktop", "C-BQ16A", 1, 0, 1, 1, 0}, /* From Markus Wiesner */ @@ -104,6 +105,7 @@ static void query_csr(mouse_t *m, struct usb_dev_handle *handle, printf("\tReceiver type: "); switch (P0) { case 0x0f: printf ("C50E\n"); break; + case 0x14: printf ("C50A\n"); break; case 0x38: printf ("C501\n"); break; case 0x39: printf ("C502\n"); break; case 0x3a: printf ("C503\n"); break; @@ -138,6 +140,7 @@ static void query_csr(mouse_t *m, struct usb_dev_handle *handle, case 0x82: printf ("Cordless Optical TrackMan\n"); break; case 0x8A: printf ("MX700 Cordless Optical Mouse\n"); break; case 0x8B: printf ("MX700 Cordless Optical Mouse (2ch)\n"); break; + case 0x94: printf ("Cordless Optical Mouse for Notebooks\n"); break; default: printf ("Unknown (type %x)\n", P4); } debian/patches/02_M500.patch0000644000000000000000000000146512127550143012566 0ustar Description: Enables Lomoco to configure the M500 laser mouse. Author: Mathias Brodala Last-Update: 2011-03-05 Bug-Debian: 616591 --- a/src/lomoco.c +++ b/src/lomoco.c @@ -48,6 +48,7 @@ {0xc025, "MX500 Optical Mouse", "M-BP81A", 0, 1, 1, 1, 0}, {0xc031, "iFeel Mouse (silver)", "M-UT58A", 0, 1, 0, 0, 0}, {0xc041, "G5 Laser Gaming Mouse", "M-UAC113", 0, 1, 0, 1, 0}, + {0xc069, "M500 Laser Mouse", "M-500", 0, 1, 1, 0, 0}, {0xc501, "Mouse Receiver", "C-BA4-MSE", 1, 0, 0, 0, 0}, {0xc502, "Dual Receiver", "C-UA3-DUAL", 1, 0, 0, 0, 1}, {0xc503, "Receiver for MX900 Receiver", "C-UJ16A", 1, 0, 0, 1, 0}, debian/patches/00_no_uninitialized_buffers.patch0000644000000000000000000000077212127550143017223 0ustar Author: Thibaut VARENE Date: Fri Mar 31 21:09:56 2006 +0200 Description: No longer prints uninitialized buffer. Bug-Debian: 357734 diff --git a/src/lomoco.c b/src/lomoco.c index 918a322..2dbab4d 100644 --- a/src/lomoco.c +++ b/src/lomoco.c @@ -667,7 +667,7 @@ int scan_bus (struct usb_bus *bus) { device->filename, device->descriptor.idVendor, device->descriptor.idProduct, - ret ? product : "Unknown" + ret > 0 ? product : "Unknown" ); continue; } debian/preinst0000644000000000000000000000102312127550143010571 0ustar #!/bin/sh set -e if [ "$1" = install ] || [ "$1" = upgrade ]; then if [ -L "/etc/udev/rules.d/025_lomoco.rules" ]; then rm -f "/etc/udev/rules.d/025_lomoco.rules" fi if [ -e "/etc/udev/lomoco.rules" ]; then if [ "`md5sum \"/etc/udev/lomoco.rules\" | sed -e \"s/ .*//\"`" = \ "`dpkg-query -W -f='${Conffiles}' lomoco | sed -n -e \"\\\\' /etc/udev/lomoco.rules's/.* //p\"`" ] then rm -f "/etc/udev/lomoco.rules" else mv "/etc/udev/lomoco.rules" "/etc/udev/rules.d/40-lomoco.rules" fi fi fi #DEBHELPER# debian/lomoco.default0000644000000000000000000000044412127550143012026 0ustar # Configuration file for lomoco # see `man lomoco` for details # Define which resolution should be used # Values: 800,400,1200,1600 LOGITECH_MOUSE_RESOLUTION= # Whether to disable SmartScroll/Cruise Control. Defaults to yes if not set. # Values: yes,no LOGITECH_MOUSE_DISABLE_CC= debian/rules0000755000000000000000000000032512127550143010246 0ustar #!/usr/bin/make -f %: dh $@ --with autoreconf override_dh_auto_build: dh_auto_build -- all-recursive udev-rules override_dh_installudev: cp udev/lomoco.rules debian/lomoco.udev dh_installudev --priority=85 debian/changelog0000644000000000000000000000706512127551042011047 0ustar lomoco (1.0.0-1) unstable; urgency=low * QA (group) upload. [ Didier Raboud ] * Re-version the upstream tarball to 1.0.0, which sounds closer to 1.0 * than 1.0beta1+1.0. * Merge Ubuntu changes, many thanks to them! (Closes: #559964, #622565, #634909) * Orphan properly: set Maintainer to the QA group. * Set source format to 3.0 (quilt) * Transform the direct modifications into quilt patches. * Add Homepage field * Use dh7 tiny format and dh-autoreconf. * Import all history in Git, push to collab-maint on alioth, add corresponding VCS-* fields. * Drop empty postrm maintainer script * Bump Standards-Version to 3.9.4 without changes needed. [ Mathias Brodala ] * Add patch to permit configuration of the M500 laser mouse. (Closes: #616591) [ Emmet Hikory ] * Update debian/watch file. -- Didier Raboud Fri, 05 Apr 2013 15:20:10 +0200 lomoco (1.0beta1+1.0-5ubuntu4) oneiric; urgency=low * Apply patch from Cybjit to demote udev rule priority from 40 to 85. Doing so seems sensible as per the guidelines in /lib/udev/rules.d/README. (LP: #742759) -- Daniel T Chen Wed, 20 Jul 2011 16:39:16 -0400 lomoco (1.0beta1+1.0-5ubuntu3) karmic; urgency=low * udev/toudev.awk, udev/udev.lomoco: Make udev rule working (LP: #214226) -- B. Clausius Thu, 08 Oct 2009 20:31:28 +0200 lomoco (1.0beta1+1.0-5ubuntu2) karmic; urgency=low * Support Logitech MX518 Optical Mouse with product id c051 (LP: #406007) -- B. Clausius Tue, 14 Jul 2009 20:42:00 +0200 lomoco (1.0beta1+1.0-5ubuntu1) jaunty; urgency=low * debian/rules: Copy rules to path and use dh_installudev to install * debian/dirs: No need to make directory * debian/install: No need to copy by hand * debian/preinst: Remove symlink on upgrade, also remove old rules file unless modified in which case rename. * debian/postinst: Do not create symlink on install * debian/postrm: No symlink to remove * Bump build-depend on debhelper to install udev rules into /lib/udev/rules.d, add Breaks on udev to get correct version. -- Scott James Remnant Tue, 13 Jan 2009 15:23:57 +0000 lomoco (1.0beta1+1.0-5) unstable; urgency=low * Support for COM for Notebooks, patch from Ari Pollak (Closes: #398159) -- Thibaut VARENE Sat, 25 Nov 2006 00:32:15 +0100 lomoco (1.0beta1+1.0-4) unstable; urgency=medium * No longer prints uninitialized buffer. (Closes: #357734) -- Thibaut VARENE Fri, 31 Mar 2006 21:09:56 +0200 lomoco (1.0beta1+1.0-3) unstable; urgency=medium * udev.lomoco updated for Debian (Closes: #359744) * udev rule file fixed to work with current udev (Closes: #359783) Both fixes thanks to hcm@debian.org * added missing /etc/default/lomoco -- Thibaut VARENE Fri, 31 Mar 2006 18:37:03 +0200 lomoco (1.0beta1+1.0-2) unstable; urgency=low * fix udev scripts (Closes: #356338) -- Thibaut VARENE Fri, 17 Mar 2006 15:10:15 +0100 lomoco (1.0beta1+1.0-1) unstable; urgency=low * New upstream release (1.0) -- Thibaut VARENE Thu, 2 Mar 2006 17:21:19 +0100 lomoco (1.0beta1-2) unstable; urgency=low * improved udev rules file (Closes: #350815) * Fixed silly bug in postinst script * Moved udev.lomoco to /lib/udev -- Thibaut VARENE Thu, 2 Feb 2006 14:57:55 +0100 lomoco (1.0beta1-1) unstable; urgency=low * Initial release Closes: #345769 -- Thibaut VARENE Sat, 14 Jan 2006 00:20:51 +0100