diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/lmctl |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/lmctl')
-rw-r--r-- | community/lmctl/PKGBUILD | 39 | ||||
-rw-r--r-- | community/lmctl/lmctl.conf.d | 6 | ||||
-rw-r--r-- | community/lmctl/lmctl.rc.d | 21 | ||||
-rw-r--r-- | community/lmctl/mx-support-cmdline.patch | 37 | ||||
-rw-r--r-- | community/lmctl/mx-support-man.patch | 17 | ||||
-rw-r--r-- | community/lmctl/mx-support.patch | 29 |
6 files changed, 149 insertions, 0 deletions
diff --git a/community/lmctl/PKGBUILD b/community/lmctl/PKGBUILD new file mode 100644 index 000000000..8e8931e66 --- /dev/null +++ b/community/lmctl/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Jeff Mickey <j@codemac.net> +# Contributor: Shadowhand <woody.gilk@gmail.com> +# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us> + +pkgname=lmctl +pkgver=0.3.2 +pkgrel=6 +pkgdesc="Logitech Mouse configuration program" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.bedroomlan.org/~alexios/coding_lmctl.html" +depends=('libusb-compat') +source=(http://www.bedroomlan.org/~alexios/files/SOFTWARE/lmctl/${pkgname}\_${pkgver}.tar.gz \ + mx-support-cmdline.patch mx-support-man.patch mx-support.patch \ + lmctl.rc.d lmctl.conf.d) +md5sums=('c2acb088c95adeac68b6de8f05ddc0e4' '431521026fc07b27e21d65124dd1134f' \ + 'cfc222209b9a9d6b203c5a00dafe57dd' '1b943fe045d8273677be43c79bfd1031' + 'a62ad322e93c1cbc931bba33fb0a518c' 'a77682cf2d2c9e3d1a53a6444a74ce66' ) + +build() { + cd ${srcdir}/${pkgname}-0.3.1 + + patch -Np1 < ${srcdir}/mx-support-cmdline.patch + patch -Np1 < ${srcdir}/mx-support-man.patch + patch -Np1 < ${srcdir}/mx-support.patch + + ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share + make +} + +package() { + cd ${srcdir}/${pkgname}-0.3.1 + + make DESTDIR=${pkgdir} install + + # install the init scripts + install -D -m755 ${srcdir}/lmctl.rc.d ${pkgdir}/etc/rc.d/lmctl + install -D -m644 ${srcdir}/lmctl.conf.d ${pkgdir}/etc/conf.d/lmctl +} diff --git a/community/lmctl/lmctl.conf.d b/community/lmctl/lmctl.conf.d new file mode 100644 index 000000000..54e532e25 --- /dev/null +++ b/community/lmctl/lmctl.conf.d @@ -0,0 +1,6 @@ +# +# Parameters to be passed to lmctl +# +# lmctl --help for more info +# +LMCTL_ARGS="--1600 --no-sms" diff --git a/community/lmctl/lmctl.rc.d b/community/lmctl/lmctl.rc.d new file mode 100644 index 000000000..e9eaf7de1 --- /dev/null +++ b/community/lmctl/lmctl.rc.d @@ -0,0 +1,21 @@ +#!/bin/bash +LMCTL_ARGS= +[ -f /etc/conf.d/lmctl ] && . /etc/conf.d/lmctl + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Setting up Logitech Mouse" + /usr/bin/lmctl ${LMCTL_ARGS} &>/dev/null + if [ $? -eq 0 ] ; then + stat_fail + else + stat_done + add_daemon lmctl + fi + ;; + *) + echo "usage: $0 {start}" +esac diff --git a/community/lmctl/mx-support-cmdline.patch b/community/lmctl/mx-support-cmdline.patch new file mode 100644 index 000000000..f2f7cf068 --- /dev/null +++ b/community/lmctl/mx-support-cmdline.patch @@ -0,0 +1,37 @@ +--- lmctl-org/src/cmdline.c 2004-09-07 22:40:15.000000000 +0000 ++++ lmctl-0.3.1/src/cmdline.c 2005-06-29 13:36:33.000000000 +0000 +@@ -128,6 +128,10 @@ + "Set matching devices to a resolution of 400cpi"}, + { "800", '8', NULL, 0, + "Set matching devices to a resolution of 800cpi"}, ++ { "1200", 'm', NULL, 0, ++ "Set matching devices to a medium resolution of 1200cpi"}, ++ { "1600", 'h', NULL, 0, ++ "Set matching devices to a high resolution of 1600cpi"}, + + { NULL, 0, NULL, 0, _("SmartScroll/Cruise Control (SMS command set)") }, + +@@ -227,13 +231,22 @@ + command = cmd_set; + set_res = (int) (key - '0') * 100; + break; ++ ++ case 'm': ++ command = cmd_set; ++ set_res = (int) (12) * 100; ++ break; ++ case 'h': ++ command = cmd_set; ++ set_res = (int) (16) *100; ++ break; + + case '1': /* set the channel */ + case '2': + command = cmd_set; + set_channel = (int) (key - '0'); + break; +- ++ + case 'u': + command = cmd_set; + set_unlock = 1; diff --git a/community/lmctl/mx-support-man.patch b/community/lmctl/mx-support-man.patch new file mode 100644 index 000000000..78d4ff023 --- /dev/null +++ b/community/lmctl/mx-support-man.patch @@ -0,0 +1,17 @@ +--- lmctl-org/src/lmctl.1 2004-09-07 22:32:25.000000000 +0000 ++++ lmctl-0.3.1/src/lmctl.1 2005-06-29 14:02:32.000000000 +0000 +@@ -116,6 +116,14 @@ + .BR -8 ", " --800 + Sets matching devices to a resolution of 800 cpi. Very useful on + certain Logitech mice (the MX500 is one of them) that boot in 400 cpi. ++.TP ++.BR -m ", " --1200 ++Sets matching devices to a resolution of 1200 cpi. Very useful on ++certain Logitech mice (the MX518 is one of them) that boot in 400 cpi. ++.TP ++.BR -h ", " --1600 ++Sets matching devices to a resolution of 1600 cpi. Very useful on ++certain Logitech mice (the MX518 is one of them) that boot in 400 cpi. + .PP + The following settings control SmartScroll/Cruise Control, for mice + that support it (i.e. include the SMS capability). diff --git a/community/lmctl/mx-support.patch b/community/lmctl/mx-support.patch new file mode 100644 index 000000000..9c09a9c9b --- /dev/null +++ b/community/lmctl/mx-support.patch @@ -0,0 +1,29 @@ +--- lmctl-org/src/lmctl.c 2004-09-08 07:59:55.000000000 +0000 ++++ lmctl-0.3.1/src/lmctl.c 2005-06-29 14:03:50.000000000 +0000 +@@ -99,6 +99,8 @@ + {0xc00e, "Wheel Mouse Optical", "M-BJ58", 0, 1, 0, 0}, + {0xc00f, "MouseMan Traveler", "M-BJ79", 0, 1, 0, 0}, + {0xc012, "MouseMan Dual Optical", "M-BL63B", 0, 1, 0, 0}, ++ {0xc01d, "MX510 Optical Mouse", "M-BS81A", 0, 1, 1, 0}, ++ {0xc01e, "MX518 Optical Mouse", "M-BS81A", 0, 1, 0, 0}, + {0xc024, "MX300 Optical Mouse", "M-BP82", 0, 1, 0, 0}, + {0xc025, "MX500 Optical Mouse", "M-BP81A", 0, 1, 1, 0}, + {0xc031, "iFeel Mouse (silver)", "M-UT58A", 0, 1, 0, 0}, +@@ -270,7 +272,7 @@ + exit(1); + } + +- assert ((buf [0] == 3) || (buf [0] == 4)); ++ assert ((buf [0] == 3) || (buf [0] == 4) || (buf [0] == 5) || (buf [0] == 6)); + + printf ("\tResolution (RES): %d cpi\n", (buf [0] - 2) * 400); + } +@@ -355,7 +357,7 @@ + unsigned char buf [80]; + if (!set_res) return; + +- assert ((set_res == 400) || (set_res == 800)); ++ assert ((set_res == 400) || (set_res == 800) || (set_res == 1200) || (set_res == 1600)); + if (usb_control_msg (handle, 0x40, 0x02, 0x000e, (set_res / 400) + 2, + buf, 0, TIMEOUT) != 0) { + perror("Writing to USB device"); |