summaryrefslogtreecommitdiff
path: root/sys-apps/lomoco
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/lomoco
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/lomoco')
-rw-r--r--sys-apps/lomoco/Manifest9
-rw-r--r--sys-apps/lomoco/files/lomoco-1.0-gentoo-hardware-support.patch287
-rw-r--r--sys-apps/lomoco/files/lomoco-1.0-updated-udev.patch95
-rw-r--r--sys-apps/lomoco/files/lomoco-pm-utils-r17
-rw-r--r--sys-apps/lomoco/files/lomoco.conf9
-rw-r--r--sys-apps/lomoco/lomoco-1.0-r9.ebuild52
-rw-r--r--sys-apps/lomoco/metadata.xml13
7 files changed, 472 insertions, 0 deletions
diff --git a/sys-apps/lomoco/Manifest b/sys-apps/lomoco/Manifest
new file mode 100644
index 000000000000..344f463d3078
--- /dev/null
+++ b/sys-apps/lomoco/Manifest
@@ -0,0 +1,9 @@
+AUX lomoco-1.0-gentoo-hardware-support.patch 9317 SHA256 18c91bfdb5fe354391fe6a4cffce41398cb9d20456cc619ebf8b462416378c58 SHA512 137b318629a09b5600744602fd725c8b7b56fe350aca0f26fb9cb9d37f499b4bf353cc3fe2e20098132ea94d3dab5261937695407074ac8c736bd292f8dddf85 WHIRLPOOL eda57d347fdbc5ae6b0ce0cc34ca9f2b2a7df3ac6833eca96ddc28f61a3253e57554bd613fb2efa1410a1bb8bda60710705b65eeefec52e4a56ecf8f3ea3e373
+AUX lomoco-1.0-updated-udev.patch 2335 SHA256 ce281a45d4001192b35256d658b661adde3e7e6eda4d5c327ee202ca87d806ab SHA512 241496067804c3f5a3b508a2955bd139287b756fac6c9793003279d4def336c9d870eb807a81a02621e4edbc0895f27dd9565a10dbb16740fe88c9e186e4d196 WHIRLPOOL 65543da1f7fda850094ebbf9b389f76a3b487e27ceb6d82ad7f596b8b4eb88ecb3ecfd8b5223d8cbbd7171c707e33b2e4f45ccbc97eb75217cbdaafc45ebfd9f
+AUX lomoco-pm-utils-r1 82 SHA256 0591a26f14238abc1965a9cbddcc41cd9a82873058b420447e917dd770cb9d4f SHA512 316bcd13dfb18f573797c5e57cf318ac34efe347ae623a63e0b84d64360188d54308907111be54098a6c334822797c7018475b1c7930418d90e4826924117886 WHIRLPOOL 13cf317de1515724fcd09b1986fc7531d77920db60e051eb14359162c08812ebbacb8ddbb27ee011bade9e43b859f8bd2a6525668764231654de0988f60b9717
+AUX lomoco.conf 296 SHA256 53260f97c2385d4b3d3d9340d2ca4d90bad954c72277b235a411a20f2467b233 SHA512 74dad00bb2aa15fefe16e59c56a34184fb3912aed319c6c1e5a72b7516fd29c0af305c50afe8ad819936175e06715f5b03ee7cd3c1f6a213c0d466484748f541 WHIRLPOOL 3a43e7887ba6890daf60e3eff97bd97c990c449208ba33b43bba05a5fe885d9cec180fa8de4d895639749680284123c811db21554bd8a0845f117e1211ee4eb4
+DIST lomoco-1.0.tar.gz 24573 SHA256 e9e537e8bca6186f84b457394a9e934b89c36870c66aa202ed188c7aa24e9dcc SHA512 5cd04c956fe11112be83e8d4ad91e4a8fac1bacd03666e8959ce20f2cc372fc8c53a5ac86b94125088f6b303936f087caafe71248ca8511b6a580f58459aee9f WHIRLPOOL 2bf5368351879f7f77e1dc9a61404a6f23f3ff96a1fa943aad3954741e1492df2833f306b774bc2e44dd63ec0c85c4b8fe3661f48b7d2b82e384b9f12fa82943
+EBUILD lomoco-1.0-r9.ebuild 1084 SHA256 40d7b76bfe81b60938bdbcce2de539ea2a4a5c249bee4ae571cc16a8797b43ed SHA512 99659ad3f6a2a0bcaefb866daa09bdee5d34819a0a30a213d8e02dd251a165cfe5041713226930e0f24f9d5d6f289760558f3b2b41eea9cb145cc9888db17c89 WHIRLPOOL f6a2203a33dc1f007f83cf1ea899a4e125ed1ad62b74fad0ffc4de6a33f67e3c089d4e64c54387c3a99149b64d4e29d9ebc19ece666b19e2ac230e9fcf41c698
+MISC ChangeLog 2710 SHA256 666ff031268fc33d8bd8d93a1cac53bd08c6606ff3cca63a8c4ae0f7b7820458 SHA512 edbadd5211a18a0c917256677ba319e102f548a721ab2d1141618a6bccd0163b5075a74ea339cba2973c5a28f2c30cfd49f838fd9f5018eeffb0b57f2ef9215d WHIRLPOOL b5b0d61734dcf0a667bcf88f69d3ad2563f812f6f4b0d8078c399f64370571f6491bd6e7e998bb9838468286cf30efbec9e568fea6e3cb1355b0a0d6f77e1849
+MISC ChangeLog-2015 4466 SHA256 b14d4ca5a478d07ee2fda3286e1fa2554a1e44af70fb6775107eb506f18b91f2 SHA512 77ffc4eb946b5525b2e3d99b2a12b5a59002ce0481b223c7f87baac336ad1c1b8cba1a0a406761e43b8588039aa1c50c3d367b65192536eceba1ba8b2f83c13c WHIRLPOOL 3f397f456caff1396da0ae47b0a000b6ceb8b3a381d7120e5164af0480459934c513234835422dc2b4c0e7ecb52adcd3ca7797973e5513a14d47df5f7c3ddcd5
+MISC metadata.xml 436 SHA256 b9f842a31b8d947cd7d98027a5fb8df2460c52b9fd9a31c91e998b2ab36db371 SHA512 35560d082dd8ccf5d85100b595e059824df034f8a658850d5d70ca4460aa6e083e27f1ab3e392954972e5a05b252e9adaa18696b5e217a638cdc4066741b3cc3 WHIRLPOOL ad26e8f7ee1cb8ab22cb95776da7195cfcfd826e37e84cdf84ed526ca8ab43545f3725d1f8e84c3d1bb6404e1e3cf8d9d00b5336b4e398adb704788eb4cf543d
diff --git a/sys-apps/lomoco/files/lomoco-1.0-gentoo-hardware-support.patch b/sys-apps/lomoco/files/lomoco-1.0-gentoo-hardware-support.patch
new file mode 100644
index 000000000000..5a5cd7d3fcb9
--- /dev/null
+++ b/sys-apps/lomoco/files/lomoco-1.0-gentoo-hardware-support.patch
@@ -0,0 +1,287 @@
+- Support for other hardware
+- ssr comment in the mouse array.
+- Use of defines for numeric constants to improve code readability.
+- Debian patch integrated
+
+diff -Nuar --exclude '*~' lomoco-1.0.old/src/lomoco.c lomoco-1.0/src/lomoco.c
+--- lomoco-1.0.old/src/lomoco.c 2006-03-01 06:10:05.000000000 -0800
++++ lomoco-1.0/src/lomoco.c 2006-04-30 02:38:05.107430674 -0700
+@@ -32,11 +32,12 @@
+ * model: you can find on the hardware, look for M/N: ...
+ * csr: mouse with receiver (wireless)
+ * res: mouse has resolution control
+- * sms: mouse has smart control
++ * ssr: mouse has smart scroll reporting
++ * sms: mouse has smart scroll
+ * dual: dual receiver (wireless mouse+wireless keyboard)
+ *
+ * product id, name, model, csr, res, ssr, sms, dual */
+-mouse_t mice [] = {
++static mouse_t mice [] = {
+ {0xc00e, "Wheel Mouse Optical", "M-BJ58", 0, 1, 0, 0, 0},
+ {0xc00f, "MouseMan Traveler", "M-BJ79", 0, 1, 0, 0, 0},
+ {0xc012, "MouseMan Dual Optical", "M-BL63B", 0, 1, 0, 0, 0},
+@@ -42,6 +42,7 @@
+ {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},
+@@ -49,50 +50,37 @@
+ {0xc041, "G5 Laser Gaming Mouse", "M-UAC113", 0, 1, 0, 1, 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},
++ {0xc503, "Receiver for MX900", "C-UJ16A", 1, 0, 0, 1, 0},
+ {0xc504, "Receiver for Cordless Freedom Optical", "C-BD9-DUAL", 1, 0, 0, 0, 1},
+ {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},
+- {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 Michele Noberasco <s4t4n@gentoo.org> */
++ {0xc50a, "Reciveer for Cordless Optical Mouse for Notebooks", "C-BJ27-MSE", 1, 0, 0, 0, 0},
++
++ /* From Robin H. Johnson <robbat2@gentoo.org> */
++ {0xc50b, "Receiver for Cordless Desktop MX", "C-BK16A-DUAL",1, 0, 0, 1, 1},
++
+ /* From Markus Wiesner <m_wiesner@gmx.net> */
+ {0xc50e, "Receiver for MX1000 Laser", "C-BN34", 1, 0, 1, 1, 0},
+ {0xc512, "Receiver for Cordless Desktop MX3100 Laser", "C-BO34", 1, 0, 0, 1, 1},
++
++ {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},
+ {0x0000, NULL, NULL, 0, 0, 0, 0}
+ };
+
+-
+ /*
+- * Description: Query the mouse and report all cordless mouse specific infos
++ * Description: Print out a set of CSR data
+ * e.g. receiver type, mouse type, battery status
+ *
+- * Parameters: mouse_t *m
+- * mouse struct with the mouse specs
+- * struct usb_dev_handle *handle
+- * usb device handle of the mouse
+- * unsigned int addr
+- * address for dual receivers
++ * Parameters: unsigned char* buf
++ * result from query_csr internals
+ *
+ * Return: void
+ */
+-static void query_csr(mouse_t *m, struct usb_dev_handle *handle,
+- unsigned int addr) {
+- unsigned char buf[12] = {0};
+-
+- if (usb_control_msg ( handle,
+- USB_TYPE_VENDOR | USB_ENDPOINT_IN,
+- 0x09,
+- (0x0003 | addr),
+- (0x0000 | addr),
+- (char *) buf,
+- 8,
+- TIMEOUT ) != 8) {
+-
+- perror("Writing to USB device: CSR");
+- exit(EXIT_FAILURE);
+- }
+-
++static void print_csr(unsigned char* buf) {
+ /* We have not obtained blocks P6 P0 P4 P5 P8 P9 PB0 PB1 */
+
+ /* Is a C504 receiver busy? */
+@@ -111,6 +99,7 @@
+ case 0x3c: printf ("C508\n"); break;
+ case 0x3d: printf ("C506\n"); break;
+ case 0x3e: printf ("C505\n"); break;
++ case 0x3f: printf ("C50B\n"); break;
+ case 0x42: printf ("C512\n"); break;
+ default: printf ("Unknown (type %x)\n", P0);
+ }
+@@ -138,6 +127,7 @@
+ 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);
+ }
+
+@@ -199,6 +189,38 @@
+ }
+ }
+
++/*
++ * Description: Query the mouse and report all cordless mouse specific infos
++ * e.g. receiver type, mouse type, battery status
++ *
++ * Parameters: mouse_t *m
++ * mouse struct with the mouse specs
++ * struct usb_dev_handle *handle
++ * usb device handle of the mouse
++ * unsigned int addr
++ * address for dual receivers
++ *
++ * Return: void
++ */
++static void query_csr(mouse_t *m, struct usb_dev_handle *handle,
++ unsigned int addr) {
++ unsigned char buf[12] = {0};
++
++ if (usb_control_msg ( handle,
++ USB_TYPE_VENDOR | USB_ENDPOINT_IN,
++ REQUEST_MOUSE_CSR,
++ (0x0003 | addr),
++ (0x0000 | addr),
++ (char *) buf,
++ 8,
++ TIMEOUT ) != 8) {
++
++ perror("Writing to USB device: CSR");
++ exit(EXIT_FAILURE);
++ }
++ print_csr(buf);
++
++}
+
+ /*
+ * Description: Query the mouse and report the current resolution
+@@ -218,8 +240,8 @@
+
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR | USB_ENDPOINT_IN,
+- 0x01,
+- (0x000e | addr),
++ REQUEST_MOUSE_GET_RES_SSR,
++ (VALUE_MOUSE_GET_RES | addr),
+ (0x0000 | addr),
+ (char *) buf,
+ 1,
+@@ -255,8 +277,8 @@
+ if (m->has_ssr) {
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR | USB_ENDPOINT_IN,
+- 0x01,
+- (0x0017 | addr),
++ REQUEST_MOUSE_GET_RES_SSR,
++ (VALUE_MOUSE_GET_SSR | addr),
+ (0x0000 | addr),
+ (char*) buf,
+ 1,
+@@ -394,8 +416,8 @@
+ assert ((set_channel == 1) || (set_channel == 2));
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x02,
+- (0x0008 | addr),
++ REQUEST_MOUSE_PUT_RES_SMS,
++ (VALUE_MOUSE_CHANNEL | addr),
+ ((set_channel - 1) | addr),
+ NULL,
+ 0,
+@@ -412,8 +434,8 @@
+ if (set_unlock) {
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x02,
+- (0x06 | addr),
++ REQUEST_MOUSE_PUT_RES_SMS,
++ (VALUE_MOUSE_UNLOCK | addr),
+ (0x1 | addr),
+ NULL,
+ 0,
+@@ -430,8 +452,8 @@
+ if (set_lock) {
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x02,
+- (0x0006 | addr),
++ REQUEST_MOUSE_PUT_RES_SMS,
++ (VALUE_MOUSE_UNLOCK | addr),
+ (0x0000 | addr),
+ NULL,
+ 0,
+@@ -448,8 +470,8 @@
+ if (set_clear) {
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x09,
+- (0x0004 | addr),
++ REQUEST_MOUSE_CSR,
++ (VALUE_MOUSE_CLEAR | addr),
+ (0x0000 | addr),
+ NULL,
+ 0,
+@@ -483,8 +505,8 @@
+
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x0002,
+- 0x000e,
++ REQUEST_MOUSE_PUT_RES_SMS,
++ VALUE_MOUSE_PUT_RES,
+ (set_res / 400) + 2,
+ NULL,
+ 0,
+@@ -514,8 +536,8 @@
+ assert ((set_sms == 1) || (set_sms == -1));
+ if (usb_control_msg ( handle,
+ USB_TYPE_VENDOR,
+- 0x02,
+- 0x0017,
++ REQUEST_MOUSE_PUT_RES_SMS,
++ VALUE_MOUSE_PUT_SSR,
+ (set_sms == 1 ? 0x0001 : 0x0000),
+ NULL,
+ 0,
+@@ -641,7 +663,7 @@
+ /* Do we support this device? If so, list it. */
+ if ((m = find_mouse (device)) != NULL) {
+
+- printf ("%s.%s: %04x:%04x %s (%s) Caps: %s%s%s\n",
++ printf ("%s.%s: %04x:%04x %s (%s) Caps: %s%s%s%s\n",
+ device->bus->dirname,
+ device->filename,
+ device->descriptor.idVendor,
+@@ -650,6 +672,7 @@
+ m->model,
+ m->has_csr? "CSR ": "",
+ m->has_res? "RES ": "",
++ m->has_ssr? "SSR ": "",
+ m->has_sms? "SMS ": ""
+ );
+ }
+@@ -667,7 +671,7 @@
+ device->filename,
+ device->descriptor.idVendor,
+ device->descriptor.idProduct,
+- ret ? product : "Unknown"
++ ret > 0 ? product : "Unknown"
+ );
+ continue;
+ }
+diff -Nuar --exclude '*~' lomoco-1.0.old/src/lomoco.h lomoco-1.0/src/lomoco.h
+--- lomoco-1.0.old/src/lomoco.h 2006-03-01 06:10:05.000000000 -0800
++++ lomoco-1.0/src/lomoco.h 2006-04-30 02:34:04.381175920 -0700
+@@ -97,4 +97,17 @@
+ int is_dual;
+ } mouse_t;
+
++
++#define REQUEST_MOUSE_CSR 0x09
++#define VALUE_MOUSE_GET 0x0003
++#define VALUE_MOUSE_CLEAR 0x0004
++#define REQUEST_MOUSE_GET_RES_SSR 0x01
++#define VALUE_MOUSE_GET_RES 0x000e
++#define VALUE_MOUSE_GET_SSR 0x0017
++#define REQUEST_MOUSE_PUT_RES_SMS 0x02
++#define VALUE_MOUSE_UNLOCK 0x0006
++#define VALUE_MOUSE_CHANNEL 0x0008
++#define VALUE_MOUSE_PUT_RES 0x000e
++#define VALUE_MOUSE_PUT_SSR 0x0017
++
+ #endif /* __LOMOCO_H */
diff --git a/sys-apps/lomoco/files/lomoco-1.0-updated-udev.patch b/sys-apps/lomoco/files/lomoco-1.0-updated-udev.patch
new file mode 100644
index 000000000000..783a2d5e712a
--- /dev/null
+++ b/sys-apps/lomoco/files/lomoco-1.0-updated-udev.patch
@@ -0,0 +1,95 @@
+diff --git a/udev/toudev.awk b/udev/toudev.awk
+index 822421d..ada40e5 100644
+--- a/udev/toudev.awk
++++ b/udev/toudev.awk
+@@ -1,15 +1,20 @@
+ #!/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) \
++ print "ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"" substr($1, index($1, "x")+1) \
+ "\", RUN=\"lomoco\""
+ }
+
+diff --git a/udev/udev.lomoco b/udev/udev.lomoco
+index 9e55511..da896d9 100755
+--- a/udev/udev.lomoco
++++ b/udev/udev.lomoco
+@@ -1,26 +1,36 @@
+-#!/bin/bash
+-
+-case "$DEVPATH" in
+- *usbdev*.*)
+- dev=${DEVPATH##*usbdev}
+- bus=$(printf %03d ${dev%.*})
+- dev=$(printf %03d ${dev#*.})
+-
+- . /etc/sysconfig/logitech_mouse
+-
+- options=
+-
+- 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
+-
++#!/bin/sh
++#
++# udev helper script for the locomo utility
++#
++
++test -x /usr/bin/lomoco || exit 0
++test -r /etc/lomoco.conf || exit 0
++
++options=
++. /etc/lomoco.conf
++
++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 "$BUSNUM" ]; then
++ options="$options -b $BUSNUM"
++fi
++
++if [ -n "$DEVNUM" ]; then
++ options="$options -d $DEVNUM"
++fi
++
++if [ -n "$MODEL_ID" ]; then
++ options="$options -p $MODEL_ID"
++fi
++
++if [ -n "$options" ]; then
++ /usr/bin/lomoco $options 2>&1 | \
++ sed -e 's/^[[:blank:]]\+//' -e 's/ \+$//' -e '/^$/ d' | \
++ logger -t lomoco -p daemon.info
++fi
diff --git a/sys-apps/lomoco/files/lomoco-pm-utils-r1 b/sys-apps/lomoco/files/lomoco-pm-utils-r1
new file mode 100644
index 000000000000..602de3d11571
--- /dev/null
+++ b/sys-apps/lomoco/files/lomoco-pm-utils-r1
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+case "$1" in
+ thaw|resume)
+ @UDEVDIR@/lomoco
+ ;;
+esac
diff --git a/sys-apps/lomoco/files/lomoco.conf b/sys-apps/lomoco/files/lomoco.conf
new file mode 100644
index 000000000000..d69c6185bb61
--- /dev/null
+++ b/sys-apps/lomoco/files/lomoco.conf
@@ -0,0 +1,9 @@
+LOGITECH_MOUSE_RESOLUTION=800
+LOGITECH_MOUSE_DISABLE_CC=no
+
+# Use the lsusb output to configure additional parameters bellow
+# Bus <BUSNUM> Device <DEVNUM>: ID 046d:<MODEL_ID> Logitech, Inc. MX510 Optical Mouse
+# Note: DEVNUM is dynamic and not recommened
+#BUSNUM=001
+#DEVNUM=009
+#MODEL_ID=c01d
diff --git a/sys-apps/lomoco/lomoco-1.0-r9.ebuild b/sys-apps/lomoco/lomoco-1.0-r9.ebuild
new file mode 100644
index 000000000000..3e1eb600ddd5
--- /dev/null
+++ b/sys-apps/lomoco/lomoco-1.0-r9.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit autotools eutils multilib toolchain-funcs udev
+
+DESCRIPTION="Lomoco can configure vendor-specific options on Logitech USB mice"
+HOMEPAGE="http://www.lomoco.org/"
+SRC_URI="http://www.lomoco.org/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 x86"
+IUSE=""
+
+RDEPEND="virtual/libusb:0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+src_prepare() {
+ cp -f "${FILESDIR}"/lomoco-pm-utils-r1 "${T}" || die
+ sed -i -e "s|@UDEVDIR@|$(get_udevdir)|" "${T}"/lomoco-pm-utils-r1 || die
+
+ epatch \
+ "${FILESDIR}"/${P}-gentoo-hardware-support.patch \
+ "${FILESDIR}"/${P}-updated-udev.patch
+
+ eautoreconf
+}
+
+src_compile() {
+ emake
+ emake udev-rules
+}
+
+src_install() {
+ default
+
+ insinto "$(get_udevdir)"/rules.d
+ newins udev/lomoco.rules 40-lomoco.rules
+
+ exeinto "$(get_udevdir)"
+ newexe udev/udev.lomoco lomoco
+
+ insinto /etc
+ doins "${FILESDIR}"/lomoco.conf
+
+ exeinto /etc/pm/sleep.d
+ newexe "${T}"/lomoco-pm-utils-r1 lomoco
+}
diff --git a/sys-apps/lomoco/metadata.xml b/sys-apps/lomoco/metadata.xml
new file mode 100644
index 000000000000..c7bb54273d0f
--- /dev/null
+++ b/sys-apps/lomoco/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blshkv@pentoo.ch</email>
+ <name>Anton Bolshakov</name>
+ <description>Proxy maintainer. Assign bugs to him</description>
+ </maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>