Compare commits

..
Author SHA1 Message Date
Giacomo Catenazzi 1577a9b44e Import Debian changes 1.9.5.2-1
g15daemon (1.9.5.2-1) unstable; urgency=low

  * New upstream version
  * Change default behaviour: to switch client use MR (as already documented
    in /etc/default/g15daemon, but wrongly implemented)
2008-01-28 09:12:16 +01:00
Giacomo Catenazzi 18176a4efe Import Upstream version 1.9.5.2 2019-04-29 15:43:03 +02:00
Giacomo Catenazzi 9602397440 Import Upstream version 1.9.1.0.svn346 2019-04-29 15:43:02 +02:00
Giacomo Catenazzi 9404a6167d Import Upstream version 1.9.0-wip.20070910 2019-04-29 15:43:00 +02:00
Giacomo Catenazzi a5486422e2 Import Debian changes 1.9.1.0.svn346-1
g15daemon (1.9.1.0.svn346-1) unstable; urgency=low

  * New upstream version (from svn)
2007-12-18 09:15:42 +01:00
Giacomo Catenazzi 15b2644256 Import Debian changes 1.9.0-wip.20070910-5
g15daemon (1.9.0-wip.20070910-5) unstable; urgency=low

  * change priority to "extra"
  * force libg15render-dev versioned dependencies
2007-10-09 13:28:56 +02:00
Giacomo Catenazzi 8885aae540 Import Debian changes 1.9.0-wip.20070910-4
g15daemon (1.9.0-wip.20070910-4) unstable; urgency=low

  * Correct building errors (closes: #441919, #442995)
2007-09-18 20:29:54 +02:00
Giacomo Catenazzi 2b7a313c05 Import Debian changes 1.9.0-wip.20070910-3
g15daemon (1.9.0-wip.20070910-3) unstable; urgency=low

  * first try to make a debian/rules full working for
    svn and released version
  * fix directory fixes (closes: #442296)
2007-09-14 20:59:27 +02:00
Giacomo Catenazzi 8337c95069 Import Debian changes 1.9.0-wip.20070910-2
g15daemon (1.9.0-wip.20070910-2) unstable; urgency=low

  * pause() instead of busy loop.
2007-09-11 06:12:01 +02:00
Giacomo Catenazzi 0301e1151b Import Debian changes 1.9.0-wip.20070910-1
g15daemon (1.9.0-wip.20070910-1) unstable; urgency=low

  * New upstream release (from svn)
  * Don't install plugin in /usr/share (Closes: #441619)
2007-09-10 23:02:14 +02:00
Giacomo Catenazzi 6c7461ac31 Import Debian changes 1.9.0-2
g15daemon (1.9.0-2) unstable; urgency=low

  * Updates: better init.d scripts (with support for L1 key)
  * install also the sample plugin (clock, net, uinput)
2007-08-30 23:31:18 +02:00
66 changed files with 7673 additions and 6604 deletions

No files matched your search

+13
View File
@@ -1,9 +1,22 @@
Mike Lampard <mlampard@users.sf.net> Mike Lampard <mlampard@users.sf.net>
- primary developer - primary developer
Sven Ludwig Sven Ludwig
- Python bindings - Python bindings
James Green James Green
- Documentaion updates - Documentaion updates
Anthony J. Mirabella Anthony J. Mirabella
- numerous miscellaneous fixes and improvements to just about everything. - numerous miscellaneous fixes and improvements to just about everything.
Lars Sanders
- Clock plugin fixes
Fabrizio Sestito
- changes required to compile on OS-X
- OS-X kext file
Matthew McGee
- Solaris Documentation
+83 -12
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 214 $ - $Date: 2006-12-25 13:08:09 +1030 (Mon, 25 Dec 2006) $ $Author: aneurysm9 $ $Revision: 452 $ - $Date: 2008-01-25 16:04:31 +1030 (Fri, 25 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -84,14 +84,85 @@ allow clients use of all 'L' keys.
1.2.5svn -> current 1.2.5svn -> current
- Add compiletime check for uinput version, should resolve compilation problems on some distro's - Add compiletime check for uinput version, should resolve compilation problems on some distro's
- Security improved - the daemon now sets its effective uid to nobody as soon as possible. - Security improved - the daemon now sets its effective uid to nobody as soon as possible.
1.9.0SVN 1.9.0
- Add plugin API - Feature: Add plugin API
- partially rewritten event core - Feature: partially rewritten event core
- updated g15daemon_xmms_spectrum plugin with new features, now enabled via configure --enable-xmmsplugin - Feature: updated g15daemon_xmms_spectrum plugin with new features, available in trunk/g15daemon_audio_plugins (SVN)
xmms devel and glib devel packages will need to be installed prior to attempting ./configure --enable-xmmsplugin - Feature: Clock is now a plugin
Plugin is not compiled by default. - Feature: dependency on libdaemon is now removed
- Clock is now a plugin - Feature: g15daemon is now dependant on libg15render.
- dependency on libdaemon is now removed - Feature: Clock now includes analog clock thanks to Rasta Freak <igor.jusic@zg.t-com.hr>
- g15daemon is now dependant on libg15render.
- Clock now includes analog clock thanks to Rasta Freak <igor.jusic@zg.t-com.hr>
- Moved g15daemon_xmms_spectrum plugin to separate package - Moved g15daemon_xmms_spectrum plugin to separate package
1.9.1
- BugFix: Plugins are now installed in ${PREFIX}/{${LIBDIR}/g15daemon/${VERSION}/plugins
- Feature: OS-X support thanks to Fabrizio Sestito.
- Bugfix: libg15daemon_client: keypresses were being corrupted.
- Bugfix: libg15daemon_client: use g15_recv rather than recv.
- Bugfix: use default scheduling for all threads.
- Optimisation: minor optimisation of lcd_cycle() code.
- Security: repair some potential security holes.
- Bugfix: Backlight status was being mis-applied when cycling screens.
- Bugfix: Language bindings were not being distributed.
1.9.2
- BugFix: Add exitfunc to net plugin for exit notification.
- BugFix: Use pause() instead of sleeping
- BugFix: create leaving var as volatile.
- BugFix: Add NAME section to g15daemon_client manpages
- Tweak delay between successive keyboard reads. This reduces cpu load by
50% on my system.
- Bugfix: Ensure that all plugin exit functions are called on leaving.
- Bugfix: if keypress event is received (very early in the startup process,
the daemon would crash. Check that expected pointers are valid.
- Bugfix: Dont attempt compilation of uinput plugin if headers are
unavailable.
- Bugfix: Write a blank buffer to the LCD before exiting.
- Feature: Add --lcdlevel cmdline option to allow setting default LCD brightness level
1.9.3:
- BugFix: The documentation for --switch was inverted. Fix.
- Debug: Print list of commandline args when in debug mode
- BugFix: The decreased delay caused keypresses to be misread on some
machines. REVERT.
1.9.4
- Debug: Log warning if keyboard disappears.
- Bugfix: Fix autoconf autodetect bugs re uinput plugin.
- Feature: If autodetection of uinput fails, configure now has a
--disable-uinput override.
- Feature: WIP should now compile and run on Linux, MacOSX, and Solaris (v10+).
Only Linux and Solaris have been tested.
- Debug: Add more debugging to plugin loader.
- Debug: Log build date,OS and GCC version.
- Feature: Plugin loader will now use DEEP_BIND if available, hopefully
resolving conflicts on OS's that support it.
- Feature: Solaris support. Requires some end-user changes to the usb
stack at the moment. Documentation coming soon.
- BugFix: Plugin loader is now much more robust.
- Feature: Add OS specific documentation for Linux and FreeBSD.
Compilation and use on FreeBSD is completely untested.
- Feature: Debug verbosity of g15daemon_log is now variable.
- Feature: Plugin filenames are now cached in g15daemon.conf to allow
(manual, at this stage) changing of load-order.
- Portability: Add our own daemon() function if platform doesn't have native
support.
- TidyUp: Wrap keyboard read function.
- TidyUp: Make all plugin-internal functions static.
- Portability: Remove mutexes on Solaris, as libusb (and therefore libg15)
blocks on read.
- Optimisation: Use pthread conditional variable to signal LCD state change.
Further reduces unnecessary wakeups.
1.9.5
- Add example udev helper scripts to contrib directory.
- API: Add NEVER_SELECT cmd to client API to enforce non-display on
client-switch. Used by G15Macro if available.
- Debug: Add segfault handler to libg15daemon_client to aid debugging
clients.
- Feature: Add screendump ability. Pressing M1+M3 simultaneously will write
a pbm format image of the currently displayed screen to
/tmp/g15daemon-sc-?.pbm, where ? is an incremental number.
- BugFix: Only wakeup display thread if LCD buffer is visible.
- Packaging: Fix debian packaging to include plugins.
1.9.5.1:
- BugFix: If lcd refresh is requested whilst processing, refreshes were missed.
- Optimisation: The delay between screen updates is no longer required. remove.
1.9.5.2:
- BugFix: IS_USER_SELECTED client command was broken. fix it.
- BugFix: restore client ability to change backlight state.
+3 -2
View File
@@ -13,7 +13,8 @@ The current version of G15Daemon understands the following options:
\-v Show version info. \-v Show version info.
.P .P
.HP .HP
\-s By default, g15daemon uses the MR key to switch between client screens. Using this switch on the cmdline alters this, making L1 (the small, round, black button below the LCD) the button to achieve this function. \-s By default, g15daemon uses the L1 key to switch between client screens. Using this switch on the cmdline alters this, making
MR (Macro Record) the button to achieve this function.
.P .P
.HP .HP
\-k Stop a previously running copy of G15Daemon. For the keys and LCD to work, you'll have to restart the daemon manually. \-k Stop a previously running copy of G15Daemon. For the keys and LCD to work, you'll have to restart the daemon manually.
@@ -31,7 +32,7 @@ To run the daemon with default options, run:
or or
g15daemon \-s g15daemon \-s
to have the L1 key as the client screen switch. to have the MR key as the client screen switch.
If all required libraries are installed and in locations known to your operating system, the daemon will slip quietly into the background and a clock will appear on the LCD. If all required libraries are installed and in locations known to your operating system, the daemon will slip quietly into the background and a clock will appear on the LCD.
Congratulations! The linux kernel will now output keycodes for all your extra keys. Congratulations! The linux kernel will now output keycodes for all your extra keys.
+1 -2
View File
@@ -1,6 +1,5 @@
.TH "G15daemon Client Development" "" "1.0" "G15Daemon" "" .TH "G15daemon Client Development" "" "1.0" "G15Daemon" ""
.SH "NAME" .SH "NAME" g15daemon_client \- G15Daemon Server / Client communication for g15daemon.
g15daemon_client \- G15Daemon Server / Client communication for g15daemon.
.SH "SYNOPSIS" .SH "SYNOPSIS"
#include <libg15.h> #include <libg15.h>
.br .br
+63 -8
View File
@@ -1,16 +1,20 @@
This file contains some frequently asked questions and answers This file contains some frequently asked questions and answers
regarding G15Daemon and it's installation. regarding G15Daemon and it's installation.
Q1. G15daemon complains that it cant find libg15.so.1 !! Q1. G15daemon complains that it can't find libg15.so.1 !!
Q1a. G15daemon complains that it can't find libg15render.so.1 !!
Answer: Answer:
By default, libg15 is installed in /usr/local/lib. Some distros Some of the g15 libraries are installed in /usr/local/lib.
don't look there for libraries by default. There are two ways Some distros don't look there for libraries by default. There
around this - 1. add /usr/local/lib to /etc/ld.so.conf (you'll are two ways around this -
need to be root to do this) and run ldconfig or 2. rerun the
libg15 configure script with --prefix=/usr, then make && make in- 1. add /usr/local/lib to /etc/ld.so.conf (you'll need to be root)
stall. This will install libg15 into the /usr/lib directory. and run ldconfig or
2.rerun the library configure script with --prefix=/usr,then make
&& make install. This will install libg15 into the /usr/lib
directory.
Q2. G15daemon complains about not receiving a return value Q2. G15daemon complains about not receiving a return value
@@ -33,3 +37,54 @@ you'll find an xmodmaprc script and a bash script in the contrib
directory. Copy the xmodmaprc file to $HOME/.Xmodmap and set the directory. Copy the xmodmaprc file to $HOME/.Xmodmap and set the
bash script to run every time X11 starts. KDE has an AutoStart bash script to run every time X11 starts. KDE has an AutoStart
folder you can put it in, Gnome probably has something similar. folder you can put it in, Gnome probably has something similar.
Q4. What devices are currently supported with G15Daemon?
Answer:
G15Daemon is designed to support whatever devices libg15 supports.
Currently,this means the G15 Keyboard(s), the G11 Keyboard and Z10
Speakers.
Q5. Are there any forums supporting the G15Tools?
Answer:
Yes. There are several. G15Tools now has it's own site, including
forums, at www.g15tools.com.There are also forums on the g15daemon
project site: http://sourceforge.net/projects/g15daemon, and a few
Linux distributions have threads setup for G15Tools users.
Q6. Why doesn't G15Daemon use DBUS or DCOP?
Answer:
DBUS is a nice thing, however it's very new and is not available
everywhere. We try to keep dependancies to the minimum, and using
DBUS would mean we have to ensure that G15Daemon is loaded after
the DBUS server, which is something we can't guarantee. Down the
track we will look at providing a DBUS G15Daemon proxy.
Q7. Is G15Daemon able to run on my operating system?
Answer:
G15Daemon currently has support for Linux, MacOSX and Solaris.
Some Linux distributions include the G15Tools in their package
managers, however those may not be up-to-date.
FreeBSD support is possible, see README.FreeBSD for details on
how you can try it out. FreeBSD support is completely untested,
however it may work. Please let us know if it works for you.
Q8. Will G15Daemon ever run on Windows?
Answer:
It might, but not by design. There is commercial support from
Logitech for that operating system.
+10 -3
View File
@@ -2,10 +2,11 @@ LLIBDIR=@LIBDIR@
SUBDIRS = libg15daemon_client g15daemon plugins SUBDIRS = libg15daemon_client g15daemon plugins
INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon
EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE images
EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE images README.Linux README.FreeBSD README.Solaris
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
doc_DATA = FAQ README.usage README ChangeLog TODO AUTHORS NEWS LICENSE doc_DATA = FAQ README.usage README ChangeLog TODO AUTHORS NEWS LICENSE README.Linux README.FreeBSD README.Solaris
man1_MANS = $(top_srcdir)/Documentation/g15daemon.1 man1_MANS = $(top_srcdir)/Documentation/g15daemon.1
man3_MANS = $(top_srcdir)/Documentation/g15daemon_client_devel.3 man3_MANS = $(top_srcdir)/Documentation/g15daemon_client_devel.3
@@ -13,11 +14,17 @@ man3_MANS = $(top_srcdir)/Documentation/g15daemon_client_devel.3
imagedir = $(prefix)/share/g15daemon/splash imagedir = $(prefix)/share/g15daemon/splash
image_DATA = images/g15logo2.wbmp image_DATA = images/g15logo2.wbmp
install-data-hook:
if KEXT_INSTALL
cp -Rf $(top_srcdir)/contrib/libusbshield.kext @KEXT_LOCATION@
chown -R root:wheel @KEXT_LOCATION@/libusbshield.kext
endif
dist-hook: dist-hook:
rm -rf `find $(distdir)/debian -name .svn` rm -rf `find $(distdir)/debian -name .svn`
rm -rf `find $(distdir)/contrib -name .svn` rm -rf `find $(distdir)/contrib -name .svn`
rm -rf `find $(distdir)/Documentation -name .svn` rm -rf `find $(distdir)/Documentation -name .svn`
rm -rf `find $(distdir)/lang_bindings -name .svn` rm -rf `find $(distdir)/lang-bindings -name .svn`
rm -rf `find $(distdir)/patches -name .svn` rm -rf `find $(distdir)/patches -name .svn`
rm -rf `find $(distdir)/rpm -name .svn` rm -rf `find $(distdir)/rpm -name .svn`
rm -rf `find $(distdir)/plugins -name .svn` rm -rf `find $(distdir)/plugins -name .svn`
+93 -69
View File
@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -14,15 +14,11 @@
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
@@ -36,18 +32,19 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
TODO config/config.guess config/config.sub config/depcomp \ TODO config/config.guess config/config.sub config/depcomp \
config/install-sh config/ltmain.sh config/missing config/install-sh config/ltmain.sh config/missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
@@ -55,10 +52,11 @@ SOURCES =
DIST_SOURCES = DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \ html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \ install-dvi-recursive install-exec-recursive \
install-recursive installcheck-recursive installdirs-recursive \ install-html-recursive install-info-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \
uninstall-recursive installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
man1dir = $(mandir)/man1 man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \ am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \
"$(DESTDIR)$(docdir)" "$(DESTDIR)$(imagedir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(imagedir)"
@@ -74,6 +72,8 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
docDATA_INSTALL = $(INSTALL_DATA) docDATA_INSTALL = $(INSTALL_DATA)
imageDATA_INSTALL = $(INSTALL_DATA) imageDATA_INSTALL = $(INSTALL_DATA)
DATA = $(doc_DATA) $(image_DATA) DATA = $(doc_DATA) $(image_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = $(SUBDIRS)
@@ -89,8 +89,6 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AR = @AR@ AR = @AR@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
@@ -117,11 +115,14 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ F77 = @F77@
FFLAGS = @FFLAGS@ FFLAGS = @FFLAGS@
G15DAEMON_PLUGIN_DIR = @G15DAEMON_PLUGIN_DIR@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KEXT_LOCATION = @KEXT_LOCATION@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
@@ -129,6 +130,7 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -138,17 +140,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@ ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@@ -160,6 +163,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
@@ -187,13 +191,20 @@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
LLIBDIR = @LIBDIR@ LLIBDIR = @LIBDIR@
SUBDIRS = libg15daemon_client g15daemon plugins SUBDIRS = libg15daemon_client g15daemon plugins
INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon
EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE images EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE images README.Linux README.FreeBSD README.Solaris
doc_DATA = FAQ README.usage README ChangeLog TODO AUTHORS NEWS LICENSE doc_DATA = FAQ README.usage README ChangeLog TODO AUTHORS NEWS LICENSE README.Linux README.FreeBSD README.Solaris
man1_MANS = $(top_srcdir)/Documentation/g15daemon.1 man1_MANS = $(top_srcdir)/Documentation/g15daemon.1
man3_MANS = $(top_srcdir)/Documentation/g15daemon_client_devel.3 man3_MANS = $(top_srcdir)/Documentation/g15daemon_client_devel.3
imagedir = $(prefix)/share/g15daemon/splash imagedir = $(prefix)/share/g15daemon/splash
@@ -239,7 +250,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
config.h: stamp-h1 config.h: stamp-h1
@if test ! -f $@; then \ @if test ! -f $@; then \
rm -f stamp-h1; \ rm -f stamp-h1; \
$(MAKE) stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@@ -261,10 +272,9 @@ clean-libtool:
distclean-libtool: distclean-libtool:
-rm -f libtool -rm -f libtool
uninstall-info-am:
install-man1: $(man1_MANS) $(man_MANS) install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \ for i in $$l2; do \
@@ -309,7 +319,7 @@ uninstall-man1:
done done
install-man3: $(man3_MANS) $(man_MANS) install-man3: $(man3_MANS) $(man_MANS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)" test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \ for i in $$l2; do \
@@ -354,7 +364,7 @@ uninstall-man3:
done done
install-docDATA: $(doc_DATA) install-docDATA: $(doc_DATA)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)" test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
@list='$(doc_DATA)'; for p in $$list; do \ @list='$(doc_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
@@ -371,7 +381,7 @@ uninstall-docDATA:
done done
install-imageDATA: $(image_DATA) install-imageDATA: $(image_DATA)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(imagedir)" || $(mkdir_p) "$(DESTDIR)$(imagedir)" test -z "$(imagedir)" || $(MKDIR_P) "$(DESTDIR)$(imagedir)"
@list='$(image_DATA)'; for p in $$list; do \ @list='$(image_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
@@ -418,8 +428,7 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail" fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \ $(RECURSIVE_CLEAN_TARGETS):
maintainer-clean-recursive:
@failcom='exit 1'; \ @failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \ for f in x $$MAKEFLAGS; do \
case $$f in \ case $$f in \
@@ -521,24 +530,22 @@ distclean-tags:
distdir: $(DISTFILES) distdir: $(DISTFILES)
$(am__remove_distdir) $(am__remove_distdir)
mkdir $(distdir) test -d $(distdir) || mkdir $(distdir)
$(mkdir_p) $(distdir)/config @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; \
list='$(DISTFILES)'; for file in $$list; do \ dist_files=`for file in $$list; do echo $$file; done | \
case $$file in \ sed -e "s|^$$srcdirstrip/||;t" \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \ esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
@@ -552,7 +559,7 @@ distdir: $(DISTFILES)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \ if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \ test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \ || exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \ distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -560,6 +567,8 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \ $(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \ top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \ distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \ distdir) \
|| exit 1; \ || exit 1; \
fi; \ fi; \
@@ -570,7 +579,7 @@ distdir: $(DISTFILES)
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir) || chmod -R a+r $(distdir)
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -645,7 +654,7 @@ distcheck: dist
$(am__remove_distdir) $(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \ @(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck: distuninstallcheck:
@cd $(distuninstallcheck_dir) \ @cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -670,7 +679,7 @@ all-am: Makefile $(MANS) $(DATA) config.h
installdirs: installdirs-recursive installdirs: installdirs-recursive
installdirs-am: installdirs-am:
for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(imagedir)"; do \ for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(imagedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-recursive install: install-recursive
install-exec: install-exec-recursive install-exec: install-exec-recursive
@@ -717,13 +726,23 @@ info: info-recursive
info-am: info-am:
install-data-am: install-docDATA install-imageDATA install-man install-data-am: install-docDATA install-imageDATA install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-recursive
install-exec-am: install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive install-info: install-info-recursive
install-man: install-man1 install-man3 install-man: install-man1 install-man3
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-recursive maintainer-clean: maintainer-clean-recursive
@@ -744,37 +763,42 @@ ps: ps-recursive
ps-am: ps-am:
uninstall-am: uninstall-docDATA uninstall-imageDATA uninstall-info-am \ uninstall-am: uninstall-docDATA uninstall-imageDATA uninstall-man
uninstall-man
uninstall-info: uninstall-info-recursive
uninstall-man: uninstall-man1 uninstall-man3 uninstall-man: uninstall-man1 uninstall-man3
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
check-am clean clean-generic clean-libtool clean-recursive \ install-data-am install-strip
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-docDATA install-exec install-exec-am install-imageDATA \
install-info install-info-am install-man install-man1 \
install-man3 install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-libtool \
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-docDATA uninstall-imageDATA \
uninstall-info-am uninstall-man uninstall-man1 uninstall-man3
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
distclean distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-hook install-docDATA \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-imageDATA install-info \
install-info-am install-man install-man1 install-man3 \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-docDATA uninstall-imageDATA uninstall-man \
uninstall-man1 uninstall-man3
install-data-hook:
@KEXT_INSTALL_TRUE@ cp -Rf $(top_srcdir)/contrib/libusbshield.kext @KEXT_LOCATION@
@KEXT_INSTALL_TRUE@ chown -R root:wheel @KEXT_LOCATION@/libusbshield.kext
dist-hook: dist-hook:
rm -rf `find $(distdir)/debian -name .svn` rm -rf `find $(distdir)/debian -name .svn`
rm -rf `find $(distdir)/contrib -name .svn` rm -rf `find $(distdir)/contrib -name .svn`
rm -rf `find $(distdir)/Documentation -name .svn` rm -rf `find $(distdir)/Documentation -name .svn`
rm -rf `find $(distdir)/lang_bindings -name .svn` rm -rf `find $(distdir)/lang-bindings -name .svn`
rm -rf `find $(distdir)/patches -name .svn` rm -rf `find $(distdir)/patches -name .svn`
rm -rf `find $(distdir)/rpm -name .svn` rm -rf `find $(distdir)/rpm -name .svn`
rm -rf `find $(distdir)/plugins -name .svn` rm -rf `find $(distdir)/plugins -name .svn`
+5 -4
View File
@@ -1,8 +1,8 @@
** README G15Daemon 1.2 ** ** README G15Daemon 1.2 **
$Revision: 214 $ $Revision: 357 $
$Date: 2006-12-25 13:08:09 +1030 (Mon, 25 Dec 2006) $ $Date: 2007-12-26 19:36:11 +1030 (Wed, 26 Dec 2007) $
$Author: aneurysm9 $ $Author: mlampard $
G15daemon takes control of the G15 keyboard, allowing the use of G15daemon takes control of the G15 keyboard, allowing the use of
@@ -45,7 +45,8 @@ LCD clients, and cannot be used for other purposes if the
LCD is being used. LCD is being used.
[EDIT] As of 30/10/06 svn, the client switch key can be altered [EDIT] As of 30/10/06 svn, the client switch key can be altered
from MR to L1 by specifying -s on the g15daemon commandline. from L1 to MR by specifying -s on the g15daemon commandline. This
is not recommended.
*** ***
+30
View File
@@ -0,0 +1,30 @@
$Revision: 377 $
$Date: 2008-01-01 21:56:13 +1030 (Tue, 01 Jan 2008) $
$Author: mlampard $
**** IMPORTANT NOTICE *******************************************************
*** Please Note: G15Daemon is completely untested on FreeBSD.
*** Please report success or failure, any additional steps taken
*** and Operating System version to mlampard@users.sf.net
******************************************************************************
In order for G15Daemon to be able to claim the usb device needed for the LCD and extra keys,
the following _kernel_ configuration changes may be necessary:
First test if ugen is already enabled:
- Plug in the keyboard or other supported USB device.
- dmesg |grep "ugen"
- you should see a line similar to "ugen0: Logitech G15 Keyboard"
If not already enabled:
For FreeBSD versions 5.4 and below, and version 6.0:
Disable uhid
Enable ugen
For FreeBSD versions 5.5, 6.1 and higher:
Enable ugen
Recompile the kernel and reboot.
NetBSD and OpenBSD are not supported at this time due to libusb deficiencies on those platforms.
+7
View File
@@ -0,0 +1,7 @@
$Revision: 377 $
$Date: 2008-01-01 21:56:13 +1030 (Tue, 01 Jan 2008) $
$Author: mlampard $
G15Daemon should compile and run just fine with no intervention.
Please read the README and manpages for further info.
+124
View File
@@ -0,0 +1,124 @@
*************************************************************************************************
Solaris 10+ support is here as of Jan-1-2008
G15 Daemon 1.9.4
LibG15Render-1.2
LibG15-1.2.5
Fully tested on Solaris 10 and and OpenSolaris 11 (Nevada) with G15 Version 1 and G15 Version 2.
The other keyboards should function but I have not tested them.
I will be trying to keep up with new versions and providing packages as needed.
All packages are in SV datastream format.
You can install them using 'pkgadd -d http://URL to package all'
*************************************************************************************************
G15 Daemon requires Solaris 10 and later with libusb installed.
SUNWlibusb Sun wrapper library for libusb
SUNWlibusbS libusb (source)
SUNWlibusbugen SUN libusb ugen plugin
SUNWlibusbugenS libusbugen plugin (source)
*************************************************************************************************
Compiling from source :
Note : Compiling code on Opensolaris 11 (Nevada) does not guarantee
the binaries will be functional on Solaris 10.
*************************************************************************************************
If installing from SVN you must have the following packages from http://sunfreeware.com
installed into /usr/local/bin :
autoconf-2.60-sol10-x86-local
automake-1.10-sol10-x86-local
libiconv-1.11-sol10-x86-local
make-3.81-sol10-x86-local
perl-5.8.8-sol10-x86-local
gcc-3.4.6-sol10-x86-local
libtool-1.5.24-sol10-x86-local
m4-1.4.7-sol10-x86-local
When compiling LibG15 from SVN you may need to set
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/sfw/lib:/opt/g15/lib
export LD_LIBRARY_PATH
If installing from a release source package you must fist compile and install
at least LibG15 1.2.5 and LibG15Render-1.2.
No other packages are required.
Successfully configure options are as follows :
./configure --prefix=/opt/g15 'LDFLAGS='-L/usr/sfw/lib -L/opt/g15/lib' \
'CPPFLAGS=-I/usr/sfw/include -I/opt/g15/include' && gmake && gmake install
*************************************************************************************************
* The following script can be used to configure the device support to Solaris and Opensolaris.
* G15Daemon runs as user nobody so we must provide read/write permissions for user nobody
* or you must run g15daemon with the option : --user root
*************************************************************************************************
#!/bin/ksh
exec 2>/dev/null
echo "Verifying the ugen driver"
add_drv -m '* 0666 root sys' -i 'ugen' ugen
echo "Adding driver support for Logitech G15 V1"
/usr/sbin/update_drv -a -m '* 0660 nobody sys' -i '"usb46d,c222"' ugen
echo "Adding driver support for Logitech G15 V2"
/usr/sbin/update_drv -a -m '* 0660 nobody sys' -i '"usb46d,c227"' ugen
echo "Adding driver support for Logitech G11 V1"
/usr/sbin/update_drv -a -m '* 0660 nobody sys' -i '"usb46d,c225"' ugen
echo "Adding driver support for Logitech Z-10 V1"
/usr/sbin/update_drv -a -m '* 0660 nobody sys' -i '"usb46d,0a07"' ugen
echo "Finished installing device support."
touch /reconfigure
echo "You must reboot to enable ugen in your device tree"
*************************************************************************************************
The following XML document can be used to integrate G15Daemon into SMF.
1. Save it to a file (Suggested location is /var/svc/manifest/site/g15daemon.xml)
2. verify using 'svccfg validate /path_to_file'
3. import using 'svccfg import /path_to_file'
4. enable using 'svcadm enable g15daemon'
*************************************************************************************************
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='SCIG15daemon:default'>
<service name='site/g15daemon' type='service' version='1'>
<create_default_instance enabled='false' />
<single_instance />
<dependency name='localfs' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='loopback' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/loopback' />
</dependency>
<dependency name='device_files' grouping='require_any' restart_on='restart' type='path'>
<service_fmri value='file://localhost/dev/usb/46d.c222' />
<service_fmri value='file://localhost/dev/usb/46d.c225' />
<service_fmri value='file://localhost/dev/usb/46d.c227' />
<service_fmri value='file://localhost/dev/usb/46d.0a07' />
</dependency>
<exec_method type='method' name='start' exec='/opt/g15/sbin/g15daemon' timeout_seconds='60'/>
<exec_method type='method' name='stop' exec='/opt/g15/sbin/g15daemon -k' timeout_seconds='60' />
<stability value='Unstable' />
<template>
<common_name><loctext xml:lang='C'>G15daemon</loctext></common_name>
<documentation>
<manpage title='g15daemon' section='1' manpath='/opt/g15/share/man' />
<manpage title='g15daemon_client_devl' section='3' manpath='/opt/g15/share/man' />
</documentation>
</template>
</service>
</service_bundle>
*************************************************************************************************
Please read the README and manpages for further info.
*************************************************************************************************
+4 -3
View File
@@ -5,12 +5,11 @@ TODO list for G15daemon. Not in any particular order.
PARTIALLY DONE - Add manpage and other documentation for the client library and it's PARTIALLY DONE - Add manpage and other documentation for the client library and it's
bindings. bindings.
- Add client to record & playback macros (being worked on) DONE (G15Macro) - Add client to record & playback macros.
- add a few simple template client examples in various languages - add a few simple template client examples in various languages
- Read a configuration file. Currently there are no real user-configurable DONE - Read a configuration file.
options, but ....
DONE - Allow for clients to change LCD backlight. DONE - Allow for clients to change LCD backlight.
@@ -32,3 +31,5 @@ will allow the client app to exit without taking the screen with them.
use the 'screen' they previously created, as long as they return within the use the 'screen' they previously created, as long as they return within the
'time-to-live' period they set before exiting. This will allow for scripts 'time-to-live' period they set before exiting. This will allow for scripts
etc to periodically update. etc to periodically update.
- Add DBUS proxy.
Vendored
+935 -485
View File
File diff suppressed because it is too large. Load diff
+36
View File
@@ -1,11 +1,32 @@
/* config.h.in. Generated from configure.in by autoheader. */ /* config.h.in. Generated from configure.in by autoheader. */
/* Date of compilation */
#undef BUILD_DATE
/* Build OS Particulars */
#undef BUILD_OS_NAME
/* Compiler Version */
#undef COMPILER_VERSION
/* Define to 1 if you have the <arpa/inet.h> header file. */ /* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H #undef HAVE_ARPA_INET_H
/* Define to 1 if you have the `backtrace' function. */
#undef HAVE_BACKTRACE
/* Define to 1 if you have the `backtrace_symbols' function. */
#undef HAVE_BACKTRACE_SYMBOLS
/* Define if daemon() is available */
#undef HAVE_DAEMON
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H #undef HAVE_DLFCN_H
/* Define to 1 if you have the <execinfo.h> header file. */
#undef HAVE_EXECINFO_H
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
@@ -84,6 +105,21 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define if libusb implementation blocks on read or write */
#undef LIBUSB_BLOCKS
/* Target OS is Darwin */
#undef OSTYPE_DARWIN
/* Target OS is Linux */
#undef OSTYPE_LINUX
/* Target OS is unknown */
#undef OSTYPE_OTHER
/* Target OS is Solaris */
#undef OSTYPE_SOLARIS
/* Name of package */ /* Name of package */
#undef PACKAGE #undef PACKAGE
+64 -14
View File
@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
timestamp='2005-08-03' timestamp='2007-05-17'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ; : ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;; arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;; sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;; sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac esac
# The Operating System including object format, if it has switched # The Operating System including object format, if it has switched
@@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*) *:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;; exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*) macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE} echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;; exit ;;
*:MirBSD:*:*) *:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -325,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
i86pc:SunOS:5.*:*) i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
sun4*:SunOS:6*:*) sun4*:SunOS:6*:*)
@@ -764,12 +769,19 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;; exit ;;
*:FreeBSD:*:*) *:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;; exit ;;
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
exit ;; exit ;;
i*:MINGW*:*) *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
i*:windows32*:*) i*:windows32*:*)
@@ -779,9 +791,15 @@ EOF
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit ;; exit ;;
x86:Interix*:[34]*) *:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;; exit ;;
EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks echo i${UNAME_MACHINE}-pc-mks
exit ;; exit ;;
@@ -817,6 +835,9 @@ EOF
arm*:Linux:*:*) arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*) cris:Linux:*:*)
echo cris-axis-linux-gnu echo cris-axis-linux-gnu
exit ;; exit ;;
@@ -851,7 +872,11 @@ EOF
#endif #endif
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;; ;;
mips64:Linux:*:*) mips64:Linux:*:*)
@@ -870,7 +895,11 @@ EOF
#endif #endif
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;; ;;
or32:Linux:*:*) or32:Linux:*:*)
@@ -919,9 +948,15 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*) sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*) x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu echo x86_64-unknown-linux-gnu
exit ;; exit ;;
xtensa:Linux:*:*)
echo xtensa-unknown-linux-gnu
exit ;;
i*86:Linux:*:*) i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so # The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent # first see if it will tell us. cd to the root directory to prevent
@@ -964,7 +999,7 @@ EOF
LIBC=gnulibc1 LIBC=gnulibc1
# endif # endif
#else #else
#ifdef __INTEL_COMPILER #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu LIBC=gnu
#else #else
LIBC=gnuaout LIBC=gnuaout
@@ -974,7 +1009,11 @@ EOF
LIBC=dietlibc LIBC=dietlibc
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && { test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}" echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit exit
@@ -1176,6 +1215,15 @@ EOF
SX-6:SUPER-UX:*:*) SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE} echo sx6-nec-superux${UNAME_RELEASE}
exit ;; exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*) Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE} echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;; exit ;;
@@ -1185,7 +1233,6 @@ EOF
*:Darwin:*:*) *:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;; unknown) UNAME_PROCESSOR=powerpc ;;
esac esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1264,6 +1311,9 @@ EOF
i*86:skyos:*:*) i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;; exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
esac esac
#echo '(No uname command or uname output not recognized.)' 1>&2 #echo '(No uname command or uname output not recognized.)' 1>&2
+77 -30
View File
@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
timestamp='2005-07-08' timestamp='2007-04-29'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@@ -119,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
@@ -171,6 +173,10 @@ case $os in
-hiux*) -hiux*)
os=-hiuxwe2 os=-hiuxwe2
;; ;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5) -sco5)
os=-sco3.2v5 os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer. # Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*) -sco*)
os=-sco3.2v2 os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,15 +241,16 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \ | am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \ | bfin \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| fr30 | frv \ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \ | mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \ | mips16 \
| mips64 | mips64el \ | mips64 | mips64el \
@@ -257,28 +268,27 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \ | mipstx39 | mipstx39el \
| mn10200 | mn10300 \ | mn10200 | mn10300 \
| ms1 \ | mt \
| msp430 \ | msp430 \
| nios | nios2 \
| ns16k | ns32k \ | ns16k | ns32k \
| or32 \ | or32 \
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \ | pyramid \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \ | sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| strongarm \ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \ | tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \ | v850 | v850e \
| we32k \ | we32k \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k) | z8k)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
;; ;;
m32c)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12) m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12. # Motorola 68HC11/12.
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
@@ -286,6 +296,9 @@ case $basic_machine in
;; ;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;; ;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown' # We use `pc' rather than `unknown'
# because (1) that's what they normally are, and # because (1) that's what they normally are, and
@@ -305,18 +318,18 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \ | avr-* | avr32-* \
| bfin-* | bs2000-* \ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \ | ip2k-* | iq2000-* \
| m32r-* | m32rle-* \ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \ | m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -336,31 +349,30 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \ | mipstx39-* | mipstx39el-* \
| mmix-* \ | mmix-* \
| ms1-* \ | mt-* \
| msp430-* \ | msp430-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \ | orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \ | pyramid-* \
| romp-* | rs6000-* \ | romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \ | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \ | tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \ | tron-* \
| v850-* | v850e-* | vax-* \ | v850-* | v850e-* | vax-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \ | xstormy16-* | xtensa-* \
| ymp-* \ | ymp-* \
| z8k-*) | z8k-*)
;; ;;
m32c-*)
;;
# Recognize the various machine names and aliases which stand # Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS. # for a CPU type and a company and sometimes even an OS.
386bsd) 386bsd)
@@ -671,6 +683,10 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-mingw32 os=-mingw32
;; ;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe) miniframe)
basic_machine=m68000-convergent basic_machine=m68000-convergent
;; ;;
@@ -696,6 +712,9 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-msdos os=-msdos
;; ;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs) mvs)
basic_machine=i370-ibm basic_machine=i370-ibm
os=-mvs os=-mvs
@@ -803,6 +822,12 @@ case $basic_machine in
pc532 | pc532-*) pc532 | pc532-*)
basic_machine=ns32k-pc532 basic_machine=ns32k-pc532
;; ;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3) pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc basic_machine=i586-pc
;; ;;
@@ -859,6 +884,10 @@ case $basic_machine in
basic_machine=i586-unknown basic_machine=i586-unknown
os=-pw32 os=-pw32
;; ;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k) rom68k)
basic_machine=m68k-rom68k basic_machine=m68k-rom68k
os=-coff os=-coff
@@ -885,6 +914,10 @@ case $basic_machine in
sb1el) sb1el)
basic_machine=mipsisa64sb1el-unknown basic_machine=mipsisa64sb1el-unknown
;; ;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei) sei)
basic_machine=mips-sei basic_machine=mips-sei
os=-seiux os=-seiux
@@ -896,6 +929,9 @@ case $basic_machine in
basic_machine=sh-hitachi basic_machine=sh-hitachi
os=-hms os=-hms
;; ;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64) sh64)
basic_machine=sh64-unknown basic_machine=sh64-unknown
;; ;;
@@ -1101,7 +1137,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown basic_machine=sh-unknown
;; ;;
sparc | sparcv8 | sparcv9 | sparcv9b) sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun basic_machine=sparc-sun
;; ;;
cydra) cydra)
@@ -1174,21 +1210,23 @@ case $os in
| -aos* \ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \ | -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@@ -1340,6 +1378,12 @@ else
# system, and we'll never get to this point. # system, and we'll never get to this point.
case $basic_machine in case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn) *-acorn)
os=-riscix1.2 os=-riscix1.2
;; ;;
@@ -1377,6 +1421,9 @@ case $basic_machine in
m68*-cisco) m68*-cisco)
os=-aout os=-aout
;; ;;
mep-*)
os=-elf
;;
mips*-cisco) mips*-cisco)
os=-elf os=-elf
;; ;;
+59 -5
View File
@@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11 scriptversion=2006-10-15.18
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@@ -91,7 +92,20 @@ gcc3)
## gcc 3 implements dependency tracking that does exactly what ## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm. ## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile" ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$? stat=$?
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
@@ -276,6 +290,46 @@ icc)
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
;; ;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64) tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side # The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -288,13 +342,13 @@ tru64)
if test "$libtool" = yes; then if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a # With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to # static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation. # handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
# #
# With libtool 1.5 this exception was removed, and libtool now # With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two # generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and # compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because # in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer # one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+251 -67
View File
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2005-05-14.22 scriptversion=2006-10-14.15
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@@ -39,15 +39,24 @@ scriptversion=2005-05-14.22
# when there is no Makefile. # when there is no Makefile.
# #
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction # from scratch.
# shared with many OS's install programs.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script # set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it. # Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}" doit="${DOITPROG-}"
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# put in absolute paths if you don't have them in your path; or use env. vars. # Put in absolute file names if you don't have them in your path;
# or use environment vars.
mvprog="${MVPROG-mv}" mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}" cpprog="${CPPROG-cp}"
@@ -58,7 +67,13 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}" rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}" mkdirprog="${MKDIRPROG-mkdir}"
chmodcmd="$chmodprog 0755" posix_glob=
posix_mkdir=
# Desired mode of installed file.
mode=0755
chmodcmd=$chmodprog
chowncmd= chowncmd=
chgrpcmd= chgrpcmd=
stripcmd= stripcmd=
@@ -95,7 +110,7 @@ Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
" "
while test -n "$1"; do while test $# -ne 0; do
case $1 in case $1 in
-c) shift -c) shift
continue;; continue;;
@@ -111,9 +126,15 @@ while test -n "$1"; do
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2" -m) mode=$2
shift shift
shift shift
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
continue;; continue;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
@@ -136,9 +157,19 @@ while test -n "$1"; do
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create. --) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
done
if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@. # Otherwise, the last argument is the destination. Remove it from $@.
for arg for arg
do do
@@ -150,11 +181,9 @@ while test -n "$1"; do
shift # arg shift # arg
dstarg=$arg dstarg=$arg
done done
break;; fi
esac
done
if test -z "$1"; then if test $# -eq 0; then
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2 echo "$0: no input file specified." >&2
exit 1 exit 1
@@ -164,6 +193,33 @@ if test -z "$1"; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src for src
do do
# Protect names starting with `-'. # Protect names starting with `-'.
@@ -173,15 +229,11 @@ do
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
dst=$src dst=$src
src= dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad # might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'. # if $src (and thus $dsttmp) contains '*'.
@@ -208,53 +260,188 @@ do
echo "$0: $dstarg: Is a directory" >&2 echo "$0: $dstarg: Is a directory" >&2
exit 1 exit 1
fi fi
dst=$dst/`basename "$src"` dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi fi
fi fi
# This sed command emulates the dirname command. obsolete_mkdir_used=false
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists. if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
# Skip lots of stat calls in the usual case. *[0-7])
if test ! -d "$dstdir"; then mkdir_umask=`expr $umask + 22 \
defaultIFS=' - $umask % 100 % 40 + $umask % 20 \
' - $umask % 10 % 4 + $umask % 2
IFS="${IFS-$defaultIFS}" `;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix=/ ;;
-*) prefix=./ ;;
*) prefix= ;;
esac
case $posix_glob in
'')
if (set -f) 2>/dev/null; then
posix_glob=true
else
posix_glob=false
fi ;;
esac
oIFS=$IFS oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason. IFS=/
IFS='%' $posix_glob && set -f
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` set fnord $dstdir
shift shift
$posix_glob && set +f
IFS=$oIFS IFS=$oIFS
pathcomp= prefixes=
while test $# -ne 0 ; do for d
pathcomp=$pathcomp$1 do
shift test -z "$d" && continue
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp" prefix=$prefix$d
# mkdir can fail with a `File exist' error in case several if test -d "$prefix"; then
# install-sh are creating the directory concurrently. This prefixes=
# is OK. else
test -d "$pathcomp" || exit if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi fi
pathcomp=$pathcomp/ fi
prefix=$prefix/
done done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi fi
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=$dstdir/_inst.$$_
@@ -262,10 +449,9 @@ do
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name. # Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" && (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@@ -276,10 +462,10 @@ do
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|| { || {
# The rename failed, perhaps because mv can't rename something else # The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
@@ -291,11 +477,12 @@ do
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
if test -f "$dstdir/$dstfile"; then if test -f "$dst"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ $doit $rmcmd -f "$dst" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|| { || {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
else else
@@ -304,16 +491,13 @@ do
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile" $doit $mvcmd "$dsttmp" "$dst"
} }
} } || exit 1
fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap. trap '' 0
{ fi
(exit 0); exit 0 done
}
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-hooks 'time-stamp)
+562 -172
View File
File diff suppressed because it is too large. Load diff
+34 -27
View File
@@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Common stub for a few missing GNU programs while installing. # Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21 scriptversion=2006-05-10.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@@ -33,6 +33,8 @@ if test $# -eq 0; then
fi fi
run=: run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the # In the cases where this matters, `missing' is being run in the
# srcdir already. # srcdir already.
@@ -44,7 +46,7 @@ fi
msg="missing on your system" msg="missing on your system"
case "$1" in case $1 in
--run) --run)
# Try to run requested program, and just exit if it succeeds. # Try to run requested program, and just exit if it succeeds.
run= run=
@@ -77,6 +79,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4' aclocal touch file \`aclocal.m4'
autoconf touch file \`configure' autoconf touch file \`configure'
autoheader touch file \`config.h.in' autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch] bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c flex create \`lex.yy.c', if possible, from existing .c
@@ -106,7 +109,7 @@ esac
# Now exit if we have it, but it failed. Also exit now if we # Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect # don't have it and --version was passed (most likely to detect
# the program). # the program).
case "$1" in case $1 in
lex|yacc) lex|yacc)
# Not GNU programs, they don't have --version. # Not GNU programs, they don't have --version.
;; ;;
@@ -135,7 +138,7 @@ esac
# If it does not exist, or fails to run (possibly an outdated version), # If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it. # try to emulate it.
case "$1" in case $1 in
aclocal*) aclocal*)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if WARNING: \`$1' is $msg. You should only need it if
@@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h" test -z "$files" && files="config.h"
touch_files= touch_files=
for f in $files; do for f in $files; do
case "$f" in case $f in
*:*) touch_files="$touch_files "`echo "$f" | *:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;; sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";; *) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU You can get \`$1' as part of \`Autoconf' from any GNU
archive site." archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then if test -f "$file"; then
touch $file touch $file
else else
@@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site." \`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then if test $# -ne 1; then
eval LASTARG="\${$#}" eval LASTARG="\${$#}"
case "$LASTARG" in case $LASTARG in
*.y) *.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c cp "$SRCFILE" y.tab.c
fi fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h cp "$SRCFILE" y.tab.h
fi fi
;; ;;
esac esac
fi fi
if [ ! -f y.tab.h ]; then if test ! -f y.tab.h; then
echo >y.tab.h echo >y.tab.h
fi fi
if [ ! -f y.tab.c ]; then if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c echo 'main() { return 0; }' >y.tab.c
fi fi
;; ;;
@@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site." \`Flex' from any GNU archive site."
rm -f lex.yy.c rm -f lex.yy.c
if [ $# -ne 1 ]; then if test $# -ne 1; then
eval LASTARG="\${$#}" eval LASTARG="\${$#}"
case "$LASTARG" in case $LASTARG in
*.l) *.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c cp "$SRCFILE" lex.yy.c
fi fi
;; ;;
esac esac
fi fi
if [ ! -f lex.yy.c ]; then if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c echo 'main() { return 0; }' >lex.yy.c
fi fi
;; ;;
@@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if
\`Help2man' package in order for those modifications to take \`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site." effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` file=`echo "$*" | sed -n "$sed_output"`
if test -z "$file"; then test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` if test -f "$file"; then
fi
if [ -f "$file" ]; then
touch $file touch $file
else else
test -z "$file" || exec >$file test -z "$file" || exec >$file
@@ -289,11 +290,17 @@ WARNING: \`$1' is $msg. You should only need it if
DU, IRIX). You might want to install the \`Texinfo' package or DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site." the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ... # The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then if test -z "$file"; then
# ... or it is the one specified with @setfilename ... # ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info) # ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi fi
@@ -317,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi fi
firstarg="$1" firstarg="$1"
if shift; then if shift; then
case "$firstarg" in case $firstarg in
*o*) *o*)
firstarg=`echo "$firstarg" | sed s/o//` firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0 tar "$firstarg" "$@" && exit 0
;; ;;
esac esac
case "$firstarg" in case $firstarg in
*h*) *h*)
firstarg=`echo "$firstarg" | sed s/h//` firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0 tar "$firstarg" "$@" && exit 0
Vendored
+4094 -5021
View File
File diff suppressed because it is too large. Load diff
+101 -28
View File
@@ -1,19 +1,23 @@
# -*- Autoconf -*- # -*- Autoconf -*-
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
# $Revision: 214 $ - $Date: 2006-12-25 13:08:09 +1030 (Mon, 25 Dec 2006) $ $Author: aneurysm9 $ # $Revision: 450 $ - $Date: 2008-01-24 19:59:54 +1030 (Thu, 24 Jan 2008) $ $Author: mlampard $
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT(g15daemon, [1.9.0], [mlampard@users.sf.net]) AC_INIT(g15daemon, [1.9.5.2], [mlampard@users.sf.net])
AC_PREFIX_DEFAULT(/usr) AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_AUX_DIR(config) AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_HOST()
AC_CANONICAL_TARGET()
AM_INIT_AUTOMAKE() AM_INIT_AUTOMAKE()
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADER([config.h])
AC_LIBTOOL_DLOPEN
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
AC_PROG_RANLIB
# Checks for libraries. # Checks for libraries.
AC_CHECK_LIB([g15], [initLibG15],,AC_MSG_ERROR(["libg15 (or its devel package) not found. please install it"])) AC_CHECK_LIB([g15], [initLibG15],,AC_MSG_ERROR(["libg15 (or its devel package) not found. please install it"]))
@@ -21,30 +25,7 @@ AC_CHECK_LIB([g15render], [g15r_loadWbmpSplash],,AC_MSG_ERROR([">=libg15render-1
AC_CHECK_LIB([m], [sin]) AC_CHECK_LIB([m], [sin])
AC_CHECK_LIB([pthread], [pthread_mutex_init]) AC_CHECK_LIB([pthread], [pthread_mutex_init])
# Checks for header files. AC_CHECK_FUNC(daemon,AC_DEFINE(HAVE_DAEMON,1,[Define if daemon() is available]),[])
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ linux/input.h ])
AC_CHECK_HEADERS([ linux/uinput.h arpa/inet.h fcntl.h stdlib.h string.h sys/socket.h unistd.h libg15.h], [], [],
[#if HAVE_LINUX_INPUT_H
#include <linux/input.h>
#endif
])
#if HAVE_LINUX_UINPUT_H
dnl check for uinput.h version 2.4 or 2.6 ?
AC_CHECK_MEMBER([struct uinput_user_dev.id],
[AC_DEFINE(HAVE_UINPUT_USER_DEV_ID, 1,
[Define if struct uinput_user_dev has id member.])],,
[
#include <linux/input.h>
#include <linux/uinput.h>
]
)
dnl end of uinput version checks
#endif
CPPFLAGS=$CPPFLAGS_save
CPPFLAGS="$CPPFLAGS "'-DDATADIR="\"$(datadir)\""'
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
@@ -55,7 +36,99 @@ AC_TYPE_SIZE_T
AC_PROG_GCC_TRADITIONAL AC_PROG_GCC_TRADITIONAL
AC_FUNC_SELECT_ARGTYPES AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STRFTIME AC_FUNC_STRFTIME
AC_CHECK_FUNCS([memset select socket strerror]) AC_CHECK_FUNCS([memset select socket strerror backtrace backtrace_symbols])
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ linux/input.h ])
AC_CHECK_HEADERS([ execinfo.h ])
AC_CHECK_HEADERS([ linux/uinput.h ], [have_linux_uinput_h=yes],[have_linux_uinput_h=],[])
AC_CHECK_HEADERS([ arpa/inet.h fcntl.h stdlib.h string.h sys/socket.h unistd.h libg15.h],,,
[#if HAVE_LINUX_INPUT_H
#include <linux/input.h>
#endif
],,[])
AC_ARG_ENABLE([--disable-uinput],[ --disable-uinput do not build linux uinput plugin (default: autodetect)])
if test "x$enable_uinput" != "xno"; then
if test "x$have_linux_uinput_h" == "xyes"; then
#if HAVE_LINUX_UINPUT_H
dnl check for uinput.h version 2.4 or 2.6 ?
AC_CHECK_MEMBER([struct uinput_user_dev.id],
[AC_DEFINE(HAVE_UINPUT_USER_DEV_ID, 1,
[Define if struct uinput_user_dev has id member.])],,
[
#include <linux/input.h>
#include <linux/uinput.h>
]
)
uinput=true
dnl end of uinput version checks
AC_MSG_NOTICE([Necessary includes exist: Compiling Uinput Plugin])
#endif
else
AC_MSG_NOTICE([Linux Specific Includes Not Found. NOT COMPILING UINPUT PLUGIN.])
fi
else
AC_MSG_NOTICE([Linux UINPUT plugin disabled by request.])
uinput=false
fi
case $host_os in
*linux*)
AC_DEFINE([OSTYPE_LINUX], [1],[Target OS is Linux])
AC_MSG_NOTICE([OS is Linux, using uinput if available])
;;
*darwin*)
AC_DEFINE([OSTYPE_DARWIN], [1],[Target OS is Darwin])
AC_SUBST(KEXT_LOCATION,["/System/Library/Extensions/"])
AC_MSG_NOTICE([OS is Darwin, using OS specific workarounds])
install_kext=true
uinput=false
;;
*solaris*)
AC_DEFINE([OSTYPE_SOLARIS], [1],[Target OS is Solaris])
AC_SEARCH_LIBS([connect],socket,[],[],[])
AC_SEARCH_LIBS([gethostent],nsl,[],[],[])
AC_SEARCH_LIBS([inet_aton],resolv,[],[],[])
AC_SEARCH_LIBS([nanosleep],rt,[],[],[])
AC_MSG_NOTICE([OS is Solaris, using OS specific workarounds])
uinput=false
libusb_blocks=true
;;
*)
AC_DEFINE([OSTYPE_OTHER], [1],[Target OS is unknown])
AC_MSG_NOTICE([Unknown OS type, your milage may vary....])
uinput=false
;;
esac
AM_CONDITIONAL([KEXT_INSTALL], [test x$install_kext = xtrue])
AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
dnl Some versions of libusb do not honour timeout and block. Suns' version is one of them.
if test "x$libusb_blocks" == "xtrue"; then
AC_DEFINE([LIBUSB_BLOCKS], [1],[Define if libusb implementation blocks on read or write])
fi
G15D_BUILD_CC="`$CC -v 2>&1 | tail -n 1`"
G15D_BUILD_OS="`uname -s -r -m`"
G15D_BUILD_DATE="`date \"+%a %d %b %Y %T\"`"
AC_DEFINE_UNQUOTED([BUILD_OS_NAME],"${G15D_BUILD_OS}",[Build OS Particulars])
AC_DEFINE_UNQUOTED([BUILD_DATE],"${G15D_BUILD_DATE}",[Date of compilation])
AC_DEFINE_UNQUOTED([COMPILER_VERSION],"${G15D_BUILD_CC}",[Compiler Version])
CPPFLAGS=$CPPFLAGS_save
CPPFLAGS="$CPPFLAGS "'-DDATADIR="\"$(datadir)\""'
AC_SUBST(G15DAEMON_PLUGIN_DIR,["$libdir/g15daemon/$PACKAGE_VERSION/plugins"])
CPPFLAGS="$CPPFLAGS "'-DPLUGINDIR=\"$(G15DAEMON_PLUGIN_DIR)\"'
CPPFLAGS="$CPPFLAGS "'-I$(includedir)'
AC_CONFIG_FILES([Makefile g15daemon/Makefile libg15daemon_client/Makefile plugins/Makefile]) AC_CONFIG_FILES([Makefile g15daemon/Makefile libg15daemon_client/Makefile plugins/Makefile])
+6
View File
@@ -0,0 +1,6 @@
# G15daemon udev rule to autostart g15daemon on connect
# belongs in udev rules directory such as /etc/udev/rules.d/
# and the script g15daemon-hotplug should be in /usr/bin and made
# executable with chmod +x /usr/bin/g15daemon-hotplug
SYSFS{../name}=="Logitech Logitech Gaming Keyboard", RUN+="/usr/bin/g15daemon-hotplug"
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# G15Daemon udev script to start/stop the daemon
# when device is connected.
# requires a udev script in the udev rules directory
# see 99-g15daemon.rules as an example.
case $ACTION in
"add")
# start g15daemon on keyboard connect
sudo g15daemon
;;
"remove")
# kill g15daemon on keyboard disconnect
sudo g15daemon -k
;;
*)
exit 0
;;
esac
+43
View File
@@ -0,0 +1,43 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key> <string>English</string>
<key>CFBundleGetInfoString</key> <string>Libusb USB device Shield</string>
<key>CFBundleIdentifier</key> <string>com.libusb.USB_Shield</string>
<key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>
<key>CFBundleName</key> <string>Libusb USB device Shield</string>
<key>CFBundlePackageType</key> <string>KEXT</string>
<key>CFBundleSignature</key> <string>????</string>
<key>CFBundleVersion</key> <string>6.0</string>
<key>IOKitPersonalities</key>
<dict>
<key>Logitech G15</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.kernel.iokit</string>
<key>IOClass</key>
<string>IOService</string>
<key>IOProbeScore</key>
<integer>106000</integer>
<key>IOProviderClass</key>
<string>IOUSBInterface</string>
<key>bConfigurationValue</key>
<integer>1</integer>
<key>bInterfaceNumber</key>
<integer>0</integer>
<key>bcdDevice</key>
<integer>259</integer>
<key>idProduct</key>
<integer>49698</integer>
<key>idVendor</key>
<integer>1133</integer>
</dict>
</dict>
<key>OSBundleCompatibleVersion</key> <string>1.8</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kernel.iokit</key> <string>6.0</string>
</dict>
</dict>
</plist>
+31 -3
View File
@@ -1,7 +1,35 @@
g15daemon for Debian g15daemon for Debian
-------------------- --------------------
KDE:
If you have KDE, on keyboard setting, you should choose "G15daemon"
-- Giacomo Catenazzi <cate@debian.org> Mon, 27 Aug 2007 20:00:20 +0200 Debian 'xkeyboard-config' package already have support for g15
keyboards, so you don't need to exec 'xmodmap' as described on
original documentations. Anywaym you should configure your
xorg.conf file, so that xorg will understand the extra keys.
To have the full support of the extra keys, you should edit the
xorg configuration file /etc/X11/xorg.conf . The 'XkbModel' should
be "logitech_g15".
I.e. on my machine:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "logitech_g15"
Option "XkbLayout" "us"
EndSection
Also in KDE and gnome you should set the g15daemon keyboard.
In KDE you find the configuration in:
Control Center
Regional & Accessibility
Keyboard Layout
On the right at the top "Keyboard model" select:
"Logitech G15 extra keys via G15daemon"
-- Giacomo Catenazzi <cate@debian.org> Mon, 30 Aug 2007 08:04:22 +0200
+55
View File
@@ -1,3 +1,58 @@
g15daemon (1.9.5.2-1) unstable; urgency=low
* New upstream version
* Change default behaviour: to switch client use MR (as already documented
in /etc/default/g15daemon, but wrongly implemented)
-- Giacomo Catenazzi <cate@debian.org> Mon, 28 Jan 2008 09:12:16 +0100
g15daemon (1.9.1.0.svn346-1) unstable; urgency=low
* New upstream version (from svn)
-- Giacomo Catenazzi <cate@debian.org> Tue, 18 Dec 2007 09:15:42 +0100
g15daemon (1.9.0-wip.20070910-5) unstable; urgency=low
* change priority to "extra"
* force libg15render-dev versioned dependencies
-- Giacomo Catenazzi <cate@debian.org> Tue, 09 Oct 2007 13:28:56 +0200
g15daemon (1.9.0-wip.20070910-4) unstable; urgency=low
* Correct building errors (closes: #441919, #442995)
-- Giacomo Catenazzi <cate@debian.org> Tue, 18 Sep 2007 20:29:54 +0200
g15daemon (1.9.0-wip.20070910-3) unstable; urgency=low
* first try to make a debian/rules full working for
svn and released version
* fix directory fixes (closes: #442296)
-- Giacomo Catenazzi <cate@debian.org> Fri, 14 Sep 2007 20:59:27 +0200
g15daemon (1.9.0-wip.20070910-2) unstable; urgency=low
* pause() instead of busy loop.
-- Giacomo Catenazzi <cate@debian.org> Tue, 11 Sep 2007 06:12:01 +0200
g15daemon (1.9.0-wip.20070910-1) unstable; urgency=low
* New upstream release (from svn)
* Don't install plugin in /usr/share (Closes: #441619)
-- Giacomo Catenazzi <cate@debian.org> Mon, 10 Sep 2007 23:02:14 +0200
g15daemon (1.9.0-2) unstable; urgency=low
* Updates: better init.d scripts (with support for L1 key)
* install also the sample plugin (clock, net, uinput)
-- Giacomo Catenazzi <cate@debian.org> Thu, 30 Aug 2007 23:31:18 +0200
g15daemon (1.9.0-1) unstable; urgency=low g15daemon (1.9.0-1) unstable; urgency=low
* New upstream release * New upstream release
+10 -7
View File
@@ -1,14 +1,17 @@
Source: g15daemon Source: g15daemon
Section: utils Section: utils
Priority: optional Priority: extra
Maintainer: Giacomo Catenazzi <cate@debian.org> Maintainer: Giacomo Catenazzi <cate@debian.org>
Build-Depends: cdbs, debhelper (>= 5), autotools-dev Build-Depends: cdbs, debhelper (>= 5), autotools-dev, automake1.9, libtool,
Standards-Version: 3.7.2 libg15-dev, libg15render-dev (>=1.2.0.svn250-2), libusb-dev, libfreetype6-dev
Standards-Version: 3.7.3
Homepage: http://www.g15tools.com/
Package: g15daemon Package: g15daemon
Section: utils Section: utils
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libg15daemon-client (=${binary:Version}) Depends: ${shlibs:Depends}, libg15daemon-client1 (=${binary:Version})
Recommends: xkeyboard-config ( >= 0.9+cvs.20070428-1)
Description: Screen multiplexer for Logitech G15 Keyboard Description: Screen multiplexer for Logitech G15 Keyboard
G15daemon provides multiple virtual screens for the LCD on the Logitech G15daemon provides multiple virtual screens for the LCD on the Logitech
G11 and G15 keyboards. G11 and G15 keyboards.
@@ -16,17 +19,17 @@ Description: Screen multiplexer for Logitech G15 Keyboard
This package contain the daemon and a generic client to talk to the This package contain the daemon and a generic client to talk to the
daemon. daemon.
Package: libg15daemon-client Package: libg15daemon-client1
Section: libs Section: libs
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends} Depends: ${shlibs:Depends}
Description: Development packages for libg15daemon-client Description: Development packages for libg15daemon-client
Includes the files needed for developing g15daemon clients Includes the files needed for developing g15daemon clients
Package: libg15daemon-client-dev Package: libg15daemon-client-dev
Section: libdevel Section: libdevel
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libg15daemon-client (= ${binary:Version}) Depends: libg15daemon-client1 (= ${binary:Version})
Description: Development packages for libg15daemon-client Description: Development packages for libg15daemon-client
Includes the files needed for developing g15daemon clients Includes the files needed for developing g15daemon clients
+1 -1
View File
@@ -23,6 +23,6 @@ License:
License can be found in the file `/usr/share/common-licenses/GPL-2'. License can be found in the file `/usr/share/common-licenses/GPL-2'.
The Debian packaging is (C) 2007, Giacomo A. Catenazzi <cate@debian.org> and The Debian packaging is (C) 2007, Giacomo Catenazzi <cate@debian.org> and
is licensed under the GPL v2 (or later), see `/usr/share/common-licenses/GPL-2'. is licensed under the GPL v2 (or later), see `/usr/share/common-licenses/GPL-2'.
Vendored
-2
View File
@@ -1,2 +0,0 @@
usr/bin
usr/sbin
Vendored
-1
View File
@@ -1,5 +1,4 @@
FAQ FAQ
NEWS NEWS
README README
README.usage
TODO TODO
+6 -4
View File
@@ -1,10 +1,12 @@
# Defaults for g15daemon initscript # Defaults for g15daemon initscript
# sourced by /etc/init.d/g15daemon
# installed at /etc/default/g15daemon by the maintainer scripts
# SWITCH_KEY selects the key used to switch between client screens
# #
# This is a POSIX shell fragment # SWITCH_KEY="MR" to use the MR key (on top left)
# # SWITCH_KEY="L1 to use the L1 key: the small round key below the LCD
SWITCH_KEY="MR"
# Additional options that are passed to the Daemon. # Additional options that are passed to the Daemon.
DAEMON_OPTS="" DAEMON_OPTS=""
+5
View File
@@ -25,6 +25,10 @@ if [ -f /etc/default/g15daemon ] ; then
. /etc/default/g15daemon . /etc/default/g15daemon
fi fi
if [ "$SWITCH_KEY" = "MR" ]; then
DAEMON_OPTS="-s $DAEMON_OPTS"
fi
set -e set -e
case "$1" in case "$1" in
@@ -36,6 +40,7 @@ case "$1" in
;; ;;
stop) stop)
echo -n "Stopping $DESC: " echo -n "Stopping $DESC: "
$DAEMON -k
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON --exec $DAEMON
echo "$NAME." echo "$NAME."
+4 -1
View File
@@ -1 +1,4 @@
g15daemon/g15daemon usr/sbin debian/tmp/usr/sbin/g15daemon usr/sbin
debian/tmp/usr/lib/g15daemon/1.9.5.2/plugins/*.so usr/lib/g15daemon/1.9.5.2/plugins/
debian/tmp/usr/share/g15daemon/splash/g15logo2.wbmp usr/share/g15daemon/splash/
+5 -6
View File
@@ -1,6 +1,5 @@
usr/include/* debian/tmp/usr/include/* usr/include/
usr/lib/lib*.a debian/tmp/usr/lib/lib*.a usr/lib/
usr/lib/lib*.so debian/tmp/usr/lib/lib*.so usr/lib/
usr/lib/pkgconfig/* debian/tmp/usr/lib/*.la usr/lib/
usr/lib/*.la
usr/share/pkgconfig/*
+1
View File
@@ -0,0 +1 @@
debian/tmp/usr/lib/lib*.so.* usr/lib/
File renamed without changes.
+23
View File
@@ -1,5 +1,28 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# for SVN versions
AUTOMAKE_REMOVE := Makefile Makefile.in */Makefile */Makefile.in configure aclocal.m4
AUTOMAKE_REMOVE += *.lo *.o *.la */*.lo */*.o */*.la
AUTOMAKE_REMOVE += g15daemon/g15daemon g15daemon/g15daemontest
AUTOMAKE_REMOVE += config.status config.log config.h config.h.in config/* libtool stamp-h1
AUTOMAKE_REMOVE += */.libs/
#clean::
# -rm -Rf $(AUTOMAKE_REMOVE)
#makebuilddir:: Makefile
#Makefile:: Makefile.am autogen.sh
# [ -d config ] || mkdir config
# aclocal -I config
# libtoolize --automake --force --copy
# autoheader
# automake --add-missing --copy
# autoconf
include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/class/autotools.mk
DEB_CONFIGURE_EXTRA_FLAGS = --quiet
+1 -2
View File
@@ -3,6 +3,5 @@
# Compulsory line, this is a version 3 file # Compulsory line, this is a version 3 file
version=3 version=3
http://sf.net/g15daemon/g15daemon-(.*)\.tar\.bz2 http://sf.net/g15daemon/g15daemon-([1-9].*)\.tar\.bz2
+70 -52
View File
@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,11 @@
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
@@ -37,6 +33,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@
sbin_PROGRAMS = g15daemon$(EXEEXT) sbin_PROGRAMS = g15daemon$(EXEEXT)
noinst_PROGRAMS = g15daemontest$(EXEEXT) noinst_PROGRAMS = g15daemontest$(EXEEXT)
subdir = g15daemon subdir = g15daemon
@@ -56,21 +53,25 @@ am_g15daemon_OBJECTS = utility_funcs.$(OBJEXT) main.$(OBJEXT) \
linked_lists.$(OBJEXT) g15_plugins.$(OBJEXT) linked_lists.$(OBJEXT) g15_plugins.$(OBJEXT)
g15daemon_OBJECTS = $(am_g15daemon_OBJECTS) g15daemon_OBJECTS = $(am_g15daemon_OBJECTS)
g15daemon_DEPENDENCIES = g15daemon_DEPENDENCIES =
g15daemon_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(g15daemon_LDFLAGS) $(LDFLAGS) -o $@
am_g15daemontest_OBJECTS = lcdclient_test.$(OBJEXT) am_g15daemontest_OBJECTS = lcdclient_test.$(OBJEXT)
g15daemontest_OBJECTS = $(am_g15daemontest_OBJECTS) g15daemontest_OBJECTS = $(am_g15daemontest_OBJECTS)
g15daemontest_DEPENDENCIES = \ g15daemontest_DEPENDENCIES = \
$(top_builddir)/libg15daemon_client/libg15daemon_client.la $(top_builddir)/libg15daemon_client/libg15daemon_client.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(g15daemon_SOURCES) $(g15daemontest_SOURCES) SOURCES = $(g15daemon_SOURCES) $(g15daemontest_SOURCES)
DIST_SOURCES = $(g15daemon_SOURCES) $(g15daemontest_SOURCES) DIST_SOURCES = $(g15daemon_SOURCES) $(g15daemontest_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -85,8 +86,6 @@ ETAGS = etags
CTAGS = ctags CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AR = @AR@ AR = @AR@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
@@ -113,11 +112,14 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ F77 = @F77@
FFLAGS = @FFLAGS@ FFLAGS = @FFLAGS@
G15DAEMON_PLUGIN_DIR = @G15DAEMON_PLUGIN_DIR@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KEXT_LOCATION = @KEXT_LOCATION@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
@@ -125,6 +127,7 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -134,17 +137,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@ ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@@ -156,6 +160,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -183,8 +188,15 @@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
METASOURCES = AUTO METASOURCES = AUTO
AM_CFLAGS = -DG15DAEMON_BUILD -Wall AM_CFLAGS = -DG15DAEMON_BUILD -Wall
noinst_HEADERS = g15logo.h noinst_HEADERS = g15logo.h
@@ -237,7 +249,7 @@ clean-noinstPROGRAMS:
done done
install-sbinPROGRAMS: $(sbin_PROGRAMS) install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; for p in $$list; do \ @list='$(sbin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \ if test -f $$p \
@@ -265,10 +277,10 @@ clean-sbinPROGRAMS:
done done
g15daemon$(EXEEXT): $(g15daemon_OBJECTS) $(g15daemon_DEPENDENCIES) g15daemon$(EXEEXT): $(g15daemon_OBJECTS) $(g15daemon_DEPENDENCIES)
@rm -f g15daemon$(EXEEXT) @rm -f g15daemon$(EXEEXT)
$(LINK) $(g15daemon_LDFLAGS) $(g15daemon_OBJECTS) $(g15daemon_LDADD) $(LIBS) $(g15daemon_LINK) $(g15daemon_OBJECTS) $(g15daemon_LDADD) $(LIBS)
g15daemontest$(EXEEXT): $(g15daemontest_OBJECTS) $(g15daemontest_DEPENDENCIES) g15daemontest$(EXEEXT): $(g15daemontest_OBJECTS) $(g15daemontest_DEPENDENCIES)
@rm -f g15daemontest$(EXEEXT) @rm -f g15daemontest$(EXEEXT)
$(LINK) $(g15daemontest_LDFLAGS) $(g15daemontest_OBJECTS) $(g15daemontest_LDADD) $(LIBS) $(LINK) $(g15daemontest_OBJECTS) $(g15daemontest_LDADD) $(LIBS)
mostlyclean-compile: mostlyclean-compile:
-rm -f *.$(OBJEXT) -rm -f *.$(OBJEXT)
@@ -283,22 +295,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utility_funcs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utility_funcs.Po@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $< @am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -308,13 +320,9 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-includeHEADERS: $(include_HEADERS) install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; for p in $$list; do \ @list='$(include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
@@ -379,22 +387,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES) distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; for file in $$list; do \ list='$(DISTFILES)'; \
case $$file in \ dist_files=`for file in $$list; do echo $$file; done | \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ sed -e "s|^$$srcdirstrip/||;t" \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \ esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
@@ -410,7 +417,7 @@ check: check-am
all-am: Makefile $(PROGRAMS) $(HEADERS) all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs: installdirs:
for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(includedir)"; do \ for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-am
install-exec: install-exec-am install-exec: install-exec-am
@@ -445,7 +452,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR) -rm -rf ./$(DEPDIR)
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \ distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags distclean-tags
dvi: dvi-am dvi: dvi-am
@@ -459,12 +466,20 @@ info-am:
install-data-am: install-includeHEADERS install-data-am: install-includeHEADERS
install-dvi: install-dvi-am
install-exec-am: install-sbinPROGRAMS install-exec-am: install-sbinPROGRAMS
install-html: install-html-am
install-info: install-info-am install-info: install-info-am
install-man: install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
@@ -485,22 +500,25 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-includeHEADERS uninstall-info-am \ uninstall-am: uninstall-includeHEADERS uninstall-sbinPROGRAMS
uninstall-sbinPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS clean-sbinPROGRAMS ctags \ clean-libtool clean-noinstPROGRAMS clean-sbinPROGRAMS ctags \
distclean distclean-compile distclean-generic \ distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \ html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am \ install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am \
install-includeHEADERS install-info install-info-am \ install-includeHEADERS install-info install-info-am \
install-man install-sbinPROGRAMS install-strip installcheck \ install-man install-pdf install-pdf-am install-ps \
install-ps-am install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \ maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-includeHEADERS \ tags uninstall uninstall-am uninstall-includeHEADERS \
uninstall-info-am uninstall-sbinPROGRAMS uninstall-sbinPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
+117 -15
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 179 $ - $Date: 2006-11-19 19:03:12 +1030 (Sun, 19 Nov 2006) $ $Author: mlampard $ $Revision: 408 $ - $Date: 2008-01-09 12:07:02 +1030 (Wed, 09 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -46,19 +46,41 @@
#include <libg15render.h> #include <libg15render.h>
extern int leaving; extern volatile int leaving;
void * g15daemon_dlopen_plugin(char *name,unsigned int library) { void * g15daemon_dlopen_plugin(char *name,unsigned int library) {
void * handle; void * handle;
char * error; char * error;
static int deepbind = 0;
int mode = library==1?RTLD_GLOBAL:RTLD_LOCAL; int mode = library==1?RTLD_GLOBAL:RTLD_LOCAL;
#ifdef RTLD_DEEPBIND
mode|=RTLD_DEEPBIND; /* set ordering of symbols so plugin uses its
own symbols in preference to ours */
if(!deepbind)
g15daemon_log(LOG_INFO,"G15Daemon Plugin_Loader - DEEPBIND Flag available. Using it.\n");
deepbind=1;
#endif
handle = dlopen (name,RTLD_NOW | mode); g15daemon_log(LOG_INFO,"PRELOADING %s",name);
/* remove any pending errors */
dlerror();
handle = dlopen (name,RTLD_LAZY | mode | RTLD_NODELETE);
dlclose(handle);
dlerror();
handle = dlopen (name,RTLD_NOW | mode | RTLD_NOLOAD);
if(!handle) { /* FIXME: retry once more if load failed */
dlerror();
g15daemon_log(LOG_ERR, "Initialisation Failed. Retrying..");
handle = dlopen (name, RTLD_LAZY | mode );
}
if ((error = dlerror()) != NULL) { if ((error = dlerror()) != NULL) {
g15daemon_log (LOG_ERR, "%s\n", error); g15daemon_log (LOG_ERR, "Plugin_Loader - Error loading %s - %s\n", name, error);
return(NULL); return(NULL);
} }
@@ -67,7 +89,12 @@ void * g15daemon_dlopen_plugin(char *name,unsigned int library) {
int g15daemon_dlclose_plugin(void *handle) { int g15daemon_dlclose_plugin(void *handle) {
char * error;
dlclose(handle); dlclose(handle);
error = dlerror();
if(error != NULL)
g15daemon_log(LOG_ERR, "Error from dlclose %s\n",error);
return 0; return 0;
} }
@@ -101,6 +128,7 @@ void run_lcd_client(plugin_t *plugin_args) {
if(!leaving) if(!leaving)
g15daemon_lcdnode_remove(display); g15daemon_lcdnode_remove(display);
} }
void run_advanced_client(plugin_t *plugin_args) void run_advanced_client(plugin_t *plugin_args)
{ {
plugin_info_t *info = plugin_args->info; plugin_info_t *info = plugin_args->info;
@@ -129,7 +157,7 @@ void run_advanced_client(plugin_t *plugin_args)
g15daemon_msleep(info->update_msecs); g15daemon_msleep(info->update_msecs);
} }
}else{ }else{
while(1){ while(!leaving){
g15daemon_msleep(500); g15daemon_msleep(500);
} }
} }
@@ -144,15 +172,17 @@ void *plugin_thread(plugin_t *plugin_args) {
void *handle = plugin_args->plugin_handle; void *handle = plugin_args->plugin_handle;
if(plugin_args->info->plugin_run!=NULL||plugin_args->info->event_handler!=NULL) { if(plugin_args->info->plugin_run!=NULL||plugin_args->info->event_handler!=NULL) {
g15daemon_log(LOG_ERR,"registered plugin \"%s\"",info->name); g15daemon_log(LOG_ERR,"Plugin \"%s\" boot successful.",info->name);
} else { } else {
return NULL; return NULL;
} }
if(plugin_args->type == G15_PLUGIN_LCD_CLIENT){ if(plugin_args->type == G15_PLUGIN_LCD_CLIENT){
g15daemon_log(LOG_INFO,"Starting plugin thread \"%s\" in standard mode\n",info->name);
run_lcd_client(plugin_args); run_lcd_client(plugin_args);
} }
else if(plugin_args->type == G15_PLUGIN_CORE_OS_KB||plugin_args->type == G15_PLUGIN_LCD_SERVER) { else if(plugin_args->type == G15_PLUGIN_CORE_OS_KB||plugin_args->type == G15_PLUGIN_LCD_SERVER) {
g15daemon_log(LOG_INFO,"Starting plugin thread \"%s\" in advanced mode\n",info->name);
run_advanced_client(plugin_args); run_advanced_client(plugin_args);
} }
@@ -165,6 +195,32 @@ void *plugin_thread(plugin_t *plugin_args) {
return NULL; return NULL;
} }
int g15_count_plugins(char *plugin_directory) {
DIR *directory;
struct dirent *ep;
char pluginname[2048];
int count=0;
directory = opendir (plugin_directory);
if (directory != NULL)
{
while ((ep = readdir (directory))) {
if(strstr(ep->d_name,".so")){
strcpy(pluginname, plugin_directory);
strncat(pluginname,"/",1);
strncat(pluginname,ep->d_name,200);
++count;
}
}
(void) closedir (directory);
}
else
count = -1;
return count;
}
int g15_plugin_load (g15daemon_t *masterlist, char *filename) { int g15_plugin_load (g15daemon_t *masterlist, char *filename) {
void * plugin_handle = NULL; void * plugin_handle = NULL;
@@ -173,14 +229,19 @@ int g15_plugin_load (g15daemon_t *masterlist, char *filename) {
pthread_t client_connection; pthread_t client_connection;
pthread_attr_t attr; pthread_attr_t attr;
lcdnode_t *clientnode; lcdnode_t *clientnode;
char *error_str;
if((plugin_handle = g15daemon_dlopen_plugin(filename,G15_PLUGIN_NONSHARED))!=NULL) { if((plugin_handle = g15daemon_dlopen_plugin(filename,G15_PLUGIN_NONSHARED))!=NULL) {
plugin_t *plugin_args=malloc(sizeof(plugin_t)); plugin_t *plugin_args=malloc(sizeof(plugin_t));
plugin_args->info = dlsym(plugin_handle, "g15plugin_info"); plugin_args->info = dlsym(plugin_handle, "g15plugin_info");
dlerror(); error_str=dlerror();
if(error_str!=NULL)
g15daemon_log(LOG_ERR,"g15_plugin_load: %s %s\n",filename,error_str);
if(!plugin_args->info) { /* if it doesnt have a valid struct, we should just load it as a library... but we dont at the moment FIXME */ if(!plugin_args->info) { /* if it doesnt have a valid struct, we should just load it as a library... but we dont at the moment FIXME */
g15daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin\n",filename); g15daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin. Unloading\n",filename);
g15daemon_dlclose_plugin(plugin_handle); g15daemon_dlclose_plugin(plugin_handle);
dlerror(); dlerror();
return -1; return -1;
@@ -188,10 +249,14 @@ int g15_plugin_load (g15daemon_t *masterlist, char *filename) {
if(strncasecmp("Load",g15daemon_cfg_read_string(plugin_cfg, plugin_args->info->name,"Load"),5)!=0) if(strncasecmp("Load",g15daemon_cfg_read_string(plugin_cfg, plugin_args->info->name,"Load"),5)!=0)
{ {
g15daemon_log(LOG_ERR, "\"%s\" Plugin disabled in g15daemon.conf - not running\n",plugin_args->info->name);
g15daemon_dlclose_plugin(plugin_handle); g15daemon_dlclose_plugin(plugin_handle);
return -1; return -1;
} }
g15daemon_log(LOG_WARNING, "Booting plugin \"%s\"",plugin_args->info->name);
plugin_args->type = plugin_args->info->type; plugin_args->type = plugin_args->info->type;
/* assign the generic eventhandler if the plugin doesnt provide one - the generic one does nothing atm. FIXME*/ /* assign the generic eventhandler if the plugin doesnt provide one - the generic one does nothing atm. FIXME*/
if(plugin_args->info->event_handler==NULL) if(plugin_args->info->event_handler==NULL)
@@ -223,7 +288,7 @@ int g15_plugin_load (g15daemon_t *masterlist, char *filename) {
pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);
pthread_attr_setstacksize(&attr,64*1024); /* set stack to 64k - dont need 8Mb */ pthread_attr_setstacksize(&attr,64*1024); /* set stack to 64k - dont need 8Mb */
if (pthread_create(&client_connection, &attr, (void*)plugin_thread, plugin_args) != 0) { if (pthread_create(&client_connection, &attr, (void*)plugin_thread, plugin_args) != 0) {
g15daemon_log(LOG_WARNING,"Unable to create client thread."); g15daemon_log(LOG_ERR,"Unable to create client thread.");
} else { } else {
pthread_detach(client_connection); pthread_detach(client_connection);
} }
@@ -232,26 +297,63 @@ int g15_plugin_load (g15daemon_t *masterlist, char *filename) {
} }
void g15_open_all_plugins(g15daemon_t *masterlist, char *plugin_directory) { int g15_open_all_plugins(g15daemon_t *masterlist, char *plugin_directory) {
DIR *directory; DIR *directory;
struct dirent *ep; struct dirent *ep;
char pluginname[2048]; char pluginname[2048];
int loadcount = 0;
int count = g15_count_plugins(plugin_directory);
config_section_t *load_cfg = g15daemon_cfg_load_section(masterlist,"PLUGIN_LOAD_ORDER");
if(!uf_search_confitem(load_cfg,"TotalPlugins") ||
(g15daemon_cfg_read_int(load_cfg,"TotalPlugins",0)!=count) ||
(g15daemon_cfg_read_string(load_cfg,"0","")[0]=='/')) {
g15daemon_log(LOG_INFO,"Number of plugins has changed. Rebuilding load order.");
directory = opendir (plugin_directory); directory = opendir (plugin_directory);
if (directory != NULL) if (directory != NULL && count)
{ {
g15daemon_log(LOG_WARNING,"Attempting load of %i plugins",count);
while ((ep = readdir (directory))) { while ((ep = readdir (directory))) {
if(strstr(ep->d_name,".so")){ if(strstr(ep->d_name,".so")){
strcpy(pluginname, plugin_directory); strcpy(pluginname, plugin_directory);
strncat(pluginname,"/",1); strncat(pluginname,"/",1);
strncat(pluginname,ep->d_name,200); strncat(pluginname,ep->d_name,200);
g15daemon_log(LOG_INFO, "Loading plugin %s",pluginname); if(g15_plugin_load (masterlist, pluginname)==0){
g15_plugin_load (masterlist, pluginname); char tmp[10];
sprintf(tmp,"%i",loadcount);
g15daemon_cfg_write_string(load_cfg,tmp,ep->d_name);
loadcount++;
}
g15daemon_msleep(20); g15daemon_msleep(20);
} }
} }
(void) closedir (directory); (void) closedir (directory);
g15daemon_cfg_write_int(load_cfg,"TotalPlugins",loadcount);
g15daemon_log(LOG_WARNING,"Successfully loaded %i of %i plugins.",loadcount,count);
return loadcount;
} }
else else
perror ("Couldn't open the directory"); g15daemon_log (LOG_ERR,"Unable to open the directory: %s",plugin_directory);
}else{
int i;
g15daemon_log(LOG_INFO,"Loading %i plugins named in g15daemon.conf.",count);
for(i=0;i<count;i++){
char tmp[10];
char plugin_fname[1024];
sprintf(tmp,"%i",i);
strcpy(plugin_fname,PLUGINDIR);
strncat(plugin_fname,"/",1);
strncat(plugin_fname,g15daemon_cfg_read_string(load_cfg,tmp,""),128);
g15_plugin_load(masterlist,plugin_fname);
g15daemon_msleep(20);
}
return count;
}
return 0;
} }
+18 -6
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 244 $ - $Date: 2007-01-05 08:04:05 +1030 (Fri, 05 Jan 2007) $ $Author: mlampard $ $Revision: 441 $ - $Date: 2008-01-22 20:39:21 +1030 (Tue, 22 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -40,11 +40,13 @@
#include <config.h> #include <config.h>
#endif #endif
#include <pthread.h>
#include <pwd.h> #include <pwd.h>
#include <syslog.h> #include <syslog.h>
#define CLIENT_CMD_GET_KEYSTATE 'k' #define CLIENT_CMD_GET_KEYSTATE 'k'
#define CLIENT_CMD_SWITCH_PRIORITIES 'p' #define CLIENT_CMD_SWITCH_PRIORITIES 'p'
#define CLIENT_CMD_NEVER_SELECT 'n'
#define CLIENT_CMD_IS_FOREGROUND 'v' #define CLIENT_CMD_IS_FOREGROUND 'v'
#define CLIENT_CMD_IS_USER_SELECTED 'u' #define CLIENT_CMD_IS_USER_SELECTED 'u'
#define CLIENT_CMD_BACKLIGHT 0x80 #define CLIENT_CMD_BACKLIGHT 0x80
@@ -170,13 +172,14 @@ typedef struct lcd_s
int max_x; int max_x;
int max_y; int max_y;
int connection; int connection;
long int ident;
unsigned int backlight_state; unsigned int backlight_state;
unsigned int mkey_state; unsigned int mkey_state;
unsigned int contrast_state; unsigned int contrast_state;
unsigned int state_changed; unsigned int state_changed;
/* set to 1 if user manually selected this screen 0 otherwise*/ /* set to 1 if user manually selected this screen 0 otherwise */
unsigned int usr_foreground; unsigned int usr_foreground;
/* set to 1 if screen is never to be user-selectable */
unsigned int never_select;
/* only used for plugins */ /* only used for plugins */
plugin_t *g15plugin; plugin_t *g15plugin;
@@ -220,13 +223,18 @@ pthread_mutex_t g15lib_mutex;
#ifdef G15DAEMON_BUILD #ifdef G15DAEMON_BUILD
/* internal g15daemon-only functions */ /* internal g15daemon-only functions */
void uf_write_buf_to_g15(lcd_t *lcd); void g15daemon_init_refresh();
void g15daemon_quit_refresh();
int uf_write_buf_to_g15(lcd_t *lcd);
/* write a pbm format file 'filename' with image contained in 'buf' */
int uf_screendump_pbm(unsigned char *buf,char *filename);
int uf_read_keypresses(unsigned int *keypresses, unsigned int timeout);
/* return the pid of a running copy of g15daemon, else -1 */ /* return the pid of a running copy of g15daemon, else -1 */
int uf_return_running(); int uf_return_running();
/* create a /var/run/g15daemon.pid file, returning 0 on success else -1 */ /* create a /var/run/g15daemon.pid file, returning 0 on success else -1 */
int uf_create_pidfile(); int uf_create_pidfile();
/* open & run all plugins in the given directory */ /* open & run all plugins in the given directory */
void g15_open_all_plugins(g15daemon_t *masterlist, char *plugin_directory); int g15_open_all_plugins(g15daemon_t *masterlist, char *plugin_directory);
/* linked lists */ /* linked lists */
g15daemon_t *ll_lcdlist_init(); g15daemon_t *ll_lcdlist_init();
void ll_lcdlist_destroy(g15daemon_t **masterlist); void ll_lcdlist_destroy(g15daemon_t **masterlist);
@@ -244,6 +252,10 @@ int internal_generic_eventhandler(plugin_event_t *myevent);
#endif #endif
/* the following functions are available for use by plugins */ /* the following functions are available for use by plugins */
/* send notification of LCD buffer update */
void g15daemon_send_refresh(lcd_t *lcd);
/* wait on notification of LCD buffer update */
void g15daemon_wait_refresh();
/* create a new section */ /* create a new section */
config_section_t *g15daemon_cfg_load_section(g15daemon_t *masterlist,char *name); config_section_t *g15daemon_cfg_load_section(g15daemon_t *masterlist,char *name);
/* return string value from key in sectionname */ /* return string value from key in sectionname */
+15 -11
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 161 $ - $Date: 2006-11-17 07:03:45 +1030 (Fri, 17 Nov 2006) $ $Author: aneurysm9 $ $Revision: 381 $ - $Date: 2008-01-01 23:41:08 +1030 (Tue, 01 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -71,12 +71,12 @@ int main(int argc, char *argv[])
// keystate = g15_send_cmd (g15screen_fd, G15DAEMON_GET_KEYSTATE, foo); // keystate = g15_send_cmd (g15screen_fd, G15DAEMON_GET_KEYSTATE, foo);
//while(1){ //while(1){
//recv(g15screen_fd, &keystate, 4, 0); recv(g15screen_fd, &keystate, 4, 0);
if(keystate) if(keystate)
printf("keystate = %i\n",keystate); printf("keystate = %i\n",keystate);
//} //}
if(keystate & G15_KEY_G1) //G1 key. See libg15.h for details on key values. // if(keystate & G15_KEY_G1) //G1 key. See libg15.h for details on key values.
break; // break;
/* G2,G3 & G4 change LCD backlight */ /* G2,G3 & G4 change LCD backlight */
if(keystate & G15_KEY_G2){ if(keystate & G15_KEY_G2){
@@ -84,12 +84,16 @@ int main(int argc, char *argv[])
} }
if(keystate & G15_KEY_G3){ if(keystate & G15_KEY_G3){
retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_MEDIUM); retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_MEDIUM);
unsigned char packet[2];
packet[0] = G15DAEMON_BACKLIGHT|G15_BRIGHTNESS_MEDIUM;
printf("sent %i bytes\n",send(g15screen_fd, packet, 1, MSG_OOB ));
} }
if(keystate & G15_KEY_G4){ if(keystate & G15_KEY_G4){
retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_BRIGHT); retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_BRIGHT);
} }
/* is this client in the foreground?? */ /*
retval = g15_send_cmd (g15screen_fd, G15DAEMON_IS_FOREGROUND, foo); retval = g15_send_cmd (g15screen_fd, G15DAEMON_IS_FOREGROUND, foo);
if(retval) if(retval)
@@ -103,15 +107,15 @@ int main(int argc, char *argv[])
else else
printf("You dastardly wabbit !\n"); printf("You dastardly wabbit !\n");
// if(retval){ /* we've been backgrounded! */ // if(retval){
sleep(2); /* remain in the background for a bit */ sleep(2);
retval = g15_send_cmd (g15screen_fd, G15DAEMON_SWITCH_PRIORITIES, foo); retval = g15_send_cmd (g15screen_fd, G15DAEMON_SWITCH_PRIORITIES, foo);
sleep(2); /* switch to foreground */ sleep(2);
retval = g15_send_cmd (g15screen_fd, G15DAEMON_SWITCH_PRIORITIES, foo); retval = g15_send_cmd (g15screen_fd, G15DAEMON_SWITCH_PRIORITIES, foo);
// } // }
*/
// sleep(2);
sleep(2);
#ifdef TEST_KEYHANDLER #ifdef TEST_KEYHANDLER
/* ok.. request that all G&M keys are passed to us.. */ /* ok.. request that all G&M keys are passed to us.. */
retval = g15_send_cmd (g15screen_fd, G15DAEMON_KEY_HANDLER, foo); retval = g15_send_cmd (g15screen_fd, G15DAEMON_KEY_HANDLER, foo);
+18 -12
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 177 $ - $Date: 2006-11-19 00:16:03 +1030 (Sun, 19 Nov 2006) $ $Author: mlampard $ $Revision: 451 $ - $Date: 2008-01-25 15:15:04 +1030 (Fri, 25 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -116,35 +116,40 @@ lcdnode_t *g15daemon_lcdnode_add(g15daemon_t **masterlist) {
/* cycle through connected client displays */ /* cycle through connected client displays */
void g15daemon_lcdnode_cycle(g15daemon_t *masterlist) void g15daemon_lcdnode_cycle(g15daemon_t *masterlist)
{ {
lcdnode_t *current_screen = masterlist->current; lcdnode_t *current_screen = NULL;
pthread_mutex_lock(&lcdlist_mutex);
skip:
current_screen = masterlist->current;
g15daemon_send_event(current_screen->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_HIDDEN); g15daemon_send_event(current_screen->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_HIDDEN);
do do
{ {
pthread_mutex_lock(&lcdlist_mutex); masterlist->current->lcd->usr_foreground=0;
g15daemon_send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 0);
if(masterlist->tail == masterlist->current){ if(masterlist->tail == masterlist->current){
masterlist->current = masterlist->head; masterlist->current = masterlist->head;
}else{ }else{
masterlist->current = masterlist->current->prev; masterlist->current = masterlist->current->prev;
} }
pthread_mutex_unlock(&lcdlist_mutex);
} }
while (current_screen != masterlist->current); while (current_screen != masterlist->current);
pthread_mutex_lock(&lcdlist_mutex);
if(masterlist->tail == masterlist->current) { if(masterlist->tail == masterlist->current) {
masterlist->current = masterlist->head; masterlist->current = masterlist->head;
} else { } else {
masterlist->current = masterlist->current->prev; masterlist->current = masterlist->current->prev;
} }
pthread_mutex_unlock(&lcdlist_mutex);
g15daemon_send_event(masterlist->current->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_VISIBLE); if(masterlist->current->lcd->never_select==1) {
g15daemon_send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 1); goto skip;
pthread_mutex_lock(&lcdlist_mutex); }
masterlist->current->lcd->state_changed = 1;
masterlist->current->last_priority = masterlist->current; masterlist->current->last_priority = masterlist->current;
pthread_mutex_unlock(&lcdlist_mutex); pthread_mutex_unlock(&lcdlist_mutex);
masterlist->current->lcd->usr_foreground=1;
g15daemon_send_event(masterlist->current->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_VISIBLE);
} }
void g15daemon_lcdnode_remove (lcdnode_t *oldnode) { void g15daemon_lcdnode_remove (lcdnode_t *oldnode) {
@@ -183,6 +188,7 @@ void g15daemon_lcdnode_remove (lcdnode_t *oldnode) {
(*prev)->next = (*masterlist)->tail; (*prev)->next = (*masterlist)->tail;
(*masterlist)->head = oldnode->prev; (*masterlist)->head = oldnode->prev;
} }
g15daemon_send_refresh((*masterlist)->current->lcd);
free(oldnode); free(oldnode);
+138 -54
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 244 $ - $Date: 2007-01-05 08:04:05 +1030 (Fri, 05 Jan 2007) $ $Author: mlampard $ $Revision: 452 $ - $Date: 2008-01-25 16:04:31 +1030 (Fri, 25 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -31,9 +31,9 @@
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/socket.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include <pwd.h> #include <pwd.h>
@@ -49,13 +49,15 @@
#endif #endif
/* all threads will exit if leaving >0 */ /* all threads will exit if leaving >0 */
int leaving = 0; volatile int leaving = 0;
int keyboard_backlight_off_onexit = 0; int keyboard_backlight_off_onexit = 0;
unsigned int g15daemon_debug = 0; unsigned int g15daemon_debug = 0;
unsigned int cycle_key; unsigned int cycle_key;
unsigned int client_handles_keys = 0; unsigned int client_handles_keys = 0;
struct lcd_t *keyhandler = NULL; struct lcd_t *keyhandler = NULL;
static int loaded_plugins = 0;
/* send event to foreground client's eventlistener */ /* send event to foreground client's eventlistener */
int g15daemon_send_event(void *caller, unsigned int event, unsigned long value) int g15daemon_send_event(void *caller, unsigned int event, unsigned long value)
{ {
@@ -64,6 +66,10 @@ int g15daemon_send_event(void *caller, unsigned int event, unsigned long value)
static unsigned long lastkeys; static unsigned long lastkeys;
if(!(value & cycle_key) && !(lastkeys & cycle_key)){ if(!(value & cycle_key) && !(lastkeys & cycle_key)){
lcd_t *lcd = (lcd_t*)caller; lcd_t *lcd = (lcd_t*)caller;
if(!lcd->g15plugin->info)
break;
int *(*plugin_listener)(plugin_event_t *newevent) = (void*)lcd->g15plugin->info->event_handler; int *(*plugin_listener)(plugin_event_t *newevent) = (void*)lcd->g15plugin->info->event_handler;
plugin_event_t *newevent=g15daemon_xmalloc(sizeof(plugin_event_t)); plugin_event_t *newevent=g15daemon_xmalloc(sizeof(plugin_event_t));
newevent->event = event; newevent->event = event;
@@ -82,9 +88,19 @@ int g15daemon_send_event(void *caller, unsigned int event, unsigned long value)
g15daemon_log(LOG_WARNING,"Error in send: %s\n",strerror(errno)); g15daemon_log(LOG_WARNING,"Error in send: %s\n",strerror(errno));
} }
if(value & G15_KEY_LIGHT){ // the backlight key was pressed - maintain user-selected state if(value & G15_KEY_LIGHT){ // the backlight key was pressed - maintain user-selected state
lcd_t *displaying = lcd->masterlist->tail->lcd;
lcd->masterlist->kb_backlight_state++; lcd->masterlist->kb_backlight_state++;
if(lcd->masterlist->kb_backlight_state>2) lcd->masterlist->kb_backlight_state %= 3;
lcd->masterlist->kb_backlight_state=0; displaying->backlight_state++;
displaying->backlight_state %= 3; // limit to 0-2 inclusive
}
if(value & G15_KEY_M1 && value & G15_KEY_M3) {
static int scr_num=0;
char filename[128];
lcd_t *displaying = lcd->masterlist->current->lcd;
sprintf(filename,"/tmp/g15daemon-sc-%i.pbm",scr_num);
uf_screendump_pbm(displaying->buf,filename);
scr_num++;
} }
free(newevent); free(newevent);
}else{ }else{
@@ -92,6 +108,7 @@ int g15daemon_send_event(void *caller, unsigned int event, unsigned long value)
lcd_t *lcd = (lcd_t*)caller; lcd_t *lcd = (lcd_t*)caller;
g15daemon_t* masterlist = lcd->masterlist; g15daemon_t* masterlist = lcd->masterlist;
static unsigned int clicktime; static unsigned int clicktime;
if(value & cycle_key) { if(value & cycle_key) {
clicktime=g15daemon_gettime_ms(); clicktime=g15daemon_gettime_ms();
}else{ }else{
@@ -146,8 +163,11 @@ int g15daemon_send_event(void *caller, unsigned int event, unsigned long value)
} }
} }
pthread_mutex_unlock(&lcdlist_mutex); pthread_mutex_unlock(&lcdlist_mutex);
g15daemon_send_refresh((lcd_t*)lcdnode->list->current->lcd);
break; break;
} }
case G15_EVENT_VISIBILITY_CHANGED:
g15daemon_send_refresh((lcd_t*)caller);
default: { default: {
lcd_t *lcd = (lcd_t*)caller; lcd_t *lcd = (lcd_t*)caller;
int *(*plugin_listener)(plugin_event_t *newevent) = (void*)lcd->g15plugin->info->event_handler; int *(*plugin_listener)(plugin_event_t *newevent) = (void*)lcd->g15plugin->info->event_handler;
@@ -168,68 +188,69 @@ static void *keyboard_watch_thread(void *lcdlist){
unsigned int keypresses = 0; unsigned int keypresses = 0;
int retval = 0; int retval = 0;
static int lastkeys = 0;
while (!leaving) { while (!leaving) {
pthread_mutex_lock(&g15lib_mutex); retval = uf_read_keypresses(&keypresses, 20);
retval = getPressedKeys(&keypresses, 40);
pthread_mutex_unlock(&g15lib_mutex);
/* every 2nd packet contains the codes we want.. immediately try again */ /* every 2nd packet contains the codes we want.. immediately try again */
while (retval == G15_ERROR_TRY_AGAIN){ while (retval == G15_ERROR_TRY_AGAIN){
pthread_mutex_lock(&g15lib_mutex); retval = uf_read_keypresses(&keypresses, 20);
retval = getPressedKeys(&keypresses, 40);
pthread_mutex_unlock(&g15lib_mutex);
} }
if(retval == G15_NO_ERROR){ if(retval == G15_NO_ERROR && lastkeys != keypresses) {
g15daemon_send_event(masterlist->current->lcd, g15daemon_send_event(masterlist->current->lcd,
G15_EVENT_KEYPRESS, keypresses); G15_EVENT_KEYPRESS, keypresses);
} lastkeys = keypresses;
if(retval == -ENODEV && LIBG15_VERSION>=1200) {
}else if(retval == -ENODEV && LIBG15_VERSION>=1200) {
pthread_mutex_lock(&g15lib_mutex); pthread_mutex_lock(&g15lib_mutex);
while((retval=re_initLibG15() != G15_NO_ERROR) && !leaving){ while((retval=re_initLibG15() != G15_NO_ERROR) && !leaving){
g15daemon_log(LOG_WARNING,"Keyboard has gone.. Retrying\n");
sleep(1); sleep(1);
} }
if(!leaving) { masterlist->current->lcd->state_changed=1; masterlist->current->lcd->ident=random();} if(!leaving) {
masterlist->current->lcd->state_changed=1;
g15daemon_send_refresh(masterlist->current->lcd);
}
pthread_mutex_unlock(&g15lib_mutex); pthread_mutex_unlock(&g15lib_mutex);
} }
g15daemon_msleep(40);
g15daemon_msleep(10);
} }
return NULL; return NULL;
} }
static void *lcd_draw_thread(void *lcdlist){ static void *lcd_draw_thread(void *lcdlist){
g15daemon_t *masterlist = (g15daemon_t*)(lcdlist); g15daemon_t *masterlist = (g15daemon_t*)(lcdlist);
static long int lastlcd = 1;
static unsigned int lastscreentime;
/* unsigned int fps = 0; */ /* unsigned int fps = 0; */
lcd_t *displaying = masterlist->tail->lcd; lcd_t *displaying = masterlist->tail->lcd;
char *lastdisplayed=NULL;
memset(displaying->buf,0,1024); memset(displaying->buf,0,1024);
static int prev_state=0;
g15daemon_sleep(2); g15daemon_sleep(2);
while (!leaving) { while (!leaving) {
pthread_mutex_lock(&lcdlist_mutex); /* wait until a client has updated */
g15daemon_wait_refresh();
pthread_mutex_lock(&lcdlist_mutex);
displaying = masterlist->current->lcd; displaying = masterlist->current->lcd;
if(displaying->ident != lastlcd){
/* monitor 'fps' - due to the TCP protocol, some frames will be bunched up. /* monitor 'fps' - due to the TCP protocol, some frames will be bunched up.
discard excess to reduce load on the bus */ discard excess to reduce load on the bus */
/* fps = 1000 / (g15daemon_gettime_ms() - lastscreentime); */ /* fps = 1000 / (g15daemon_gettime_ms() - lastscreentime); */
/* if the current screen is less than 20ms from the previous (equivelant to 50fps) delay it */ /* if the current screen is less than 20ms from the previous (equivelant to 50fps) delay it */
/* this allows a real-world fps of 40fps with no almost frame loss and reduces peak usb bus-load */ /* this allows a real-world fps of 40fps with no almost frame loss and reduces peak usb bus-load */
if((g15daemon_gettime_ms() - lastscreentime)>=20||(char*)displaying!=lastdisplayed){ g15daemon_log(LOG_DEBUG,"Updating LCD");
uf_write_buf_to_g15(displaying); uf_write_buf_to_g15(displaying);
lastscreentime = g15daemon_gettime_ms(); g15daemon_log(LOG_DEBUG,"LCD Update Complete");
lastdisplayed = (char*)displaying;
lastlcd = displaying->ident; if(prev_state!=displaying->backlight_state) {
} prev_state=displaying->backlight_state;
pthread_mutex_lock(&g15lib_mutex);
setLCDBrightness(displaying->backlight_state);
pthread_mutex_unlock(&g15lib_mutex);
} }
if(displaying->state_changed){ if(displaying->state_changed){
@@ -237,17 +258,11 @@ static void *lcd_draw_thread(void *lcdlist){
setLCDContrast(displaying->contrast_state); setLCDContrast(displaying->contrast_state);
if(displaying->masterlist->remote_keyhandler_sock==0) // only allow mled control if the macro recorder isnt running if(displaying->masterlist->remote_keyhandler_sock==0) // only allow mled control if the macro recorder isnt running
setLEDs(displaying->mkey_state); setLEDs(displaying->mkey_state);
if(masterlist->kb_backlight_state)
setLCDBrightness(displaying->backlight_state);
else
setLCDBrightness(masterlist->kb_backlight_state);
pthread_mutex_unlock(&g15lib_mutex); pthread_mutex_unlock(&g15lib_mutex);
displaying->state_changed = 0; displaying->state_changed = 0;
} }
pthread_mutex_unlock(&lcdlist_mutex); pthread_mutex_unlock(&lcdlist_mutex);
g15daemon_msleep(5);
} }
return NULL; return NULL;
} }
@@ -257,6 +272,7 @@ void g15daemon_sighandler(int sig) {
case SIGUSR1: case SIGUSR1:
keyboard_backlight_off_onexit = 1; keyboard_backlight_off_onexit = 1;
case SIGINT: case SIGINT:
case SIGTERM:
case SIGQUIT: case SIGQUIT:
leaving = 1; leaving = 1;
break; break;
@@ -265,6 +281,39 @@ void g15daemon_sighandler(int sig) {
} }
} }
#ifndef HAVE_DAEMON
/* daemon() is not posix compliant, so we roll our own if needed.*/
int daemon(int nochdir, int noclose) {
pid_t pid;
if(nochdir<1)
chdir("/");
pid = fork();
switch(pid){
case -1:
printf("Unable to daemonise!\n");
return -1;
break;
case 0: {
umask(0);
if(setsid()==-1) {
perror("setsid");
return -1;
}
if(noclose<1) {
freopen( "/dev/null", "r", stdin);
freopen( "/dev/null", "w", stdout);
freopen( "/dev/null", "w", stderr);
}
break;
}
default:
_exit(0);
}
return 0;
}
#endif
int main (int argc, char *argv[]) int main (int argc, char *argv[])
{ {
@@ -275,10 +324,11 @@ int main (int argc, char *argv[])
struct sigaction new_action; struct sigaction new_action;
cycle_key = G15_KEY_L1; cycle_key = G15_KEY_L1;
unsigned char user[256]; unsigned char user[256];
unsigned int lcdlevel = 1;
pthread_t keyboard_thread; pthread_t keyboard_thread;
pthread_t lcd_thread; pthread_t lcd_thread;
memset(user,0,256);
for (i=0;i<argc;i++) { for (i=0;i<argc;i++) {
char daemonargs[20]; char daemonargs[20];
@@ -309,13 +359,13 @@ int main (int argc, char *argv[])
if (!strncmp(daemonargs, "-h",2) || !strncmp(daemonargs, "--help",6)) { if (!strncmp(daemonargs, "-h",2) || !strncmp(daemonargs, "--help",6)) {
printf("G15Daemon version %s - %s\n",VERSION,uf_return_running() >= 0 ?"Loaded & Running":"Not Running"); printf("G15Daemon version %s - %s\n",VERSION,uf_return_running() >= 0 ?"Loaded & Running":"Not Running");
printf("%s -h (--help) or -k (--kill) or -s (--switch) or -d (--debug) or -v (--version)\n\n -k will kill a previous incarnation",argv[0]); printf("%s -h (--help) or -k (--kill) or -s (--switch) or -d (--debug) [level] or -v (--version) or -l (--lcdlevel) [0-2] \n\n -k will kill a previous incarnation",argv[0]);
#ifdef LIBG15_VERSION #ifdef LIBG15_VERSION
#if LIBG15_VERSION >= 1200 #if LIBG15_VERSION >= 1200
printf(", if uppercase -K or -KILL turn off the keyboard backlight on the way out."); printf(", if uppercase -K or -KILL turn off the keyboard backlight on the way out.");
#endif #endif
#endif #endif
printf("\n -h shows this help\n -s changes the screen-switch key from MR to L1\n -d debug mode - stay in foreground and output all debug messages to STDERR\n -v show version\n"); printf("\n -h shows this help\n -s changes the screen-switch key from L1 to MR (beware)\n -d debug mode - stay in foreground and output all debug messages to STDERR\n -v show version\n -l set default LCD backlight level\n");
exit(0); exit(0);
} }
@@ -340,6 +390,21 @@ int main (int argc, char *argv[])
} }
} }
if (!strncmp(daemonargs, "-l",2) || !strncmp(daemonargs, "--lcdlevel",7)) {
if((argv[i+1])!=NULL)
if(isdigit(argv[i+1][0])){
lcdlevel = atoi(argv[i+1]);
}
}
}
if(g15daemon_debug){
g15daemon_log(LOG_INFO, "G15Daemon %s Build Date: %s",PACKAGE_VERSION,BUILD_DATE);
g15daemon_log(LOG_DEBUG, "Build OS: %s",BUILD_OS_NAME);
g15daemon_log(LOG_DEBUG, "With compiler: %s",COMPILER_VERSION);
fprintf(stderr, "G15Daemon CMDLINE ARGS: ");
for(i=1;i<argc;i++)
fprintf(stderr, "%s ",argv[i]);
fprintf(stderr,"\n");
} }
if(uf_return_running()>=0) { if(uf_return_running()>=0) {
g15daemon_log(LOG_ERR,"G15Daemon already running.. Exiting"); g15daemon_log(LOG_ERR,"G15Daemon already running.. Exiting");
@@ -350,6 +415,21 @@ int main (int argc, char *argv[])
if(LIBG15_VERSION>=1200) if(LIBG15_VERSION>=1200)
libg15Debug(g15daemon_debug); libg15Debug(g15daemon_debug);
#ifdef OSTYPE_DARWIN
/* OS X: load codeless kext */
retval = system("/sbin/kextload " "/System/Library/Extensions/libusbshield.kext");
if (WIFEXITED(retval)){
if (WEXITSTATUS(retval) !=0){
g15daemon_log(LOG_ERR,"Unable to load USB shield kext...exiting");
exit(1);
}
} else {
g15daemon_log(LOG_ERR,"Unable to launch kextload...exiting");
exit(1);
}
#endif
/* init stuff here.. */ /* init stuff here.. */
if((retval=initLibG15())!=G15_NO_ERROR){ if((retval=initLibG15())!=G15_NO_ERROR){
g15daemon_log(LOG_ERR,"Unable to attach to the G15 Keyboard... exiting"); g15daemon_log(LOG_ERR,"Unable to attach to the G15 Keyboard... exiting");
@@ -367,7 +447,7 @@ int main (int argc, char *argv[])
struct passwd *nobody; struct passwd *nobody;
unsigned char location[1024]; unsigned char location[1024];
openlog("g15daemon", LOG_PID, LOG_DAEMON); openlog("g15daemon", LOG_PID, LOG_USER);
if(strlen((char*)user)==0){ if(strlen((char*)user)==0){
nobody = getpwnam("nobody"); nobody = getpwnam("nobody");
}else { }else {
@@ -386,7 +466,8 @@ int main (int argc, char *argv[])
setLCDContrast(1); setLCDContrast(1);
setLEDs(0); setLEDs(0);
lcdlist->kb_backlight_state=1; lcdlist->kb_backlight_state=1;
setLCDBrightness(lcdlist->kb_backlight_state); lcdlist->current->lcd->backlight_state=lcdlevel;
setLCDBrightness(lcdlevel);
#ifdef LIBG15_VERSION #ifdef LIBG15_VERSION
#if LIBG15_VERSION >= 1200 #if LIBG15_VERSION >= 1200
@@ -399,27 +480,26 @@ int main (int argc, char *argv[])
if(!cycle_cmdline_override){ if(!cycle_cmdline_override){
cycle_key = 1==g15daemon_cfg_read_bool(global_cfg,"Use MR as Cycle Key",0)?G15_KEY_MR:G15_KEY_L1; cycle_key = 1==g15daemon_cfg_read_bool(global_cfg,"Use MR as Cycle Key",0)?G15_KEY_MR:G15_KEY_L1;
} }
#ifndef OSTYPE_SOLARIS
/* all other processes/threads should be seteuid nobody */ /* all other processes/threads should be seteuid nobody */
if(nobody!=NULL) { if(nobody!=NULL) {
seteuid(nobody->pw_uid); seteuid(nobody->pw_uid);
setegid(nobody->pw_gid); setegid(nobody->pw_gid);
} }
#endif
/* initialise the pthread condition for the LCD thread */
g15daemon_init_refresh();
pthread_mutex_init(&g15lib_mutex, NULL); pthread_mutex_init(&g15lib_mutex, NULL);
pthread_attr_init(&attr); pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr,512*1024); /* set stack to 512k - dont need 8Mb !! */
pthread_attr_setscope(&attr,PTHREAD_SCOPE_SYSTEM);
int thread_policy=SCHED_RR;
pthread_attr_setschedpolicy(&attr,thread_policy);
pthread_attr_setstacksize(&attr,512*1024); /* set stack to 512k - dont need 8Mb !! */
if (pthread_create(&keyboard_thread, &attr, keyboard_watch_thread, lcdlist) != 0) { if (pthread_create(&keyboard_thread, &attr, keyboard_watch_thread, lcdlist) != 0) {
g15daemon_log(LOG_ERR,"Unable to create keyboard listener thread. Exiting"); g15daemon_log(LOG_ERR,"Unable to create keyboard listener thread. Exiting");
goto exitnow; goto exitnow;
} }
pthread_attr_setstacksize(&attr,128*1024); pthread_attr_setstacksize(&attr,128*1024);
/* all other threads have a lower priority... maybe */
pthread_attr_setscope(&attr,PTHREAD_SCOPE_PROCESS);
thread_policy=SCHED_OTHER;
pthread_attr_setschedpolicy(&attr,thread_policy);
if (pthread_create(&lcd_thread, &attr, lcd_draw_thread, lcdlist) != 0) { if (pthread_create(&lcd_thread, &attr, lcd_draw_thread, lcdlist) != 0) {
g15daemon_log(LOG_ERR,"Unable to create display thread. Exiting"); g15daemon_log(LOG_ERR,"Unable to create display thread. Exiting");
@@ -438,19 +518,19 @@ int main (int argc, char *argv[])
free (canvas); free (canvas);
uf_write_buf_to_g15(lcdlist->tail->lcd); uf_write_buf_to_g15(lcdlist->tail->lcd);
snprintf((char*)location,1024,"%s/%s",DATADIR,"g15daemon/plugins"); snprintf((char*)location,1024,"%s",PLUGINDIR);
g15_open_all_plugins(lcdlist,(char*)location); loaded_plugins = g15_open_all_plugins(lcdlist,(char*)location);
new_action.sa_handler = g15daemon_sighandler; new_action.sa_handler = g15daemon_sighandler;
new_action.sa_flags = 0; new_action.sa_flags = 0;
sigaction(SIGINT, &new_action, NULL); sigaction(SIGINT, &new_action, NULL);
sigaction(SIGQUIT, &new_action, NULL); sigaction(SIGQUIT, &new_action, NULL);
sigaction(SIGTERM, &new_action, NULL);
sigaction(SIGUSR1, &new_action, NULL); sigaction(SIGUSR1, &new_action, NULL);
do { do {
sleep(1); pause();
} while( leaving == 0); } while( leaving == 0);
g15daemon_log(LOG_INFO,"Leaving by request"); g15daemon_log(LOG_INFO,"Leaving by request");
@@ -458,6 +538,9 @@ int main (int argc, char *argv[])
pthread_join(lcd_thread,NULL); pthread_join(lcd_thread,NULL);
pthread_join(keyboard_thread,NULL); pthread_join(keyboard_thread,NULL);
/* switch off the lcd backlight */ /* switch off the lcd backlight */
char *blank=g15daemon_xmalloc(G15_BUFFER_LEN);
writePixmapToLCD((unsigned char*)blank);
free(blank);
setLCDBrightness(0); setLCDBrightness(0);
#ifdef LIBG15_VERSION #ifdef LIBG15_VERSION
#if LIBG15_VERSION >= 1200 #if LIBG15_VERSION >= 1200
@@ -479,6 +562,7 @@ exitnow:
seteuid(0); seteuid(0);
setegid(0); setegid(0);
closelog(); closelog();
g15daemon_quit_refresh();
uf_conf_write(lcdlist,"/etc/g15daemon.conf"); uf_conf_write(lcdlist,"/etc/g15daemon.conf");
uf_conf_free(lcdlist); uf_conf_free(lcdlist);
unlink("/var/run/g15daemon.pid"); unlink("/var/run/g15daemon.pid");
+121 -18
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 190 $ - $Date: 2006-11-22 03:01:03 +1030 (Wed, 22 Nov 2006) $ $Author: mlampard $ $Revision: 449 $ - $Date: 2008-01-24 17:42:07 +1030 (Thu, 24 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -44,10 +44,14 @@
#include "g15daemon.h" #include "g15daemon.h"
#include <libg15.h> #include <libg15.h>
#include <stdarg.h> #include <stdarg.h>
#include <libg15render.h>
extern unsigned int g15daemon_debug; extern unsigned int g15daemon_debug;
extern volatile int leaving;
#define G15DAEMON_PIDFILE "/var/run/g15daemon.pid" #define G15DAEMON_PIDFILE "/var/run/g15daemon.pid"
pthread_cond_t lcd_refresh = PTHREAD_COND_INITIALIZER;
/* if no exitfunc or eventhandler, member should be NULL */ /* if no exitfunc or eventhandler, member should be NULL */
const plugin_info_t generic_info[] = { const plugin_info_t generic_info[] = {
@@ -71,6 +75,45 @@ void *g15daemon_xmalloc(size_t size) {
return ptr; return ptr;
} }
static int refresh_pending=0;
void g15daemon_init_refresh() {
pthread_condattr_t attr;
pthread_cond_init(&lcd_refresh, &attr);
}
void g15daemon_send_refresh(lcd_t *lcd) {
if(lcd==lcd->masterlist->current->lcd||lcd->state_changed) {
pthread_cond_broadcast(&lcd_refresh);
refresh_pending++;
}
}
void g15daemon_wait_refresh() {
pthread_mutex_t dummy_mutex;
struct timespec timeout;
int retval;
if(refresh_pending<1) {
/* Create a dummy mutex which doesn't unlock for sure while waiting. */
pthread_mutex_init(&dummy_mutex, NULL);
pthread_mutex_lock(&dummy_mutex);
start:
time(&timeout.tv_sec);
timeout.tv_sec += 1;
timeout.tv_nsec = 0L;
retval=pthread_cond_timedwait(&lcd_refresh, &dummy_mutex, &timeout);
if(!leaving && retval == ETIMEDOUT)
goto start;
pthread_mutex_unlock(&dummy_mutex);
pthread_mutex_destroy(&dummy_mutex);
}
refresh_pending--;
}
void g15daemon_quit_refresh() {
pthread_cond_destroy(&lcd_refresh);
}
int uf_return_running(){ int uf_return_running(){
int fd; int fd;
char pidtxt[128]; char pidtxt[128];
@@ -133,20 +176,36 @@ int uf_create_pidfile() {
/* syslog wrapper */ /* syslog wrapper */
int g15daemon_log (int priority, const char *fmt, ...) { int g15daemon_log (int priority, const char *fmt, ...) {
va_list argp; va_list argp;
va_start (argp, fmt); va_start (argp, fmt);
if(g15daemon_debug == 0) int real_prio=0;
switch(g15daemon_debug) {
case 0:
case 1:
real_prio = LOG_WARNING;
break;
case 2:
real_prio = LOG_INFO;
break;
default:
real_prio = LOG_DEBUG;
}
if(real_prio>=priority) {
if(g15daemon_debug == 0) {
vsyslog(priority, fmt, argp); vsyslog(priority, fmt, argp);
else { } else {
vfprintf(stderr,fmt,argp); vfprintf(stderr,fmt,argp);
fprintf(stderr,"\n"); fprintf(stderr,"\n");
} }
}
va_end (argp); va_end (argp);
return 0; return 0;
} }
/* takes a 6880 byte (1byte==1pixel) buffer and packs it into libg15 format. */
void g15daemon_convert_buf(lcd_t *lcd, unsigned char * orig_buf) void g15daemon_convert_buf(lcd_t *lcd, unsigned char * orig_buf)
{ {
unsigned int x,y,val; unsigned int x,y,val;
@@ -166,13 +225,31 @@ void g15daemon_convert_buf(lcd_t *lcd, unsigned char * orig_buf)
} }
} }
/* wrap the libg15 function */ /* wrap the libg15 functions */
void uf_write_buf_to_g15(lcd_t *lcd) int uf_write_buf_to_g15(lcd_t *lcd)
{ {
int retval = 0;
#ifdef LIBUSB_BLOCKS
retval = writePixmapToLCD(lcd->buf);
#else
pthread_mutex_lock(&g15lib_mutex); pthread_mutex_lock(&g15lib_mutex);
writePixmapToLCD(lcd->buf); retval = writePixmapToLCD(lcd->buf);
pthread_mutex_unlock(&g15lib_mutex); pthread_mutex_unlock(&g15lib_mutex);
return; #endif
return retval;
}
int uf_read_keypresses(unsigned int *keypresses, unsigned int timeout)
{
int retval=0;
#ifdef LIBUSB_BLOCKS
retval = getPressedKeys(keypresses, timeout);
#else
pthread_mutex_lock(&g15lib_mutex);
retval = getPressedKeys(keypresses, timeout);
pthread_mutex_unlock(&g15lib_mutex);
#endif
return retval;
} }
/* Sleep routine (hackish). */ /* Sleep routine (hackish). */
@@ -195,18 +272,24 @@ void g15daemon_sleep(int seconds) {
pthread_mutex_destroy(&dummy_mutex); pthread_mutex_destroy(&dummy_mutex);
} }
/* microsecond sleep routine. */
int g15daemon_usleep(int useconds) {
struct timeval timeout;
if(useconds < 10000)
useconds = 10000;
timeout.tv_sec = useconds / 1000000;
timeout.tv_usec = useconds % 1000000;
return select (0,0,0,0,&timeout);
}
/* millisecond sleep routine. */ /* millisecond sleep routine. */
int g15daemon_msleep(int milliseconds) { int g15daemon_msleep(int milliseconds) {
struct timespec timeout; return g15daemon_usleep(milliseconds*1000);
if(milliseconds>999)
milliseconds=999;
timeout.tv_sec = 0;
timeout.tv_nsec = milliseconds*1000000;
return nanosleep (&timeout, NULL);
} }
unsigned int g15daemon_gettime_ms(){ unsigned int g15daemon_gettime_ms(){
struct timeval tv; struct timeval tv;
gettimeofday(&tv,NULL); gettimeofday(&tv,NULL);
@@ -367,7 +450,6 @@ char * uf_remove_whitespace(char *str){
int g15daemon_cfg_write_string(config_section_t *section, char *key, char *val){ int g15daemon_cfg_write_string(config_section_t *section, char *key, char *val){
config_items_t *new = NULL; config_items_t *new = NULL;
const char empty[]=" ";
if(section==NULL) if(section==NULL)
return -1; return -1;
@@ -519,7 +601,7 @@ int uf_conf_open(g15daemon_t *list, char *filename) {
int config_fd=-1; int config_fd=-1;
char *sect; char *sect;
char *start; char *start;
char *bar; char *bar = NULL;
int i; int i;
struct stat stats; struct stat stats;
@@ -583,3 +665,24 @@ int uf_conf_open(g15daemon_t *list, char *filename) {
return 0; return 0;
} }
int uf_screendump_pbm(unsigned char *buffer,char *filename) {
FILE *f;
int x,y;
#define WIDTH 40
g15canvas *canvas=g15daemon_xmalloc(sizeof(g15canvas));
memcpy(canvas->buffer,buffer,LCD_BUFSIZE);
f = fopen(filename,"w+");
fprintf(f,"P1\n160 43\n");
fprintf(f,"# G15 screendump - %s\n\n",filename);
for(y=0;y<43;y++)
for(x=0;x<160;x++) {
fprintf(f,"%i",g15r_getPixel(canvas,x,y));
if(x%WIDTH==WIDTH-1)
fprintf(f,"\n");
}
fclose(f);
free(canvas);
return 0;
}
-29
View File
@@ -1,29 +0,0 @@
K 25
svn:wc:ra_dav:version-url
V 65
/svnroot/g15daemon/!svn/ver/103/trunk/g15daemon-wip/lang-bindings
END
perl-G15Daemon-0.2.tar.gz
K 25
svn:wc:ra_dav:version-url
V 91
/svnroot/g15daemon/!svn/ver/103/trunk/g15daemon-wip/lang-bindings/perl-G15Daemon-0.2.tar.gz
END
pyg15daemon-0.0.tar.bz2
K 25
svn:wc:ra_dav:version-url
V 89
/svnroot/g15daemon/!svn/ver/103/trunk/g15daemon-wip/lang-bindings/pyg15daemon-0.0.tar.bz2
END
G15Daemon.pm
K 25
svn:wc:ra_dav:version-url
V 78
/svnroot/g15daemon/!svn/ver/103/trunk/g15daemon-wip/lang-bindings/G15Daemon.pm
END
README
K 25
svn:wc:ra_dav:version-url
V 72
/svnroot/g15daemon/!svn/ver/103/trunk/g15daemon-wip/lang-bindings/README
END
-80
View File
@@ -1,80 +0,0 @@
8
dir
251
https://svn.sourceforge.net/svnroot/g15daemon/trunk/g15daemon-wip/lang-bindings
https://svn.sourceforge.net/svnroot/g15daemon
2006-11-09T21:23:46.211835Z
103
mlampard
svn:special svn:externals svn:needs-lock
ab83d0d9-5618-0410-a047-8efd564e0644
perl-G15Daemon-0.2.tar.gz
file
2006-12-25T21:02:07.000000Z
e4a60ccd47ceeb28a9322a12ddc3eae0
2006-11-09T21:23:46.211835Z
103
mlampard
has-props
pyg15daemon-0.0.tar.bz2
file
2006-12-25T21:02:07.000000Z
dbf57324f0bef4625b9fb75d8122c86a
2006-11-09T21:23:46.211835Z
103
mlampard
has-props
G15Daemon.pm
file
2006-12-25T21:02:07.000000Z
6c2a3e258866b77162a3e758bf03ce2e
2006-11-09T21:23:46.211835Z
103
mlampard
has-props
README
file
2006-12-25T21:02:07.000000Z
e353e41bc9d3d686a4258961bbf48331
2006-11-09T21:23:46.211835Z
103
mlampard
has-props
-1
View File
@@ -1 +0,0 @@
8
@@ -1,13 +0,0 @@
K 13
svn:eol-style
V 6
native
K 12
svn:keywords
V 23
Author Date Id Revision
K 13
svn:mime-type
V 10
text/plain
END
@@ -1,13 +0,0 @@
K 13
svn:eol-style
V 6
native
K 12
svn:keywords
V 23
Author Date Id Revision
K 13
svn:mime-type
V 10
text/plain
END
@@ -1,5 +0,0 @@
K 13
svn:mime-type
V 24
application/octet-stream
END
@@ -1,5 +0,0 @@
K 13
svn:mime-type
V 24
application/octet-stream
END
@@ -1,99 +0,0 @@
package G15Daemon;
use base 'Exporter';
use warnings;
use strict;
use 5.008007;
our $VERSION = '0.2';
require Exporter;
our @EXPORT = qw( $g15wbmp $g15pbuf $g15txt );
use Inline C =>
DATA =>
LIBS => '-lg15daemon_client';
our $WIDTH = '160';
our $HEIGHT = '43';
*g15pbuf = \0;
*g15txt = \1;
*g15wbmp = \2;
sub apiversion {
my $self = shift;
return g15version();
}
sub width {
my $self = shift;
return $WIDTH;
}
sub height {
my $self = shift;
return $HEIGHT;
}
sub new
{
my ($class, $screentype) = @_;
my $sock = g15newscreen ($screentype);
my $self = {socket => $sock};
bless $self, $_[0];
}
sub DESTROY {
my $self = shift;
return g15closescreen($self->{socket});
}
sub closescreen {
my $self = shift;
return g15closescreen($self->{socket});
}
sub send {
my $self = shift;
my ($buffer) = @_;
my $len = length($buffer);
return g15send($self->{socket}, $buffer, $len);
}
sub recv{
my $self = shift;
my ($buffer, $len) = @_;
return g15recv($self->{socket}, $buffer, $len);
}
1;
__DATA__
__C__
#include <g15daemon_client.h>
SV* g15version() {
return newSVpvf("%s\n", G15DAEMON_VERSION);
}
int g15newscreen (int screentype) {
return new_g15_screen(screentype);
}
int g15closescreen(int sockfd) {
return g15_close_screen(sockfd);
}
int g15send(int sockfd, char *buf, unsigned int len) {
int retval = g15_send(sockfd, buf, len);
memset(buf,0,len);
return retval;
}
char * g15recv(int sockfd, char *buf, unsigned int len) {
g15_recv(sockfd, buf, len);
return buf;
}
__END__
@@ -1,16 +0,0 @@
***** Perl bindings *****
To use the perl language bindings for libg15daemon_client, copy the
G15Daemon.pm file into a perl include folder, or untar the archive and run
the makefile with:
perl Makefile.PL && make && make install
You'll need to have the
Inline:: perl module installed, which is (as usual) available on CPAN.
The bindings are pretty basic, see the contribs folder for an example of
use.
***** Python Bindings *****
The pyg15daemon bindings are available in this folder, or the latest release
of these bindings are available at http://abraumhal.de/pyg15daemon/
+74 -57
View File
@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,11 @@
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
@@ -37,6 +33,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@
subdir = libg15daemon_client subdir = libg15daemon_client
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/Makefile.in
@@ -59,17 +56,21 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
libg15daemon_client_la_LIBADD = libg15daemon_client_la_LIBADD =
am_libg15daemon_client_la_OBJECTS = g15daemon_net.lo am_libg15daemon_client_la_OBJECTS = g15daemon_net.lo
libg15daemon_client_la_OBJECTS = $(am_libg15daemon_client_la_OBJECTS) libg15daemon_client_la_OBJECTS = $(am_libg15daemon_client_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) libg15daemon_client_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libg15daemon_client_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libg15daemon_client_la_SOURCES) SOURCES = $(libg15daemon_client_la_SOURCES)
DIST_SOURCES = $(libg15daemon_client_la_SOURCES) DIST_SOURCES = $(libg15daemon_client_la_SOURCES)
includeHEADERS_INSTALL = $(INSTALL_HEADER) includeHEADERS_INSTALL = $(INSTALL_HEADER)
@@ -78,8 +79,6 @@ ETAGS = etags
CTAGS = ctags CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AR = @AR@ AR = @AR@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
@@ -106,11 +105,14 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ F77 = @F77@
FFLAGS = @FFLAGS@ FFLAGS = @FFLAGS@
G15DAEMON_PLUGIN_DIR = @G15DAEMON_PLUGIN_DIR@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KEXT_LOCATION = @KEXT_LOCATION@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
@@ -118,6 +120,7 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -127,17 +130,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@ ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@@ -149,6 +153,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -176,8 +181,15 @@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
METASOURCES = AUTO METASOURCES = AUTO
lib_LTLIBRARIES = libg15daemon_client.la lib_LTLIBRARIES = libg15daemon_client.la
libg15daemon_client_la_LDFLAGS = -version-info 1:2:0 libg15daemon_client_la_LDFLAGS = -version-info 1:2:0
@@ -218,7 +230,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-libLTLIBRARIES: $(lib_LTLIBRARIES) install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \ if test -f $$p; then \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
@@ -229,7 +241,7 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
uninstall-libLTLIBRARIES: uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \ p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
@@ -244,7 +256,7 @@ clean-libLTLIBRARIES:
rm -f "$${dir}/so_locations"; \ rm -f "$${dir}/so_locations"; \
done done
libg15daemon_client.la: $(libg15daemon_client_la_OBJECTS) $(libg15daemon_client_la_DEPENDENCIES) libg15daemon_client.la: $(libg15daemon_client_la_OBJECTS) $(libg15daemon_client_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libg15daemon_client_la_LDFLAGS) $(libg15daemon_client_la_OBJECTS) $(libg15daemon_client_la_LIBADD) $(LIBS) $(libg15daemon_client_la_LINK) -rpath $(libdir) $(libg15daemon_client_la_OBJECTS) $(libg15daemon_client_la_LIBADD) $(LIBS)
mostlyclean-compile: mostlyclean-compile:
-rm -f *.$(OBJEXT) -rm -f *.$(OBJEXT)
@@ -255,22 +267,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g15daemon_net.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g15daemon_net.Plo@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $< @am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -280,13 +292,9 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-includeHEADERS: $(include_HEADERS) install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; for p in $$list; do \ @list='$(include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
@@ -351,22 +359,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES) distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; for file in $$list; do \ list='$(DISTFILES)'; \
case $$file in \ dist_files=`for file in $$list; do echo $$file; done | \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ sed -e "s|^$$srcdirstrip/||;t" \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \ esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
@@ -382,7 +389,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS) all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs: installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-am
install-exec: install-exec-am install-exec: install-exec-am
@@ -417,7 +424,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR) -rm -rf ./$(DEPDIR)
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \ distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags distclean-tags
dvi: dvi-am dvi: dvi-am
@@ -431,12 +438,20 @@ info-am:
install-data-am: install-includeHEADERS install-data-am: install-includeHEADERS
install-dvi: install-dvi-am
install-exec-am: install-libLTLIBRARIES install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-info: install-info-am install-info: install-info-am
install-man: install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
@@ -457,21 +472,23 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-includeHEADERS uninstall-info-am \ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
uninstall-libLTLIBRARIES
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \ clean-libLTLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-generic distclean-libtool \ distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \ distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \ install install-am install-data install-data-am install-dvi \
install-exec-am install-includeHEADERS install-info \ install-dvi-am install-exec install-exec-am install-html \
install-info-am install-libLTLIBRARIES install-man \ install-html-am install-includeHEADERS install-info \
install-strip installcheck installcheck-am installdirs \ install-info-am install-libLTLIBRARIES install-man install-pdf \
maintainer-clean maintainer-clean-generic mostlyclean \ install-pdf-am install-ps install-ps-am install-strip \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ installcheck installcheck-am installdirs maintainer-clean \
pdf pdf-am ps ps-am tags uninstall uninstall-am \ maintainer-clean-generic mostlyclean mostlyclean-compile \
uninstall-includeHEADERS uninstall-info-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-includeHEADERS \
uninstall-libLTLIBRARIES uninstall-libLTLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
+5 -3
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 240 $ - $Date: 2007-01-04 02:35:38 +1030 (Thu, 04 Jan 2007) $ $Author: mlampard $ $Revision: 410 $ - $Date: 2008-01-13 13:28:55 +1030 (Sun, 13 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -38,6 +38,7 @@ extern "C"
#define G15_TEXTBUF 1 #define G15_TEXTBUF 1
#define G15_WBMPBUF 2 #define G15_WBMPBUF 2
#define G15_G15RBUF 3 #define G15_G15RBUF 3
#define G15_SHMRBUF 4
/* client / server commands - see README.devel for details on use */ /* client / server commands - see README.devel for details on use */
#define G15DAEMON_KEY_HANDLER 0x10 #define G15DAEMON_KEY_HANDLER 0x10
@@ -49,6 +50,7 @@ extern "C"
#define G15DAEMON_SWITCH_PRIORITIES 'p' #define G15DAEMON_SWITCH_PRIORITIES 'p'
#define G15DAEMON_IS_FOREGROUND 'v' #define G15DAEMON_IS_FOREGROUND 'v'
#define G15DAEMON_IS_USER_SELECTED 'u' #define G15DAEMON_IS_USER_SELECTED 'u'
#define G15DAEMON_NEVER_SELECT 'n'
const char *g15daemon_version(); const char *g15daemon_version();
@@ -66,7 +68,7 @@ int g15_send(int sock, char *buf, unsigned int len);
int g15_recv(int sock, char *buf, unsigned int len); int g15_recv(int sock, char *buf, unsigned int len);
/* send a command (defined above) to the daemon. any replies from the daemon are returned */ /* send a command (defined above) to the daemon. any replies from the daemon are returned */
int g15_send_cmd (int sock, unsigned char command, unsigned char value); unsigned long g15_send_cmd (int sock, unsigned char command, unsigned char value);
/* receive an oob byte from the daemon, used internally by g15_send_cmd, but useful elsewhere */ /* receive an oob byte from the daemon, used internally by g15_send_cmd, but useful elsewhere */
#define G15_FOREGROUND_SENT_OOB 1 #define G15_FOREGROUND_SENT_OOB 1
int g15_recv_oob_answer(int sock); int g15_recv_oob_answer(int sock);
+65 -8
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 244 $ - $Date: 2007-01-05 08:04:05 +1030 (Fri, 05 Jan 2007) $ $Author: mlampard $ $Revision: 451 $ - $Date: 2008-01-25 15:15:04 +1030 (Fri, 25 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -25,6 +25,7 @@
*/ */
#include <string.h> #include <string.h>
#include <stdlib.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
@@ -33,12 +34,17 @@
#include <unistd.h> #include <unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h>
#include <config.h> #include <config.h>
#include <libg15.h> #include <libg15.h>
#include "g15daemon_client.h" #include "g15daemon_client.h"
#ifndef SO_PRIORITY
#define SO_PRIORITY 12
#endif
#define G15SERVER_PORT 15550 #define G15SERVER_PORT 15550
#define G15SERVER_ADDR "127.0.0.1" #define G15SERVER_ADDR "127.0.0.1"
int leaving = 0; int leaving = 0;
@@ -47,14 +53,61 @@ const char *g15daemon_version () {
return VERSION; return VERSION;
} }
#ifdef HAVE_BACKTRACE
#include <signal.h>
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif
#define BACKTRACE_LEN 100
_Bool segv_init = 0;
/* sighandler function to print backtrace on segfault */
void g15_sighandler(int sig) {
int i,nptrs;
void *buf[BACKTRACE_LEN];
char **btfuncs;
switch (sig) {
case SIGSEGV:
#ifdef HAVE_EXECINFO_H
fprintf(stderr, "The application (or it's libraries) caught a Segmentation Fault. Backtrace follows:\n");
nptrs = backtrace(buf,BACKTRACE_LEN);
btfuncs = backtrace_symbols(buf,nptrs);
if(btfuncs == NULL)
return;
for(i=0;i<nptrs;i++)
fprintf(stderr,"Backtrace: %s\n",btfuncs[i]);
fprintf(stderr,"End of Backtrace.\n");
free(btfuncs);
exit(1);
#endif
break;
}
}
#endif
int new_g15_screen(int screentype) int new_g15_screen(int screentype)
{ {
struct sigaction new_sigaction;
int g15screen_fd; int g15screen_fd;
struct sockaddr_in serv_addr; struct sockaddr_in serv_addr;
static int sighandler_init=0;
/* raise the priority of our packets */ /* raise the priority of our packets */
int tos = 0x6; int tos = 0x6;
char buffer[256]; char buffer[256];
if(sighandler_init==0) {
#ifdef HAVE_BACKTRACE
new_sigaction.sa_handler = g15_sighandler;
new_sigaction.sa_flags = 0;
sigaction(SIGSEGV,&new_sigaction,NULL);
#endif
sighandler_init=1;
}
g15screen_fd = socket(AF_INET, SOCK_STREAM, 0); g15screen_fd = socket(AF_INET, SOCK_STREAM, 0);
if (g15screen_fd < 0) if (g15screen_fd < 0)
@@ -173,7 +226,7 @@ int g15_recv_oob_answer(int sock) {
return packet[0]; return packet[0];
} }
int g15_send_cmd (int sock, unsigned char command, unsigned char value) unsigned long g15_send_cmd (int sock, unsigned char command, unsigned char value)
{ {
int retval; int retval;
unsigned char packet[2]; unsigned char packet[2];
@@ -213,11 +266,15 @@ int g15_send_cmd (int sock, unsigned char command, unsigned char value)
packet[0] = (unsigned char)command; packet[0] = (unsigned char)command;
retval = send( sock, packet, 1, MSG_OOB ); retval = send( sock, packet, 1, MSG_OOB );
break; break;
case G15DAEMON_NEVER_SELECT:
packet[0] = (unsigned char)command;
retval = send( sock, packet, 1, MSG_OOB );
break;
case G15DAEMON_GET_KEYSTATE:{ case G15DAEMON_GET_KEYSTATE:{
retval = 0; retval = 0;
packet[0] = (unsigned char)command; unsigned long keystate = 0;
send( sock, packet, 1, MSG_OOB ); g15_recv(sock, (char*)&keystate, sizeof(keystate));
recv(sock, &retval, sizeof(retval),0); return keystate;
break; break;
} }
case G15DAEMON_IS_FOREGROUND:{ case G15DAEMON_IS_FOREGROUND:{
@@ -229,12 +286,12 @@ int g15_send_cmd (int sock, unsigned char command, unsigned char value)
case G15DAEMON_IS_USER_SELECTED:{ case G15DAEMON_IS_USER_SELECTED:{
packet[0] = (unsigned char)command; packet[0] = (unsigned char)command;
send( sock, packet, 1, MSG_OOB ); send( sock, packet, 1, MSG_OOB );
retval = g15_recv_oob_answer(sock) - 48; retval = g15_recv_oob_answer(sock);
break; break;
} }
default: default:
return -1; return -1;
} }
usleep(1000);
return retval; return retval;
} }
+7 -4
View File
@@ -1,13 +1,16 @@
METASOURCES = AUTO METASOURCES = AUTO
libdir = /usr/share/g15daemon/plugins libdir = @G15DAEMON_PLUGIN_DIR@
AM_CFLAGS = -Wall AM_CFLAGS = -Wall
lib_LTLIBRARIES =g15plugin_uinput.la g15plugin_tcpserver.la g15plugin_clock.la if UINPUT_INTERFACE_PLUGIN
INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
g15plugin_uinput_la_SOURCES = g15_plugin_uinput.c g15plugin_uinput_la_SOURCES = g15_plugin_uinput.c
g15plugin_uinput_la_LDFLAGS = -avoid-version -module g15plugin_uinput_la_LDFLAGS = -avoid-version -module
input_la = g15plugin_uinput.la
endif
lib_LTLIBRARIES = ${input_la} g15plugin_tcpserver.la g15plugin_clock.la
INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
g15plugin_tcpserver_la_SOURCES = g15_plugin_net.c g15plugin_tcpserver_la_SOURCES = g15_plugin_net.c
g15plugin_tcpserver_la_LDFLAGS = -avoid-version -module g15plugin_tcpserver_la_LDFLAGS = -avoid-version -module
+89 -60
View File
@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am. # Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@@ -14,15 +14,11 @@
@SET_MAKE@ @SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c
@@ -36,6 +32,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@
subdir = plugins subdir = plugins
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -57,35 +54,47 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
g15plugin_clock_la_LIBADD = g15plugin_clock_la_LIBADD =
am_g15plugin_clock_la_OBJECTS = g15_plugin_clock.lo am_g15plugin_clock_la_OBJECTS = g15_plugin_clock.lo
g15plugin_clock_la_OBJECTS = $(am_g15plugin_clock_la_OBJECTS) g15plugin_clock_la_OBJECTS = $(am_g15plugin_clock_la_OBJECTS)
g15plugin_clock_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(g15plugin_clock_la_LDFLAGS) $(LDFLAGS) -o $@
g15plugin_tcpserver_la_LIBADD = g15plugin_tcpserver_la_LIBADD =
am_g15plugin_tcpserver_la_OBJECTS = g15_plugin_net.lo am_g15plugin_tcpserver_la_OBJECTS = g15_plugin_net.lo
g15plugin_tcpserver_la_OBJECTS = $(am_g15plugin_tcpserver_la_OBJECTS) g15plugin_tcpserver_la_OBJECTS = $(am_g15plugin_tcpserver_la_OBJECTS)
g15plugin_tcpserver_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(g15plugin_tcpserver_la_LDFLAGS) $(LDFLAGS) -o $@
g15plugin_uinput_la_LIBADD = g15plugin_uinput_la_LIBADD =
am_g15plugin_uinput_la_OBJECTS = g15_plugin_uinput.lo am__g15plugin_uinput_la_SOURCES_DIST = g15_plugin_uinput.c
@UINPUT_INTERFACE_PLUGIN_TRUE@am_g15plugin_uinput_la_OBJECTS = \
@UINPUT_INTERFACE_PLUGIN_TRUE@ g15_plugin_uinput.lo
g15plugin_uinput_la_OBJECTS = $(am_g15plugin_uinput_la_OBJECTS) g15plugin_uinput_la_OBJECTS = $(am_g15plugin_uinput_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) g15plugin_uinput_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(g15plugin_uinput_la_LDFLAGS) $(LDFLAGS) -o $@
@UINPUT_INTERFACE_PLUGIN_TRUE@am_g15plugin_uinput_la_rpath = -rpath \
@UINPUT_INTERFACE_PLUGIN_TRUE@ $(libdir)
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(g15plugin_clock_la_SOURCES) \ SOURCES = $(g15plugin_clock_la_SOURCES) \
$(g15plugin_tcpserver_la_SOURCES) \ $(g15plugin_tcpserver_la_SOURCES) \
$(g15plugin_uinput_la_SOURCES) $(g15plugin_uinput_la_SOURCES)
DIST_SOURCES = $(g15plugin_clock_la_SOURCES) \ DIST_SOURCES = $(g15plugin_clock_la_SOURCES) \
$(g15plugin_tcpserver_la_SOURCES) \ $(g15plugin_tcpserver_la_SOURCES) \
$(g15plugin_uinput_la_SOURCES) $(am__g15plugin_uinput_la_SOURCES_DIST)
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AR = @AR@ AR = @AR@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
@@ -112,11 +121,14 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ F77 = @F77@
FFLAGS = @FFLAGS@ FFLAGS = @FFLAGS@
G15DAEMON_PLUGIN_DIR = @G15DAEMON_PLUGIN_DIR@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KEXT_LOCATION = @KEXT_LOCATION@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
@@ -124,6 +136,7 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -133,17 +146,18 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@ ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@@ -155,6 +169,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -169,7 +184,7 @@ htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = /usr/share/g15daemon/plugins libdir = @G15DAEMON_PLUGIN_DIR@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
@@ -182,14 +197,22 @@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
METASOURCES = AUTO METASOURCES = AUTO
AM_CFLAGS = -Wall AM_CFLAGS = -Wall
lib_LTLIBRARIES = g15plugin_uinput.la g15plugin_tcpserver.la g15plugin_clock.la @UINPUT_INTERFACE_PLUGIN_TRUE@g15plugin_uinput_la_SOURCES = g15_plugin_uinput.c
@UINPUT_INTERFACE_PLUGIN_TRUE@g15plugin_uinput_la_LDFLAGS = -avoid-version -module
@UINPUT_INTERFACE_PLUGIN_TRUE@input_la = g15plugin_uinput.la
lib_LTLIBRARIES = ${input_la} g15plugin_tcpserver.la g15plugin_clock.la
INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
g15plugin_uinput_la_SOURCES = g15_plugin_uinput.c
g15plugin_uinput_la_LDFLAGS = -avoid-version -module
g15plugin_tcpserver_la_SOURCES = g15_plugin_net.c g15plugin_tcpserver_la_SOURCES = g15_plugin_net.c
g15plugin_tcpserver_la_LDFLAGS = -avoid-version -module g15plugin_tcpserver_la_LDFLAGS = -avoid-version -module
g15plugin_clock_la_SOURCES = g15_plugin_clock.c g15plugin_clock_la_SOURCES = g15_plugin_clock.c
@@ -229,7 +252,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-libLTLIBRARIES: $(lib_LTLIBRARIES) install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \ if test -f $$p; then \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
@@ -240,7 +263,7 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
uninstall-libLTLIBRARIES: uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \ p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
@@ -255,11 +278,11 @@ clean-libLTLIBRARIES:
rm -f "$${dir}/so_locations"; \ rm -f "$${dir}/so_locations"; \
done done
g15plugin_clock.la: $(g15plugin_clock_la_OBJECTS) $(g15plugin_clock_la_DEPENDENCIES) g15plugin_clock.la: $(g15plugin_clock_la_OBJECTS) $(g15plugin_clock_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(g15plugin_clock_la_LDFLAGS) $(g15plugin_clock_la_OBJECTS) $(g15plugin_clock_la_LIBADD) $(LIBS) $(g15plugin_clock_la_LINK) -rpath $(libdir) $(g15plugin_clock_la_OBJECTS) $(g15plugin_clock_la_LIBADD) $(LIBS)
g15plugin_tcpserver.la: $(g15plugin_tcpserver_la_OBJECTS) $(g15plugin_tcpserver_la_DEPENDENCIES) g15plugin_tcpserver.la: $(g15plugin_tcpserver_la_OBJECTS) $(g15plugin_tcpserver_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(g15plugin_tcpserver_la_LDFLAGS) $(g15plugin_tcpserver_la_OBJECTS) $(g15plugin_tcpserver_la_LIBADD) $(LIBS) $(g15plugin_tcpserver_la_LINK) -rpath $(libdir) $(g15plugin_tcpserver_la_OBJECTS) $(g15plugin_tcpserver_la_LIBADD) $(LIBS)
g15plugin_uinput.la: $(g15plugin_uinput_la_OBJECTS) $(g15plugin_uinput_la_DEPENDENCIES) g15plugin_uinput.la: $(g15plugin_uinput_la_OBJECTS) $(g15plugin_uinput_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(g15plugin_uinput_la_LDFLAGS) $(g15plugin_uinput_la_OBJECTS) $(g15plugin_uinput_la_LIBADD) $(LIBS) $(g15plugin_uinput_la_LINK) $(am_g15plugin_uinput_la_rpath) $(g15plugin_uinput_la_OBJECTS) $(g15plugin_uinput_la_LIBADD) $(LIBS)
mostlyclean-compile: mostlyclean-compile:
-rm -f *.$(OBJEXT) -rm -f *.$(OBJEXT)
@@ -272,22 +295,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g15_plugin_uinput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g15_plugin_uinput.Plo@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $< @am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -298,10 +321,6 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
@@ -351,22 +370,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES) distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; for file in $$list; do \ list='$(DISTFILES)'; \
case $$file in \ dist_files=`for file in $$list; do echo $$file; done | \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ sed -e "s|^$$srcdirstrip/||;t" \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \ esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \ fi; \
@@ -382,7 +400,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES) all-am: Makefile $(LTLIBRARIES)
installdirs: installdirs:
for dir in "$(DESTDIR)$(libdir)"; do \ for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-am
install-exec: install-exec-am install-exec: install-exec-am
@@ -417,7 +435,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR) -rm -rf ./$(DEPDIR)
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \ distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags distclean-tags
dvi: dvi-am dvi: dvi-am
@@ -431,12 +449,20 @@ info-am:
install-data-am: install-data-am:
install-dvi: install-dvi-am
install-exec-am: install-libLTLIBRARIES install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-info: install-info-am install-info: install-info-am
install-man: install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
@@ -457,20 +483,23 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES uninstall-am: uninstall-libLTLIBRARIES
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \ clean-libLTLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-generic distclean-libtool \ distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \ distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \ install install-am install-data install-data-am install-dvi \
install-exec-am install-info install-info-am \ install-dvi-am install-exec install-exec-am install-html \
install-libLTLIBRARIES install-man install-strip installcheck \ install-html-am install-info install-info-am \
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \ maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES
uninstall-libLTLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
+19 -16
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 197 $ - $Date: 2006-12-11 12:26:17 +1030 (Mon, 11 Dec 2006) $ $Author: aneurysm9 $ $Revision: 391 $ - $Date: 2008-01-02 17:02:46 +1030 (Wed, 02 Jan 2008) $ $Author: mlampard $
simple Clock plugin, replace the various functions with your own, and change the g15plugin_info struct below to suit, simple Clock plugin, replace the various functions with your own, and change the g15plugin_info struct below to suit,
edit Makefile.am and compile. Add salt and pepper to taste. For a more advanced plugin that creates it's own lcd screens on-the-fly, edit Makefile.am and compile. Add salt and pepper to taste. For a more advanced plugin that creates it's own lcd screens on-the-fly,
@@ -61,7 +61,7 @@ g15canvas *static_canvas = NULL;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// calc x,y for given minute/hour/sec (pos), cut_off is for radius variations // calc x,y for given minute/hour/sec (pos), cut_off is for radius variations
// ( ie. shorter/longer clock-hands, line parts....) // ( ie. shorter/longer clock-hands, line parts....)
void get_clock_pos(int pos, int *x, int *y, int cut_off) static void get_clock_pos(int pos, int *x, int *y, int cut_off)
{ {
// pos = [0-60] // pos = [0-60]
@@ -86,7 +86,7 @@ void get_clock_pos(int pos, int *x, int *y, int cut_off)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// draw clock frame (only once, as it is stored in static_canvas) // draw clock frame (only once, as it is stored in static_canvas)
// NOTE - coords here are hardcoded ! // NOTE - coords here are hardcoded !
void draw_static_canvas(void) static void draw_static_canvas(void)
{ {
g15canvas *c = static_canvas; g15canvas *c = static_canvas;
int i; int i;
@@ -248,10 +248,10 @@ static int draw_analog(g15canvas *c)
strftime(time,sizeof(time),"%r",t); strftime(time,sizeof(time),"%r",t);
if(showdate) { if(showdate) {
g15r_renderString(c, (unsigned char*)time, 0, G15_TEXT_LARGE, 60, 5); g15r_renderString(c, (unsigned char*)time, 0, G15_TEXT_LARGE, 60, 4);
g15r_renderString(c, (unsigned char*)day, 1, G15_TEXT_LARGE, 60, 5); g15r_renderString(c, (unsigned char*)day, 1, G15_TEXT_LARGE, 60, 5);
g15r_renderString(c, (unsigned char*)date, 2, G15_TEXT_LARGE, 60, 5); g15r_renderString(c, (unsigned char*)date, 2, G15_TEXT_LARGE, 60, 6);
g15r_renderString(c, (unsigned char*)year, 3, G15_TEXT_LARGE, 60, 5); g15r_renderString(c, (unsigned char*)year, 3, G15_TEXT_LARGE, 60, 7);
} else } else
g15r_renderString(c, (unsigned char*)time, 0, G15_TEXT_LARGE, 60, 18); g15r_renderString(c, (unsigned char*)time, 0, G15_TEXT_LARGE, 60, 18);
@@ -259,18 +259,20 @@ static int draw_analog(g15canvas *c)
} }
static int *lcdclock(lcd_t *lcd) static int lcdclock(lcd_t *lcd)
{ {
int ret = 0; int ret = 0;
g15canvas *canvas = (g15canvas *) malloc (sizeof (g15canvas)); g15canvas *canvas = (g15canvas *) malloc (sizeof (g15canvas));
if (canvas != NULL) if (canvas == NULL) {
{ g15daemon_log(LOG_ERR, "Unable to allocate canvas");
return G15_PLUGIN_QUIT;
}
memset(canvas->buffer, 0, G15_BUFFER_LEN); memset(canvas->buffer, 0, G15_BUFFER_LEN);
canvas->mode_cache = 0; canvas->mode_cache = 0;
canvas->mode_reverse = 0; canvas->mode_reverse = 0;
canvas->mode_xor = 0; canvas->mode_xor = 0;
}
memset(lcd->buf,0,G15_BUFFER_LEN); memset(lcd->buf,0,G15_BUFFER_LEN);
@@ -280,7 +282,7 @@ static int *lcdclock(lcd_t *lcd)
ret = draw_analog(canvas); ret = draw_analog(canvas);
memcpy (lcd->buf, canvas->buffer, G15_BUFFER_LEN); memcpy (lcd->buf, canvas->buffer, G15_BUFFER_LEN);
lcd->ident = random(); g15daemon_send_refresh(lcd);
free(canvas); free(canvas);
return G15_PLUGIN_OK; return G15_PLUGIN_OK;
} }
@@ -317,12 +319,13 @@ static int myeventhandler(plugin_event_t *myevent) {
} }
/* completely uncessary function called when plugin is exiting */ /* completely uncessary function called when plugin is exiting */
static void *callmewhenimdone(lcd_t *lcd){ static void callmewhenimdone(lcd_t *lcd){
return NULL; if(static_canvas != NULL) free(static_canvas);
return;
} }
/* completely unnecessary initialisation function which could just as easily have been set to NULL in the g15plugin_info struct */ /* completely unnecessary initialisation function which could just as easily have been set to NULL in the g15plugin_info struct */
static void *myinithandler(lcd_t *lcd){ static int myinithandler(lcd_t *lcd){
config_section_t *clockcfg = g15daemon_cfg_load_section(lcd->masterlist,"Clock"); config_section_t *clockcfg = g15daemon_cfg_load_section(lcd->masterlist,"Clock");
mode=g15daemon_cfg_read_bool(clockcfg, "24hrFormat",1); mode=g15daemon_cfg_read_bool(clockcfg, "24hrFormat",1);
showdate=g15daemon_cfg_read_bool(clockcfg, "ShowDate",0); showdate=g15daemon_cfg_read_bool(clockcfg, "ShowDate",0);
@@ -338,7 +341,7 @@ static void *myinithandler(lcd_t *lcd){
draw_static_canvas(); draw_static_canvas();
} }
return NULL; return static_canvas == NULL ? G15_PLUGIN_QUIT : G15_PLUGIN_OK;
} }
/* if no exitfunc or eventhandler, member should be NULL */ /* if no exitfunc or eventhandler, member should be NULL */
+49 -37
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 244 $ - $Date: 2007-01-05 08:04:05 +1030 (Fri, 05 Jan 2007) $ $Author: mlampard $ $Revision: 451 $ - $Date: 2008-01-25 15:15:04 +1030 (Fri, 25 Jan 2008) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections, This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients. and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -40,8 +40,12 @@
#include <libg15.h> #include <libg15.h>
#include <g15daemon.h> #include <g15daemon.h>
static int leaving; static int leaving = 0;
int server_events(plugin_event_t *myevent); static int server_events(plugin_event_t *myevent);
#ifndef SO_PRIORITY
#define SO_PRIORITY 12
#endif
/* tcp server defines */ /* tcp server defines */
#define LISTEN_PORT 15550 #define LISTEN_PORT 15550
@@ -65,6 +69,12 @@ static void process_client_cmds(lcdnode_t *lcdnode, int sock, unsigned int *msgb
g15daemon_send_event(lcdnode,G15_EVENT_REQ_PRIORITY,1); g15daemon_send_event(lcdnode,G15_EVENT_REQ_PRIORITY,1);
break; break;
} }
case CLIENT_CMD_NEVER_SELECT: { /* client can never be user-selected */
pthread_mutex_lock(&lcdlist_mutex);
lcdnode->lcd->never_select = 1;
pthread_mutex_unlock(&lcdlist_mutex);
break;
}
case CLIENT_CMD_IS_FOREGROUND: { /* client wants to know if it's currently viewable */ case CLIENT_CMD_IS_FOREGROUND: { /* client wants to know if it's currently viewable */
pthread_mutex_lock(&lcdlist_mutex); pthread_mutex_lock(&lcdlist_mutex);
memset(msgbuf,0,2); memset(msgbuf,0,2);
@@ -79,30 +89,12 @@ static void process_client_cmds(lcdnode_t *lcdnode, int sock, unsigned int *msgb
} }
case CLIENT_CMD_IS_USER_SELECTED: { /* client wants to know if it was set to foreground by the user */ case CLIENT_CMD_IS_USER_SELECTED: { /* client wants to know if it was set to foreground by the user */
pthread_mutex_lock(&lcdlist_mutex); pthread_mutex_lock(&lcdlist_mutex);
if(lcdnode->lcd->usr_foreground) /* user manually selected this lcd */ if(lcdnode->lcd->usr_foreground==1) /* user manually selected this lcd */
msgbuf[0] = '1'; msgbuf[0] = 1;
else else
msgbuf[0] = '0'; msgbuf[0] = 0;
pthread_mutex_unlock(&lcdlist_mutex); pthread_mutex_unlock(&lcdlist_mutex);
send(sock,msgbuf,1,0); send(sock,msgbuf,1,MSG_OOB);
break;
}
case CLIENT_CMD_BACKLIGHT: { /* client wants to change the LCD backlight */
/* return current state to the client then implement the new state */
send(sock,&lcdnode->lcd->backlight_state,1,MSG_OOB);
lcdnode->lcd->backlight_state = msgbuf[0]-0x80;
lcdnode->lcd->state_changed = 1;
break;
}
case CLIENT_CMD_KB_BACKLIGHT: { /* client wants to change the KB backlight */
setKBBrightness((unsigned int)msgbuf[0]-0x80);
break;
}
case CLIENT_CMD_CONTRAST: { /* client wants to change the LCD contrast */
/* send current state to the client */
send(sock,&lcdnode->lcd->contrast_state,1,MSG_OOB);
lcdnode->lcd->contrast_state = msgbuf[0]-0x40;
lcdnode->lcd->state_changed = 1;
break; break;
} }
default: default:
@@ -120,12 +112,28 @@ static void process_client_cmds(lcdnode_t *lcdnode, int sock, unsigned int *msgb
lcdnode->list->remote_keyhandler_sock = sock; lcdnode->list->remote_keyhandler_sock = sock;
g15daemon_log(LOG_WARNING, "Client has taken over keystate"); g15daemon_log(LOG_WARNING, "Client has taken over keystate");
} }
else if (msgbuf[0] & CLIENT_CMD_BACKLIGHT)
{
unsigned char retval = lcdnode->lcd->backlight_state;
send(sock,&retval,1,MSG_OOB);
lcdnode->lcd->backlight_state = msgbuf[0]-0x80;
lcdnode->lcd->state_changed = 1;
}
else if (msgbuf[0] & CLIENT_CMD_KB_BACKLIGHT)
{
setKBBrightness((unsigned int)msgbuf[0]-0x8);
}
else if (msgbuf[0] & CLIENT_CMD_CONTRAST)
{
send(sock,&lcdnode->lcd->contrast_state,1,MSG_OOB);
lcdnode->lcd->contrast_state = msgbuf[0]-0x40;
lcdnode->lcd->state_changed = 1;
}
} }
} }
/* create and open a socket for listening */ /* create and open a socket for listening */
int init_sockserver(){ static int init_sockserver(){
int listening_socket; int listening_socket;
int yes=1; int yes=1;
int tos = 0x18; int tos = 0x18;
@@ -159,7 +167,7 @@ int init_sockserver(){
} }
int g15_send(int sock, char *buf, unsigned int len) static int g15_send(int sock, char *buf, unsigned int len)
{ {
int total = 0; int total = 0;
int retval = 0; int retval = 0;
@@ -189,7 +197,7 @@ int g15_send(int sock, char *buf, unsigned int len)
} }
int g15_recv(lcdnode_t *lcdnode, int sock, char *buf, unsigned int len) static int g15_recv(lcdnode_t *lcdnode, int sock, char *buf, unsigned int len)
{ {
int total = 0; int total = 0;
int retval = 0; int retval = 0;
@@ -237,7 +245,7 @@ int g15_recv(lcdnode_t *lcdnode, int sock, char *buf, unsigned int len)
* once the client disconnects by closing the socket, the LCD buffer is * once the client disconnects by closing the socket, the LCD buffer is
* removed and will no longer be displayed. * removed and will no longer be displayed.
*/ */
void *lcd_client_thread(void *display) { static void *lcd_client_thread(void *display) {
lcdnode_t *g15node = display; lcdnode_t *g15node = display;
lcd_t *client_lcd = g15node->lcd; lcd_t *client_lcd = g15node->lcd;
@@ -265,7 +273,7 @@ void *lcd_client_thread(void *display) {
pthread_mutex_lock(&lcdlist_mutex); pthread_mutex_lock(&lcdlist_mutex);
memset(client_lcd->buf,0,1024); memset(client_lcd->buf,0,1024);
g15daemon_convert_buf(client_lcd,tmpbuf); g15daemon_convert_buf(client_lcd,tmpbuf);
client_lcd->ident = random(); g15daemon_send_refresh(client_lcd);
pthread_mutex_unlock(&lcdlist_mutex); pthread_mutex_unlock(&lcdlist_mutex);
} }
} }
@@ -277,7 +285,7 @@ void *lcd_client_thread(void *display) {
} }
pthread_mutex_lock(&lcdlist_mutex); pthread_mutex_lock(&lcdlist_mutex);
memcpy(client_lcd->buf,tmpbuf,sizeof(client_lcd->buf)); memcpy(client_lcd->buf,tmpbuf,sizeof(client_lcd->buf));
client_lcd->ident = random(); g15daemon_send_refresh(client_lcd);
pthread_mutex_unlock(&lcdlist_mutex); pthread_mutex_unlock(&lcdlist_mutex);
} }
} }
@@ -310,7 +318,7 @@ void *lcd_client_thread(void *display) {
pthread_mutex_lock(&lcdlist_mutex); pthread_mutex_lock(&lcdlist_mutex);
memcpy(client_lcd->buf,tmpbuf+header,buflen+header); memcpy(client_lcd->buf,tmpbuf+header,buflen+header);
client_lcd->ident = random(); g15daemon_send_refresh(client_lcd);
pthread_mutex_unlock(&lcdlist_mutex); pthread_mutex_unlock(&lcdlist_mutex);
} }
} }
@@ -325,7 +333,7 @@ exitthread:
} }
/* poll the listening socket for connections, spawning new threads as needed to handle clients */ /* poll the listening socket for connections, spawning new threads as needed to handle clients */
int g15_clientconnect (g15daemon_t **g15daemon, int listening_socket) { static int g15_clientconnect (g15daemon_t **g15daemon, int listening_socket) {
int conn_s; int conn_s;
struct pollfd pfd[1]; struct pollfd pfd[1];
@@ -398,7 +406,7 @@ static void lcdserver_thread(void *lcdlist){
} }
/* incoming events */ /* incoming events */
int server_events(plugin_event_t *event) { static int server_events(plugin_event_t *event) {
lcd_t *lcd = (lcd_t*) event->lcd; lcd_t *lcd = (lcd_t*) event->lcd;
switch (event->event) switch (event->event)
@@ -425,10 +433,14 @@ int server_events(plugin_event_t *event) {
return G15_PLUGIN_OK; return G15_PLUGIN_OK;
} }
static void g15plugin_net_exit() {
leaving = 1;
}
/* if no exitfunc or eventhandler, member should be NULL */ /* if no exitfunc or eventhandler, member should be NULL */
plugin_info_t g15plugin_info[] = { plugin_info_t g15plugin_info[] = {
/* TYPE, name, initfunc, updatefreq, exitfunc, eventhandler, initfunc */ /* TYPE, name, initfunc, updatefreq, exitfunc, eventhandler, initfunc */
{G15_PLUGIN_LCD_SERVER, "LCDServer" , (void*)lcdserver_thread, 500, NULL, (void*)server_events, NULL}, {G15_PLUGIN_LCD_SERVER, "LCDServer" , (void*)lcdserver_thread, 500, (void*)g15plugin_net_exit, (void*)server_events, NULL},
{G15_PLUGIN_NONE, "" , NULL, 0, NULL, NULL, NULL} {G15_PLUGIN_NONE, "" , NULL, 0, NULL, NULL, NULL}
}; };
+7 -7
View File
@@ -15,9 +15,9 @@
along with g15daemon; if not, write to the Free Software along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision: 177 $ - $Date: 2006-11-19 00:16:03 +1030 (Sun, 19 Nov 2006) $ $Author: mlampard $ $Revision: 388 $ - $Date: 2008-01-02 12:57:03 +1030 (Wed, 02 Jan 2008) $ $Author: mlampard $
UINPUT key processing plugin. receives events and sends keycodes to the linux kernel. UINPUT key processing plugin. receives events and sends keycodes to the linux kernel.
*/ */
@@ -54,7 +54,7 @@ static int map_Lkeys = 0;
#define G15KEY_DOWN 1 #define G15KEY_DOWN 1
#define G15KEY_UP 0 #define G15KEY_UP 0
int g15_init_uinput(void *plugin_args) { static int g15_init_uinput(void *plugin_args) {
int i=0; int i=0;
char *custom_filename; char *custom_filename;
@@ -115,7 +115,7 @@ void g15_exit_uinput(void *plugin_args){
} }
void g15_uinput_keydown(unsigned char code) static void g15_uinput_keydown(unsigned char code)
{ {
struct input_event event; struct input_event event;
memset(&event, 0, sizeof(event)); memset(&event, 0, sizeof(event));
@@ -127,7 +127,7 @@ void g15_uinput_keydown(unsigned char code)
write (uinp_fd, &event, sizeof(event)); write (uinp_fd, &event, sizeof(event));
} }
void g15_uinput_keyup(unsigned char code) static void g15_uinput_keyup(unsigned char code)
{ {
struct input_event event; struct input_event event;
memset(&event, 0, sizeof(event)); memset(&event, 0, sizeof(event));
@@ -147,7 +147,7 @@ void g15_uinput_keyup(unsigned char code)
#endif #endif
#endif #endif
void g15_process_keys(g15daemon_t *masterlist, unsigned int currentkeys, unsigned int lastkeys) static void g15_process_keys(g15daemon_t *masterlist, unsigned int currentkeys, unsigned int lastkeys)
{ {
/* 'G' keys */ /* 'G' keys */
if((currentkeys & G15_KEY_G1) && !(lastkeys & G15_KEY_G1)) if((currentkeys & G15_KEY_G1) && !(lastkeys & G15_KEY_G1))
@@ -292,7 +292,7 @@ void g15_process_keys(g15daemon_t *masterlist, unsigned int currentkeys, unsigne
} }
int keyevents(plugin_event_t *myevent) { static int keyevents(plugin_event_t *myevent) {
lcd_t *lcd = (lcd_t*) myevent->lcd; lcd_t *lcd = (lcd_t*) myevent->lcd;
static int lastkeys; static int lastkeys;
switch (myevent->event) switch (myevent->event)
+2 -4
View File
@@ -3,18 +3,16 @@
%define prefix /usr %define prefix /usr
Summary: Daemon to control logitech G15 keyboards Summary: Daemon to control logitech G15 keyboards
Name: g15daemon Name: g15daemon
Version: 1.9.0 Version: 1.9.5.2
Release: 1 Release: 1
Copyright: GPL Copyright: GPL
Group: Applications/System Group: Applications/System
Source: ftp://prdownloads.sf.net/g15daemon-1.9.0.tar.bz2 Source: ftp://prdownloads.sf.net/g15daemon-1.9.5.2.tar.bz2
URL: http://g15daemon.sf.net URL: http://g15daemon.sf.net
Distribution: Linux Distribution: Linux
Vendor: NONE Vendor: NONE
Packager: Mike Lampard <mlampard@users.sourceforge.net> Packager: Mike Lampard <mlampard@users.sourceforge.net>
Buildroot: /var/tmp/g15daemon-%{PACKAGE_VERSION}-root Buildroot: /var/tmp/g15daemon-%{PACKAGE_VERSION}-root
BuildRequires: daemon-devel
Requires: daemon
Requires: libg15 Requires: libg15
Provides: g15daemon Provides: g15daemon