# # spec file for package gpm (Version 1.20.1) # # Copyright (c) 2010 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: GPLv2+ Group: System/Console Provides: select PreReq: /bin/sed %insserv_prereq %fillup_prereq AutoReqProv: on # bug437293 %ifarch ppc64 Obsoletes: gpm-64bit %endif # Version: 1.20.1 Release: 455 Summary: Console Mouse Support Source0: http://arcana.linux.it/pub/gpm/gpm-%{version}.tar.bz2 Source1: rcgpm Source2: sysconfig.mouse-%{name} Source3: README.SuSE Source4: baselibs.conf 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 Patch18: %{name}-%{version}-glibc210.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 %patch18 -p1 # cp %{S:1} %{S:2} %{S:3} . %build # This package failed when testing with -Wl,-as-needed being default. # So we disable it here, if you want to retest, just delete this comment and the line below. export SUSE_ASNEEDED=0 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