2006-12-19 00:16:41 +01:00
|
|
|
#
|
|
|
|
# spec file for package gpm (Version 1.20.1)
|
|
|
|
#
|
2010-01-14 15:19:47 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2006-12-19 00:16:41 +01:00
|
|
|
#
|
2008-08-11 22:43:36 +02:00
|
|
|
# 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.
|
|
|
|
|
2006-12-19 00:16:41 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-02-22 01:26:05 +01:00
|
|
|
|
2006-12-19 00:16:41 +01:00
|
|
|
Name: gpm
|
2007-03-27 01:31:16 +02:00
|
|
|
BuildRequires: bison ncurses-devel
|
2007-12-12 18:10:48 +01:00
|
|
|
Url: http://linux.schottelius.org/gpm/
|
2010-01-14 15:19:47 +01:00
|
|
|
License: GPLv2+
|
2006-12-19 00:16:41 +01:00
|
|
|
Group: System/Console
|
|
|
|
Provides: select
|
|
|
|
PreReq: /bin/sed %insserv_prereq %fillup_prereq
|
2007-12-12 18:10:48 +01:00
|
|
|
AutoReqProv: on
|
2008-11-28 15:04:54 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: gpm-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2006-12-19 00:16:41 +01:00
|
|
|
Version: 1.20.1
|
2010-01-14 15:19:47 +01:00
|
|
|
Release: 455
|
2006-12-19 00:16:41 +01:00
|
|
|
Summary: Console Mouse Support
|
|
|
|
Source0: http://arcana.linux.it/pub/gpm/gpm-%{version}.tar.bz2
|
|
|
|
Source1: rcgpm
|
|
|
|
Source2: sysconfig.mouse-%{name}
|
|
|
|
Source3: README.SuSE
|
2010-01-14 15:19:47 +01:00
|
|
|
Source4: baselibs.conf
|
2006-12-19 00:16:41 +01:00
|
|
|
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
|
2007-01-04 12:11:20 +01:00
|
|
|
Patch14: gpm-%{version}-warnings.patch
|
2007-03-01 21:55:29 +01:00
|
|
|
Patch15: gpm-%{version}-verbosity.patch
|
2007-12-12 18:10:48 +01:00
|
|
|
Patch16: gpm-%{version}-OPEN_MAX.patch
|
2008-04-09 21:48:22 +02:00
|
|
|
Patch17: %{name}-%{version}-log.patch
|
2009-06-12 16:28:12 +02:00
|
|
|
Patch18: %{name}-%{version}-glibc210.patch
|
2006-12-19 00:16:41 +01:00
|
|
|
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 <rubini@ipvvis.unipv.it>
|
|
|
|
Nico Schottelius <nico@schottelius.net>
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0
|
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
%patch3
|
|
|
|
%patch4
|
|
|
|
%patch5
|
|
|
|
%patch6
|
|
|
|
%patch7
|
|
|
|
%patch8
|
|
|
|
%patch9
|
|
|
|
%patch10
|
|
|
|
%patch11
|
|
|
|
%patch12
|
|
|
|
%patch13
|
2007-01-04 12:11:20 +01:00
|
|
|
%patch14
|
2007-03-01 21:55:29 +01:00
|
|
|
%patch15
|
2007-12-12 18:10:48 +01:00
|
|
|
%patch16 -p1
|
2008-04-09 21:48:22 +02:00
|
|
|
%patch17
|
2009-06-12 16:28:12 +02:00
|
|
|
%patch18 -p1
|
2006-12-19 00:16:41 +01:00
|
|
|
#
|
|
|
|
cp %{S:1} %{S:2} %{S:3} .
|
|
|
|
|
|
|
|
%build
|
2009-06-19 23:08:22 +02:00
|
|
|
# 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
|
2008-02-22 01:26:05 +01:00
|
|
|
autoreconf -fi
|
2006-12-19 00:16:41 +01:00
|
|
|
CFLAGS="$RPM_OPT_FLAGS -DQUIET_LIBGPM" \
|
2008-02-22 01:26:05 +01:00
|
|
|
%configure \
|
2006-12-19 00:16:41 +01:00
|
|
|
--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
|
2007-05-24 12:18:34 +02:00
|
|
|
# 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
|
2006-12-19 00:16:41 +01:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2008-02-22 01:26:05 +01:00
|
|
|
%preun
|
|
|
|
%stop_on_removal gpm
|
|
|
|
|
2006-12-19 00:16:41 +01:00
|
|
|
%post
|
2008-02-22 01:26:05 +01:00
|
|
|
/sbin/ldconfig
|
2006-12-19 00:16:41 +01:00
|
|
|
# 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
|
2008-08-22 20:38:21 +02:00
|
|
|
%{fillup_and_insserv gpm}
|
|
|
|
%{fillup_only -an mouse}
|
2006-12-19 00:16:41 +01:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
|
|
|
|
%postun
|
2008-02-22 01:26:05 +01:00
|
|
|
/sbin/ldconfig
|
2006-12-19 00:16:41 +01:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
2008-02-22 01:26:05 +01:00
|
|
|
%restart_on_update gpm
|
2006-12-19 00:16:41 +01:00
|
|
|
%{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*
|
2008-02-22 01:26:05 +01:00
|
|
|
%{_infodir}/*
|
|
|
|
%{_mandir}/*/*
|
|
|
|
%dir /etc/gpm
|
2006-12-19 00:16:41 +01:00
|
|
|
%config /etc/gpm/*
|
|
|
|
%config /etc/init.d/gpm
|
2008-02-22 01:26:05 +01:00
|
|
|
%{_bindir}/*
|
|
|
|
%{_sbindir}/*
|
|
|
|
%{_includedir}/*.h
|
2006-12-19 00:16:41 +01:00
|
|
|
%{_libdir}/lib*
|
|
|
|
/var/adm/fillup-templates/*
|
|
|
|
|
2007-03-01 21:55:29 +01:00
|
|
|
%changelog
|