diff -u fnfx-0.3/debian/control fnfx-0.3/debian/control --- fnfx-0.3/debian/control +++ fnfx-0.3/debian/control @@ -1,12 +1,13 @@ Source: fnfx Section: utils Priority: optional -Maintainer: Agney Lopes Roth Ferraz -Build-Depends: debhelper (>= 4.0.0), autotools-dev (>= 20040719.1) +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Agney Lopes Roth Ferraz +Build-Depends: debhelper (>= 4.0.0), autotools-dev (>= 20040719.1), autoconf, automake1.9, libtool Standards-Version: 3.7.3.0 Package: fnfxd -Architecture: i386 +Architecture: i386 Depends: ${shlibs:Depends} Replaces: fnfx Conflicts: fnfx diff -u fnfx-0.3/debian/rules fnfx-0.3/debian/rules --- fnfx-0.3/debian/rules +++ fnfx-0.3/debian/rules @@ -24,6 +24,7 @@ config.status: configure dh_testdir + autoreconf -f -i CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --bindir=\$${prefix}/bin -sbindir=\$${prefix}/sbin --sysconfdir=/etc diff -u fnfx-0.3/debian/changelog fnfx-0.3/debian/changelog --- fnfx-0.3/debian/changelog +++ fnfx-0.3/debian/changelog @@ -1,3 +1,16 @@ +fnfx (0.3-13ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes (LP: #256964): + - Add call to autoreconf in rules + - etc/fnfxd.conf: Changed Hoary to Ubuntu in options that are + commented out. + - Add libtool to Build-Depends + - Add autoconf and automake1.9 to the Build-Depends. + - Stop setting fnkey_descr in src/fnfxd_newacpi.c, s_acpi_cfg doesn't define + that member. + + -- Nathan Handler Mon, 11 Aug 2008 08:55:56 -0500 + fnfx (0.3-13) unstable; urgency=low * added LSB formatted dependency info in init.d script. Thanks to Petter @@ -5,6 +18,27 @@ -- Agney Lopes Roth Ferraz Wed, 06 Feb 2008 23:51:02 -0200 +fnfx (0.3-12ubuntu2) gutsy; urgency=low + + * debian/control: Update maintainer fields according to debian- + maintainer-field spec. + + -- Martin Pitt Mon, 17 Sep 2007 14:42:54 +0000 + +fnfx (0.3-12ubuntu1) feisty; urgency=low + + * Merge from Debian unstable. + * Remaining Ubuntu changes: + - Add call to autoreconf in rules + - etc/fnfxd.conf: Changed Hoary to Ubuntu in options that are + commented out. + - Add libtool to Build-Depends + * Add autoconf and automake1.9 to the Build-Depends. + * Stop setting fnkey_descr in src/fnfxd_newacpi.c, s_acpi_cfg doesn't define + that member. + + -- Steve Kowalik Mon, 29 Jan 2007 11:10:28 +1100 + fnfx (0.3-12) unstable; urgency=low * fixed debian/watch file (thanks to Otavio Salvador) @@ -45,7 +79,22 @@ * applied paolo patch (Closes: #363175) -- Agney Lopes Roth Ferraz Sat, 29 Apr 2006 21:42:49 -0300 - + +fnfx (0.3-7ubuntu2) dapper; urgency=low + + * Added build-depend on libtool + * Added call to autoreconf in rules + + -- Benjamin Montgomery Sat, 19 Nov 2005 21:42:05 -0600 + +fnfx (0.3-7ubuntu1) dapper; urgency=low + + * Resynchronise with Debian. + * etc/fnfxd.conf: Changed Hoary to Ubuntu in options that are + commented out. + + -- Benjamin Montgomery Fri, 18 Nov 2005 11:03:08 -0600 + fnfx (0.3-7) unstable; urgency=low * Fixed Fn-keystrokes misses. Thanks to Konstantin Isakov. The fix will be @@ -75,6 +124,18 @@ -- Agney Lopes Roth Ferraz Thu, 17 Mar 2005 14:15:55 -0300 +fnfx (0.3-3ubuntu2) hoary; urgency=low + + * mangle build deps to work around automake stupidity + + -- Thom May Fri, 1 Apr 2005 11:39:55 +0100 + +fnfx (0.3-3ubuntu1) hoary; urgency=low + + * NMU: Add support for the Hoary ACPI hotkeys patch + + -- Daniel Silverstone Thu, 17 Mar 2005 13:28:49 +0000 + fnfx (0.3-3) unstable; urgency=low * debian/control -> changed fnfx-client dependency. (Closes: #288525) only in patch2: unchanged: --- fnfx-0.3.orig/etc/fnfxd.conf +++ fnfx-0.3/etc/fnfxd.conf @@ -12,16 +12,19 @@ action(key="Fn-Escape";command="mute") action(key="Fn-F5";command="toggle video") -action(key="Fn-F6";command="brightness down") -action(key="Fn-F7";command="brightness up") action(key="Fn-F8";command="toggle bluetooth") action(key="Fn-3";command="toggle fan") action(key="Fn-1";command="volume down") action(key="Fn-2";command="volume up") #action(key="Fn-F2";command="toggle cpu") + +# These are handled by the Ubuntu acpi-support package; only re-enable them +# If you don't want the acpi-support package to manage them. #action(key="Fn-F3";command="suspend to ram") #action(key="Fn-F4";command="suspend to disk") +#action(key="Fn-F6";command="brightness down") +#action(key="Fn-F7";command="brightness up") [mixer] only in patch2: unchanged: --- fnfx-0.3.orig/src/fnfxd_newacpi.c +++ fnfx-0.3/src/fnfxd_newacpi.c @@ -0,0 +1,204 @@ +/* + * Authors: Timo Hoenig + * Daniel Silverstone + * Copyright (c) 2003, 2004 Timo Hoenig + * 2005 Daniel Silverstone + * + * All rights reserved + * + * This program 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, or (at your option) + * any later version. + * + * This program 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +/* + * Defines + * + */ + +#include +#include +#include +#include + +/* + * Declarations + * + */ + +void acpi_mainloop(void); +int keys_over_acpi(void); + +/* + * Includes + * + */ + +#include "fnfx.h" + +/* + * External functions + * + */ + +extern void debug(const char *fmt, ...) __attribute__ ((format(printf, 1, 2))); +extern void fatal(const char *fmt, ...) __attribute__ ((format(printf, 1, 2))); +extern int lookup(int); +extern int do_action(int); +extern void clean_config(void); +extern void signal_fnfx(); +extern void wait_fnfx(); +extern int notify_client(); + +/* + * External variables + * + */ + +extern t_daemon_cfg *cfg; + +/* + * Functions + * + */ + +/* + * chk_fnkey() + * + * Scan /proc/acpi/toshiba/keys for Fn-key events. + * + * If a new key event is found return 1, otherwise 0. + * + */ + +static void do_fnkey() +{ + int fnkey_pos = -1; + + fnkey_pos = lookup(cfg->acpi.hotkey); + /* cfg->acpi.fnkey_descr = cfg->keymap.fnkey[fnkey_pos].descr; */ + cfg->acpi.fnkey_pos = fnkey_pos; + + if (fnkey_pos != -1) { + if (notify_client()) { + if (cfg->debug_flag) + debug("chk_fnkey() - %s (0x%x). Executing command: %s.", + cfg->keymap.fnkey[fnkey_pos].descr, + cfg->acpi.hotkey, + ((cfg->keymap.fnkey[fnkey_pos]. + state) & FNKEY_ENABLED) ? cfg->keymap. + fnkey[fnkey_pos].command : "None"); + + if (cfg->keymap.fnkey[fnkey_pos].state & FNKEY_ENABLED) { + cfg->keymap.fnkey[fnkey_pos].state &= ~FNKEY_CLIENT; + do_action(fnkey_pos); + } + } + else { + if (strlen(cfg->keymap.fnkey[fnkey_pos].client_command)) { + if (! + (cfg->keymap.fnkey[fnkey_pos]. + state & FNKEY_EXTERNAL)) { + if (cfg->debug_flag) + debug + ("chk_fnkey() - %s (0x%x). Executing command for client: %s.", + cfg->keymap.fnkey[fnkey_pos].descr, + cfg->acpi.hotkey, + ((cfg->keymap.fnkey[fnkey_pos]. + state) & FNKEY_ENABLED) ? cfg->keymap. + fnkey[fnkey_pos].client_command : "None"); + + cfg->keymap.fnkey[fnkey_pos].state |= FNKEY_CLIENT; + do_action(fnkey_pos); + } + } + } + } +} + + +/* + * keys_over_acpi() + * + * return 1 if hotkeys are over acpi. + * If hotkeys *are* over acpi; then we enter a different main loop + */ + +int keys_over_acpi(void) +{ + FILE *f = fopen(ACPI_KEYS, "r+"); + int ret = 0, ignore1, ignore2; + debug("Attempting to determine if hotkeys are over acpi...\n"); + fscanf(f, "hotkey_ready: %d\nhotkey: 0x%4x\nhotkeys_via_acpi: %d", + &ignore1, &ignore2, &ret); + fclose(f); + debug("Result of scan is %d\n", ret); + return ret; +} + + +/* + * acpi_mainloop() + * + * The main loop mentioned above + */ +void acpi_mainloop(void) +{ + int acpi_socket; + struct sockaddr_un addr; + /* Connect a socket */ + if( (acpi_socket = socket(PF_FILE, SOCK_STREAM, 0)) == -1 ) { + return; /* Failure to initialise */ + } + addr.sun_family = AF_FILE; + strcpy(addr.sun_path, "/var/run/acpid.socket"); + if( connect(acpi_socket, (struct sockaddr*)&addr, sizeof(addr)) == -1 ) { + close(acpi_socket); + return; /* Failure to initialise */ + } + /* Since fnfxd is naturally blocking; let's read an event at a time */ + for(;;) { + char buf[1024]; + int r = 0; + buf[r] = 0; + while( r < 1023 ) { + if( read(acpi_socket, buf+r, 1) != 1 ) { + /* Something remarkably odd happened; close the socket and return */ + close(acpi_socket); + return; /* Failure while running */ + } + if( buf[r] == '\n' ) break; + r++; + } + buf[r] = '\0'; + /* One event in buf, process it */ + if( buf[0] == 'h' && + buf[1] == 'k' && + buf[2] == 'e' && + buf[3] == 'y' && + buf[4] == ' ' && + buf[5] == 'V' && + buf[6] == 'A' && + buf[7] == 'L' && + (buf[8] == 'D' || buf[8] == 'Z') && + buf[9] == ' ' ) { + /* It smells like a toshiba hotkey event... */ + int hkey = 0; + sscanf(buf+19, "%x", &hkey); + if( buf[17] == '1' ) hkey |= 0x80; /* keydown event */ + cfg->acpi.hotkey = hkey; + do_fnkey(); + } + } +}