# # spec file for package gpm (Version 1.20.1) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: gpm BuildRequires: bison ncurses-devel Url: http://linux.schottelius.org/gpm/ License: GPL v2 or later Group: System/Console Provides: select PreReq: /bin/sed %insserv_prereq %fillup_prereq AutoReqProv: on Version: 1.20.1 Release: 442 Summary: Console Mouse Support Source0: http://arcana.linux.it/pub/gpm/gpm-%{version}.tar.bz2 Source1: rcgpm Source2: sysconfig.mouse-%{name} Source3: README.SuSE Patch0: gpm-%{version}.patch Patch1: gpm-%{version}-ps2_command_bytes.patch Patch2: gpm-%{version}-ps2_read.patch Patch3: gpm-%{version}-ps2_reconnection.patch Patch4: gpm-%{version}-syn_conf.patch Patch5: gpm-%{version}-silitek.patch Patch6: gpm-%{version}-conf.patch Patch7: gpm-%{version}-va_arg.patch Patch8: gpm-%{version}-quiet_libgpm.patch Patch9: gpm-%{version}-no_templates_for_new_multiple_mode.patch Patch10: gpm-%{version}-ceil.patch Patch11: gpm-%{version}-Gpm_Open.patch Patch12: gpm-%{version}-daemon_mode.patch Patch13: gpm-%{version}-gunze-overflow.patch Patch14: gpm-%{version}-warnings.patch Patch15: gpm-%{version}-verbosity.patch Patch16: gpm-%{version}-OPEN_MAX.patch Patch17: %{name}-%{version}-log.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %install_info_prereq %description The gpm (general purpose mouse) daemon tries to be a useful mouse server for applications running on the Linux console. It can be used by mc (Midnight Commander) or by w3m, the text-based Web browser. It provides console cut and paste operations. Authors: -------- Alessandro Rubini Nico Schottelius %prep %setup -q %patch0 %patch1 %patch2 %patch3 %patch4 %patch5 %patch6 %patch7 %patch8 %patch9 %patch10 %patch11 %patch12 %patch13 %patch14 %patch15 %patch16 -p1 %patch17 # cp %{S:1} %{S:2} %{S:3} . %build autoreconf -fi CFLAGS="$RPM_OPT_FLAGS -DQUIET_LIBGPM" \ %configure \ --sysconfdir=/etc/gpm %ifarch %arm make CC="gcc -lm" %endif make %install make DESTDIR=$RPM_BUILD_ROOT install # # gpm confings for file in conf/gpm-* ; do install -m 644 $file $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/} done # # lisp # an updated version is part of emacs now #install -d $RPM_BUILD_ROOT/usr/share/emacs/site-lisp #install contrib/emacs/t-mouse.el* $RPM_BUILD_ROOT/usr/share/emacs/site-lisp # # start script install -m 755 -d $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 755 -d $RPM_BUILD_ROOT/etc/init.d install -m 755 -d $RPM_BUILD_ROOT/usr/sbin install -m 644 sysconfig.mouse-%{name} $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 755 rcgpm $RPM_BUILD_ROOT/etc/init.d/gpm ln -sf ../../etc/init.d/gpm $RPM_BUILD_ROOT/usr/sbin/rcgpm %preun %stop_on_removal gpm %post /sbin/ldconfig # rename variable in all possible locations for update for i in etc/rc.config etc/sysconfig/mouse ; do if test -f $i ; then sed -e "s@^MOUSE=@MOUSEDEVICE=@" $i > $i.t && mv $i.t $i rm -f $i.t fi done # there were two variables with the same value GPM_PROTOCOL and MOUSETYPE # in SuLi 8.2. The MOUSETYPE variable better conforms with with other # variable names MOUSEDEVICE and XMOUSETYPE name scheme, so get rid of # the obsolete GPM_PROTOCOL variable if grep "^GPM_PROTOCOL=" /etc/sysconfig/mouse 1>/dev/null 2>/dev/null ; then if grep "^MOUSETYPE=" /etc/sysconfig/mouse 1>/dev/null 2>/dev/null ; then # comment out the obsolete MOUSETYPE variable perl -pi -e "s|^(MOUSETYPE=.*)$|\#\$1 \# the variable GPM_PROTOCOL was renamed to MOUSETYPE|" /etc/sysconfig/mouse fi # rename GPM_PROTOCOL to MOUSETYPE perl -pi -e "s|^GPM_PROTOCOL=(.*)$|\# the variable GPM_PROTOCOL was renamed to MOUSETYPE\nMOUSETYPE=\$1|" /etc/sysconfig/mouse fi %{fillup_and_insserv gpm} %{fillup_only -an mouse} %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %postun /sbin/ldconfig %install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %restart_on_update gpm %{insserv_cleanup} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc BUGS COPYING Changes README README.SuSE TODO %doc doc/Announce doc/FAQ doc/README* %{_infodir}/* %{_mandir}/*/* %dir /etc/gpm %config /etc/gpm/* %config /etc/init.d/gpm %{_bindir}/* %{_sbindir}/* %{_includedir}/*.h %{_libdir}/lib* /var/adm/fillup-templates/* %changelog * Fri Aug 22 2008 ro@suse.de - remove deprecated option from fillup_and_insserv * Mon Aug 11 2008 anosek@suse.cz - fixed gpm not enabled at all run levels (bnc#340646) - enabled gpm also for runlevel 5 in /etc/init.d/gpm * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file to build xxbit packages for multilib support * Wed Apr 09 2008 anosek@suse.cz - fixed: gpm spams /var/log/messages (bnc#307209) (log.patch) * Fri Feb 22 2008 crrodriguez@suse.de - add missing calls to restart_on_update and stop_on_removal macros - update obsolete XUnitedLinux tags in the init script * Wed Dec 12 2007 rguenther@suse.de - use FOPEN_MAX instead of OPEN_MAX to fix build. * Tue Aug 07 2007 anosek@suse.cz - fixed /etc/sysconfig/mouse should configure the mouse by default for gpm [#262749] * modified sysconfig.mouse-gpm accordingly * Thu May 24 2007 schwab@suse.de - Don't install t-mouse.el, part of emacs now. * Mon Mar 26 2007 rguenther@suse.de - add bison BuildRequires * Thu Mar 22 2007 rguenther@suse.de - add ncurses-devel BuildRequires * Tue Feb 27 2007 prusnak@suse.cz - verbosity.patch [#247230] * removed -V option from documentation (not supported anymore) * silented error when -V provided on command-line * Tue Feb 13 2007 anosek@suse.cz - fixed libgpm.so.1 is not owned by any package [#244447] (gpm-1.20.1.patch) * Thu Jan 04 2007 anosek@suse.cz - fixed twiddler.c:334: warning: operation on 'ptr' may be undefined (warnings.patch) * Thu Feb 16 2006 mmarek@suse.cz - merge rcgpm-error-messages.diff into rcgpm - hint users to run 'yast mouse' to configure gpm [#114919 and duplicates] * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Thu Nov 03 2005 mmarek@suse.cz - fix apparent typo in gunze touchscreen driver [#132053] * Tue Aug 23 2005 pmladek@suse.cz - fixed the init script to print error messages if there are any problems with configuration [#106700] * Sat Apr 09 2005 aj@suse.de - Fix build also on i386 with GCC 4. * Sun Mar 27 2005 aj@suse.de - Fix build with GCC 4. * Thu Mar 24 2005 uli@suse.de - fixed to build on ARM * Wed Nov 10 2004 ro@suse.de - fixed file list * Fri Mar 05 2004 mcihar@suse.cz - fix possible segfault in Gpm_Open (bug #31970) * Fri Oct 17 2003 mcihar@suse.cz - do not build as root * Mon Sep 15 2003 mcihar@suse.cz - allow to set gpm repeating in sysconfig (GPM_REPEAT) * Thu Aug 14 2003 mcihar@suse.cz - added activation metadata to sysconfig template (bug #28903) * Fri Jun 20 2003 ro@suse.de - added directories to filelist * Thu Apr 24 2003 ro@suse.de - merged postuns * Thu Apr 24 2003 ro@suse.de - fix install_info --delete call and move from preun to postun * Fri Mar 14 2003 pmladek@suse.cz - redirected stdin, stdout and stderr to /dev/null in the daemon mode [#25386] * Tue Mar 04 2003 pmladek@suse.cz - fixed Gpm_Open to initialize option.consolename only for the first time (Gpm_Open.patch) [#24587] * Mon Feb 17 2003 mmj@suse.de - Use %%install_info macros [#23421] * Thu Jan 09 2003 pmladek@suse.cz - updated to the stable version 1.20.1: * synaptics ps2 touchpad support * code cleanup in various main files * prototype of mouse support for n-mice. expect final in 1.20.3. - removed the obsolete compat patch which fixed compactibility with an older libgpm.so.1 - removed the obsolete synaptic patch which fixed synaptics.c to read /etc/gpm/syn.conf with TABs - removed the obsolete old_pid_file patch which fixed the start of gpm server when an old invalid /var/run/gpm.pid exists - removed the prototype of mouse support for n-mice, because it does not work for the present and it is uncomplete, it requires to define the mouse device before the mouse type on the command line, but the option -M is still needed, so this feature is not complete and can confuse the user (no_templates_for_new_multiple_mode.patch) - fixed the default gpm/syn.conf according to the new synaptics.c - fixed to link with "-lm" if needed (ceil is not an inline function) and where needed (gpm, libgpm.so) * Thu Jan 02 2003 pmladek@suse.cz - added metadata to the sysconfig template [#22660] - got rid of the variable GPM_PROTOCOL from the init script and the sysconfig template, used MOUSETYPE instead (both variables were generated by YaST in SuLi 8.2, which is confusing and the variable MOUSETYPE better conforms with other variable names MOUSEDEVICE and XMOUSETYPE) * Wed Sep 18 2002 ro@suse.de - removed bogus self-provides * Mon Sep 02 2002 kukuk@suse.de - Remove unused yacc from neededforbuild - Move rcgpm symlink to the same location as the binary is - Remove not existent services from init script header * Tue Aug 13 2002 pmladek@suse.cz - already enabled __os_install_post macro * Mon Aug 12 2002 pmladek@suse.de - fixed problem with variable argument lists [#17528] - removed patch which fixes messages, they are completely disabled in libgpm now, generally, no library should write messages on standart output or standart error output (it made problems with w3m for example) * Wed Jul 31 2002 ro@suse.de - also rename MOUSE to MOUSEDEVICE on update - added PreReqs * Tue Jul 30 2002 pmladek@suse.cz - used the MOUSEDEVICE variable instead of the MOUSE variable [#17266] - the MOUSEDEVICE variable is filled up into /etc/sysconfig/mouse by this package now [#17266] * Thu Jul 25 2002 pmladek@suse.cz - fixed compactibility with older libgpm.so.1 - fixed gpm messages: * added prefix "gpm: " * disabled debug messages in libgpm * improved message in function Gpm_Open when gpm server is not running * Thu Jul 11 2002 pmladek@suse.cz - added Silitek mouse drivers created by Dr. Werner Fink - gpm config files changes: * installed gpm-twiddler.conf, many thanks to Dr. Werner Fink for hint * fixed and installed gpm-syn.conf * moved all gpm config files from /etc to /etc/gpm * removed prefix "gpm-" from gpm config file names * created README.SuSE * improved "probe" part in init script to check changes in config files from /etc/gpm/* - fixed synaptics.c to read /etc/gpm/syn.conf with TABs - fixed support for reconnection for PS/2 mouses to save necessary values in struct mouse_features (to work correctly with dual-mouse stuff) * Wed Jul 10 2002 pmladek@suse.cz - updated to version 1.20.1rc1: * synaptics ps2 touchpad support * removed compile problems * objdir/ support without problems * cleaned up internal message functions * clean {g,m,}awk support * clean ps2 initialization (allows using ps2 mouse after you used synps!) * gpm clients can't cause gpm do die. - removed obsolete patch for gpm-root.y - removed obsolete ia64 patch - removed obsolete Werner's patch for devfs.c - improved patch for reconnection of PS/2 mouses - fixed start of gpm server when an old invalid /var/run/gpm.pid exists - reorganized patches - used %%run_ldconfig macro in %%post and %%postun sections - fixed init script according to skeleton * Tue Jul 09 2002 werner@suse.de - Bug fix in devfs.c for twid and other keyboards - Bug fix in gpm.c: Some PS/2 devices really wants be readed byte by byte - Complete the PS/2 command bytes in headers/defines.h * Fri Mar 15 2002 kukuk@suse.de - fix typo in sysconfig.gpm [Bug #15034] * Thu Jan 17 2002 pmladek@suse.cz - added variable GPM_PROTOCOL to /etc/sysconfig/mouse - if the variable GPM_PARAM is empty then gpm will start with option "-t $GPM_PROTOCOL -m $MOUSE" now * Wed Jan 16 2002 ro@suse.de - removed setup.selection * Fri Jan 11 2002 pmladek@suse.cz - used macro %%{_libdir} to fix for lib64 - fixed rights of static library to 644 - fixed documentation in /usr/share/doc/packages/gpm * Tue Jan 08 2002 egmont@suselinux.hu - removed colons from init script messages * Tue Jan 08 2002 ro@suse.de - moved GPM_PARAM to /etc/sysconfig/mouse * Mon Dec 10 2001 pmladek@suse.cz - updated to version 1.19.6: * Synaptics 4 Button Touchpad support * IntelliMouse Explorer support * some bug fixes - removed obsolete mktemp security patch * Wed Dec 05 2001 ro@suse.de - add "-p" to macro call to deactivate perl-hack * Wed Dec 05 2001 ro@suse.de - use fillup_and_insserv and removed START_GPM - move variable GPM_PARAM to this package * Thu Oct 18 2001 pmladek@suse.cz - fixed permissions of /dev/gpmctl back to 777, thus the applications (mc) can use mouse support for normal user (#11893) * Mon Sep 17 2001 pmladek@suse.cz - fixed to detect tokens AA 00 only in protocols for ps/2 mouses * Mon Sep 10 2001 pmladek@suse.cz - fixed to read only two bytes when mouse is reconected and it sends tokens AA 00 * Fri Sep 07 2001 pmladek@suse.cz - fixed detection of reconnection of ps2 mouses and friends with kernel 2.4.9 or higher (bug #9822) * I take inspiration in patch from George Staikos (staikos@0wned.org) * Thu Aug 23 2001 pmladek@suse.cz - updated to version 1.19.3: * security fixes: * close the newly accept()ed socket in case of identification failure * removed initial setuid(0) call * added initgroups() * many bugfixes * features: * re-check console size on console change * changed use of -o option - removed obsolete security patches - removed obsolete resize patch - applied two patches from RedHat: * fix permissions on /dev/gpmctl * call initgroups in gpm-root before spawning command as user * make gpm-root work on big endian * Mon Aug 06 2001 kukuk@suse.de - Fix comment about init script location [Bug #9494] * Thu Jun 14 2001 pmladek@suse.cz - fixed link libgpm.so.1 * Fri Jun 08 2001 kukuk@suse.de - Use _libdir macros * Fri Jun 08 2001 pmladek@suse.cz - fixed to compile on sparc64 (libraries in /usr/lib64 now) - fixed BUILD_ROOT * Wed May 16 2001 pmladek@suse.cz - fixed cast warnings on ia64 * Mon Apr 23 2001 pmladek@suse.cz - fixed warnings on ia64 * Thu Apr 12 2001 pmladek@suse.cz - fixed init script by new skeleton - fixed to compile - removed include $(DEPS) from makefile * Mon Jan 15 2001 nadvornik@suse.cz - added Required-Start: $remote_fs $syslog [bug #5580] * Tue Jan 02 2001 olh@suse.de - add script name to %%postin * Wed Dec 20 2000 pthomas@suse.de - Fix bug in Gpm_Wgetch * Tue Nov 28 2000 ro@suse.de - sbin/init.d -> etc/init.d * Wed Nov 22 2000 nadvornik@suse.cz - removed runlevel links - fixed init script * Mon Oct 09 2000 nadvornik@suse.cz - fixed Copyright - used bzip2 * Fri Oct 06 2000 schwab@suse.de - Use getdtablesize() instead of OPEN_MAX. * Mon Jul 17 2000 nadvornik@suse.cz - added security patch for disable-paste. Now it don't need to be installed with suid root. * Thu Apr 27 2000 nadvornik@suse.cz - added initgroups() patch - used --sysconfdir=/etc * Tue Apr 18 2000 nadvornik@suse.cz - added BuildRoot * Mon Apr 03 2000 uli@suse.de - merged in gpm-root fix by Alessandro Rubini * Fri Feb 25 2000 kukuk@suse.de - Move /usr/{info,man} -> /usr/share/{info,man} * Mon Jan 31 2000 uli@suse.de - added fix for possible /tmp race attacks by thomas@suse.de * Fri Dec 17 1999 ro@suse.de - removed params for ldconfig (-l does not work any more) - update to 1.18.1 - got rid of Makefile.Linux - use RPM_OPT_FLAGS for configure * Mon Oct 11 1999 uli@suse.de - update -> 1.18.0 * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Tue Mar 16 1999 ro@suse.de - fixed rc-script: check if gpm already running * Fri Mar 05 1999 ro@suse.de - fixed rc script * Tue Mar 02 1999 ro@suse.de - update to 1.17.5 * Mon Dec 07 1998 ro@suse.de - updated init-script - added rcgpm symlink * Fri Oct 24 1997 florian@suse.de - update to gpm 1.13 * Sun May 04 1997 bs@suse.de - added /var/adm/setup/setup.selection * Wed Apr 30 1997 florian@suse.de - update to version 1.12 * Thu Jan 02 1997 florian@suse.de - move startup scripts from aaa_base to gpm.tgz