%define version 1.20.1 %define release 10mdk %define url ftp://arcana.linux.it/pub/gpm/ # Allow first build without ncurses support %define build_curses %{?_without_curses:0}%{!?_without_curses:1} # this defines the library version that this package builds. %define LIBMAJ 1 %define LIBVER %{LIBMAJ}.19.0 %define libname %mklibname %name %LIBMAJ %define libnamedev %{libname}-devel Summary: A mouse server for the Linux console Name: gpm Version: %{version} Release: %{release} License: GPL Group: System/Servers BuildRequires: byacc BuildRequires: emacs-bin %if %{build_curses} BuildRequires: ncurses-devel %endif BuildRequires: texinfo URL: %{url} Source: %{url}/gpm-%{version}.tar.bz2 Source1: gpm.init.bz2 Patch0: gpm-1.20.0-nodebug.patch.bz2 Patch1: gpm-1.20.1-no-dumb-error-messages.patch.bz2 Patch2: gpm-1.20.0-docfix.patch.bz2 Patch3: gpm-1.20.1-libm.patch.bz2 Patch4: gpm-1.20.1-weak-wgetch.patch.bz2 Patch5: gpm-1.19.6-secenhance.patch.bz2 Patch6: gpm-1.20.0-limits.patch.bz2 Patch7: gpm-1.20.1-serialconsole.patch.bz2 Patch8: gpm-1.20.1-basename.patch.bz2 Patch9: gpm-1.20.1-consolename.patch.bz2 Patch10: gpm-1.20.1-deps.patch.bz2 Prereq: /sbin/chkconfig, /sbin/ldconfig, /sbin/install-info, rpm-helper BuildRoot: %{_tmppath}/gpm-root %description Gpm provides mouse support to text-based Linux applications like the emacs editor, the Midnight Commander file management system, and other programs. Gpm also provides console cut-and-paste operations using the mouse and includes a program to allow pop-up menus to appear at the click of a mouse button. Gpm should be installed if you intend to use a mouse with your Mandrakelinux system. %package -n %libnamedev Requires: %libname = %{version}-%{release} Summary: Libraries and header files for developing mouse driven programs. Group: Development/C Provides: gpm-devel libgpm-devel Obsoletes: gpm-devel URL: %{url} %description -n %libnamedev The %libnamedev package contains the libraries and header files needed for development of mouse driven programs. This package allows you to develop text-mode programs which use the mouse. Install %libnamedev if you need to develop text-mode programs which will use the mouse. You'll also need to install the gpm package. %package -n %libname Summary: Libraries and header files for developing mouse driven programs. Group: System/Libraries URL: %{url} %description -n %libname Library used by the gpm program. Install %libnamedev if you need to develop text-mode programs which will use the mouse. You'll also need to install the gpm package. %prep %setup -q %patch0 -p1 -b .nodebug %patch1 -p1 -b .no-dumb-error-messages %patch2 -p1 -b .docfix %patch3 -p1 -b .libm %patch4 -p1 -b .weak-wgetch %patch5 -p1 -b .secenhance %patch6 -p1 -b .limits %patch7 -p1 -b .serial %patch8 -p1 -b .basename %patch9 -p1 -b .consolename %patch10 -p1 -b .deps # handle patch1 mods autoconf # file is missing, copy in from the rpm package cp -p %{_prefix}/lib/rpm/mkinstalldirs . # emacs stuff needs to be in two places at once... cp -p contrib/emacs/*.el contrib %build %serverbuild CFLAGS="-D_GNU_SOURCE $RPM_OPT_FLAGS -DPIC -fPIC" \ lispdir=$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp \ %configure %{?_without_curses} %make %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}/%{_lib} PATH=/sbin:$PATH:%{_sbindir}:$PATH %makeinstall lispdir=%{buildroot}%{_datadir}/emacs/site-lisp install -m644 doc/gpm-root.1 %{buildroot}%{_mandir}/man1 install -m644 conf/gpm-root.conf %{buildroot}%{_sysconfdir} #install -s -m755 src/hltest %{buildroot}%{_bindir} install -d 755 %{buildroot}%{_datadir}/emacs/site-lisp #install -m644 contrib/t-mouse.el* %{buildroot}%{_datadir}/emacs/site-lisp ln -sf ../../%{_lib}/libgpm.so.%{LIBVER} %{buildroot}%{_libdir}/libgpm.so ln -sf libgpm.so.%{LIBVER} %{buildroot}/%{_lib}/libgpm.so.%{LIBMAJ} mv %{buildroot}%{_libdir}/libgpm.so.* %{buildroot}/%{_lib} mkdir -p %{buildroot}%{_initrddir} bzcat %{SOURCE1} > %{buildroot}%{_initrddir}/gpm chmod 0755 %{buildroot}%{_initrddir}/gpm perl -pi -e "s|/etc/rc.d/init.d|%{_initrddir}|" $RPM_BUILD_ROOT%{_initrddir}/* %clean rm -rf %{buildroot} %post %_post_service gpm if [ -x "/sbin/install-info" ]; then %_install_info %{name}.info fi # handle init sequence change if [ -f /etc/rc5.d/S85gpm ]; then /sbin/chkconfig --add gpm fi %preun %_preun_service gpm %_remove_install_info %{name}.info %post -n %libname -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/gpm-root.conf %{_bindir}/mev %{_bindir}/gpm-root %{_bindir}/hltest %{_bindir}/mouse-test %{_bindir}/disable-paste %{_sbindir}/gpm %{_datadir}/emacs/site-lisp/t-mouse.el %{_datadir}/emacs/site-lisp/t-mouse.elc %{_infodir}/gpm.info* %{_mandir}/man1/mev.1* %{_mandir}/man1/mouse-test.1* %{_mandir}/man1/gpm-root.1* %{_mandir}/man7/gpm-types.7* %{_mandir}/man8/gpm.8* %config(noreplace) %{_initrddir}/gpm %files -n %libname %defattr(-,root,root) /%{_lib}/libgpm.so.* %files -n %libnamedev %defattr(-,root,root) %{_libdir}/libgpm.a %{_includedir}/gpm.h %{_libdir}/libgpm.so %changelog * Wed Mar 17 2004 Frederic Lepied <flepied@mandrakesoft.com> 1.20.1-10mdk - put lib in /%%{_lib} (bug #7182) * Wed Jul 30 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.20.1-9mdk - Allow build without curses support * Wed Jul 09 2003 Laurent MONTEL <lmontel@mandrakesoft.com> 1.20.1-8mdk - Rebuild * Mon Jul 7 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.20.1-7mdk - I still want parallel build, so workaround even more - Patch1: Don't display stupid error messages (Han Boetes) - Patch3: -lm everywhere, ceil() is part of libm - Patch4: Don't link against -lncuses, make weak wgetch and stdscr (Jakub Jelinek) * Fri Jul 04 2003 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.20.1-6mdk - after sparc and alpha, fix ppc build... - make instead %%make, build failed else * Tue Jun 03 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.20.1-5mdk - fix sparc build * Fri May 09 2003 Stefan van der Eijk <stefan@eijk.nu> 1.20.1-4mdk - fix alpha build * Tue Apr 8 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.20.1-3mdk - RPM home is always %{_prefix}/lib/rpm - Patch10: Workaround deps, I want parallel build * Sun Feb 08 2003 Douglas Wilkins <douglasw@mweb.co.za> 1.20.1-2mdk - Gpm_Open has a logic error: first time through, option.consolename is set. next time through, option.consolename is set to NULL, leading to a segfault when Gpm_Open is called again. (e.g. Midnight Commander calls Gpm_Open multiple times). patch9 corrects this * Thu Dec 26 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.20.1-1mdk - 1.20.1 * Thu Dec 5 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.20.0-8mdk - add missing files - use %%mklibname * Tue Sep 24 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.20.0-7mdk - rpmlint fixes * Mon Sep 2 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.20.0-6mdk - fix error reporting * Wed Aug 21 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.20.0-5mdk - fixed compilation - start before dm service * Sun Jun 30 2002 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.20.0-4mdk - -fPIC -DPIC in CFLAGS. - BuildRequires texinfo. * Mon Jun 24 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.20.0-3mdk - Link .so to the proper versioned library (minor changed) * Mon May 06 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.20.0-2mdk - Automated rebuild in gcc3.1 environment * Tue Apr 9 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.20.0-1mdk - 1.20.0 * Wed Jan 30 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.19.6-3mdk - chnaged the BuildRequires from emacs to emacs-bin. * Tue Nov 13 2001 Stefan van der Eijk <stefan@eijk.nu> 1.19.6-2mdk - BuildRequires: byacc * Fri Nov 2 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 1.19.6-1mdk - new version - added patch1 (contrib) to fix building emacs bindings - removed patch2 (docfix), integrated upstream - removed patch3 (nonroot), not needed anymore - updated patch4 (root) for new dir structure - updated patch5 (secenhance) for new dir structure - updated patch6 (limits) for new dir structure - removed patch7 (fix-no-rights-on-console), better patch merged upstream - mkinstalldirs is missing, copy it in from automake package - BuildRequires: automake, emacs * Mon Sep 10 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.19.4-2mdk - fix console check when defvs is mounted (Pixel) [patch7]. * Fri Sep 7 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.19.4-1mdk - removed patch7 (merged upstream) - new version which support devfs * Thu Apr 5 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.19.3-8mdk - Make gpm use the information of /etc/sysconfig/mouse where the device is located (more uniform with the mousedrake configuration). * Thu Apr 5 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.19.3-7mdk - Launch GPM only when the /dev/mouse exist and point to a device. * Thu Mar 29 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.19.3-6mdk - use the new rpm macros for servers. * Wed Jan 10 2001 Vincent Danen <vdanen@mandrakesoft.com> 1.19.3-5mdk - security fix for insecure tempfiles * Thu Dec 7 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.19.3-4mdk - new lib policy. * Sun Oct 01 2000 David BAUENS <baudens@mandrakesoft.com> 1.19.3-3mdk - Allow to build * Wed Aug 30 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.19.3-2mdk - rebuild for the user of _initrddir macro. * Wed Aug 30 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.19.3-1mdk - 1.19.3 * Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.19.2-6mdk - automatically added BuildRequires * Fri Jul 28 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.19.2-5mdk - Fix another typo in postscript :-\ (thanks Eugenio Diaz). * Thu Jul 27 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.19.2-4mdk - Fix typo in postun script (thanks vincent). * Thu Jul 27 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.19.2-3mdk - BM and macros. - Add security fix from Red Hat. * Thu May 18 2000 Pixel <pixel@mandrakesoft.com> 1.19.2-2mdk - add libgpm.so.1 to the % files * Mon Apr 24 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.19.2-1mdk - 1.19.2 (definitely fix sec. hole). * Thu Apr 13 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.19.1-2mdk - Correct groups. * Thu Apr 13 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.19.1-1mdk - Add security patch for gpm-root by redhat. - gpm.init cleanup. - 1.19.1 - Update groups. * Wed Oct 20 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - And a relifting for spec. * Wed Sep 15 1999 Thierry Vignaud <tvignaud@mandrakesoft.com> - 1.18.0 final : WizardPad procotol and older Synaptics PS/2 touchpads are now supported, gpm allows the touchpad to be ignored if unplugged, and some other changes. * Thu Aug 26 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Fix typo in gpm.init (#59). - Fix building as user. * Sun Aug 9 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com> - 1.17.9 * Wed Jul 07 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - fix really stupid type-o (whats sleep?) * Wed Jul 07 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - inc %release just to be safe * Tue Jul 6 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - test for /sbin/install-info just incase it's not there * Sat Jul 3 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - moved gpm-root.conf from %{_sysconfdir} to %{_sysconfdir} so it actualy works * Mon Apr 12 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Add patch for the texinfo (new syntax ?). * Sun Apr 11 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com> - 1.17.7 - Mandrake adaptions - bzip2 man/info pages - add de locale * Thu Mar 4 1999 Matt Wilson <msw@redhat.com> - updated to 1.17.5 * Tue Feb 16 1999 Cristian Gafton <gafton@redhat.com> - avoid using makedev for internal functions (it is a #define in the system headers) * Wed Jan 13 1999 Preston Brown <pbrown@redhat.com> - upgrade to 1.17.2. * Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com> - enforce the use of -D_GNU_SOURCE so that it will compile on the ARM - build against glibc 2.1 * Tue Aug 11 1998 Jeff Johnson <jbj@redhat.com> - build root * Thu May 07 1998 Prospector System <bugs@redhat.com> - translations modified for de, fr, tr * Wed Apr 22 1998 Michael K. Johnson <johnsonm@redhat.com> - enhanced initscript * Fri Apr 10 1998 Cristian Gafton <gafton@redhat.com> - recompiled for manhattan * Wed Apr 08 1998 Erik Troan <ewt@redhat.com> - updated to 1.13 * Mon Nov 03 1997 Donnie Barnes <djb@redhat.com> - added patch from Richard to get things to build on the SPARC * Tue Oct 28 1997 Donnie Barnes <djb@redhat.com> - fixed the emacs patch to install the emacs files in the right place (hopefully). * Mon Oct 13 1997 Erik Troan <ewt@redhat.com> - added chkconfig support - added install-info * Thu Sep 11 1997 Donald Barnes <djb@redhat.com> - upgraded from 1.10 to 1.12 - added status/restart functionality to init script - added define LIBVER 1.11 * Thu Jun 19 1997 Erik Troan <ewt@redhat.com> - built against glibc