2006-12-19 00:16:41 +01:00
|
|
|
#
|
2011-10-04 10:36:21 +02:00
|
|
|
# spec file for package gpm
|
2006-12-19 00:16:41 +01:00
|
|
|
#
|
2011-10-04 10:36:21 +02:00
|
|
|
# Copyright (c) 2011 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
|
2011-10-15 20:44:02 +02:00
|
|
|
BuildRequires: bison libtool lzma 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
|
|
|
|
#
|
2010-09-09 14:55:44 +02:00
|
|
|
Version: 1.20.6
|
2011-10-04 10:36:21 +02:00
|
|
|
Release: 3
|
2006-12-19 00:16:41 +01:00
|
|
|
Summary: Console Mouse Support
|
2010-09-09 14:55:44 +02:00
|
|
|
Source0: gpm-%{version}.tar.lzma
|
|
|
|
Source1: gpm-%{version}-patches.tar.lzma
|
|
|
|
Source2: rcgpm
|
|
|
|
Source3: sysconfig.mouse-%{name}
|
|
|
|
Source4: README.SuSE
|
|
|
|
Source5: baselibs.conf
|
2011-01-27 17:00:19 +01:00
|
|
|
Source6: inputattach.c
|
2010-09-09 14:55:44 +02:00
|
|
|
Patch0: gpm-DESTDIR.patch
|
|
|
|
Patch4: gpm-syn_conf.patch
|
|
|
|
Patch6: gpm-conf.patch
|
|
|
|
Patch7: gpm-va_arg.patch
|
|
|
|
Patch9: gpm-no_templates_for_new_multiple_mode.patch
|
|
|
|
Patch10: gpm-ceil.patch
|
|
|
|
Patch11: gpm-Gpm_Open.patch
|
|
|
|
Patch12: gpm-daemon_mode.patch
|
|
|
|
Patch15: gpm-verbosity.patch
|
|
|
|
Patch17: gpm-log.patch
|
|
|
|
Patch18: gpm-glibc210.patch
|
|
|
|
Patch19: gpm-use_getdtablesize.patch
|
|
|
|
Patch20: gpm-int_ptr_casts.patch
|
2011-01-27 17:00:19 +01:00
|
|
|
Patch21: gpm-close-fds.patch
|
|
|
|
Patch22: gpm-gcc4.3.patch
|
|
|
|
Patch23: gpm-lib-silent.patch
|
|
|
|
Patch24: gpm-libtool.patch
|
|
|
|
Patch25: gpm-multilib.patch
|
|
|
|
Patch26: gpm-weak-wgetch.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:
|
|
|
|
--------
|
2010-09-09 14:55:44 +02:00
|
|
|
Alessandro Rubini <rubini at ipvvis.unipv.it>
|
|
|
|
Nico Schottelius <nico at schottelius.org>
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
License: GPLv2+
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Summary: Development files for gpm (Console Mouse Support)
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Development files for the gpm (general purpose mouse) package.
|
2006-12-19 00:16:41 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0
|
|
|
|
%patch4
|
|
|
|
%patch6
|
|
|
|
%patch7
|
|
|
|
%patch9
|
|
|
|
%patch10
|
|
|
|
%patch11
|
|
|
|
%patch12
|
2007-03-01 21:55:29 +01:00
|
|
|
%patch15
|
2008-04-09 21:48:22 +02:00
|
|
|
%patch17
|
2010-09-09 14:55:44 +02:00
|
|
|
%patch18
|
|
|
|
%patch19
|
|
|
|
%patch20
|
2011-01-27 17:00:19 +01:00
|
|
|
%patch21
|
|
|
|
%patch22
|
|
|
|
%patch23
|
|
|
|
%patch24
|
|
|
|
%patch25
|
|
|
|
%patch26
|
2010-09-09 14:55:44 +02:00
|
|
|
cp %{S:2} %{S:3} %{S:4} .
|
2006-12-19 00:16:41 +01:00
|
|
|
|
|
|
|
%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" \
|
2010-10-27 06:51:56 +02:00
|
|
|
%configure --disable-static \
|
2006-12-19 00:16:41 +01:00
|
|
|
--sysconfdir=/etc/gpm
|
2011-10-04 10:37:19 +02:00
|
|
|
make CC="%{__cc}" %{?_smp_mflags}
|
2011-01-27 17:00:19 +01:00
|
|
|
%__cc %{optflags} -o inputattach %{SOURCE6}
|
2006-12-19 00:16:41 +01:00
|
|
|
|
|
|
|
%install
|
2011-01-27 17:00:19 +01:00
|
|
|
%makeinstall ROOT=""
|
2006-12-19 00:16:41 +01:00
|
|
|
#
|
|
|
|
# gpm confings
|
2010-09-09 14:55:44 +02:00
|
|
|
install -d $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/}
|
2006-12-19 00:16:41 +01:00
|
|
|
for file in conf/gpm-* ; do
|
2010-09-09 14:55:44 +02:00
|
|
|
install -d $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/}
|
2006-12-19 00:16:41 +01:00
|
|
|
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
|
2011-01-27 17:00:19 +01:00
|
|
|
install -m 755 inputattach %{buildroot}%{_sbindir}
|
2006-12-19 00:16:41 +01:00
|
|
|
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
|
|
|
|
# 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
|
2010-09-09 14:55:44 +02:00
|
|
|
|
|
|
|
# Do not package static library
|
2010-10-27 06:51:56 +02:00
|
|
|
rm -fv $RPM_BUILD_ROOT/%{_libdir}/libgpm.a
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/run
|
|
|
|
touch %{buildroot}%{_localstatedir}/run/gpm.pid
|
2010-10-28 12:21:31 +02:00
|
|
|
|
2010-09-09 14:55:44 +02:00
|
|
|
%preun
|
|
|
|
%stop_on_removal gpm
|
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
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)
|
2010-09-09 14:55:44 +02:00
|
|
|
%doc BUGS COPYING README README.SuSE TODO doc/changes
|
2006-12-19 00:16:41 +01:00
|
|
|
%doc doc/Announce doc/FAQ doc/README*
|
2008-02-22 01:26:05 +01:00
|
|
|
%{_infodir}/*
|
|
|
|
%{_mandir}/*/*
|
2010-10-27 06:51:56 +02:00
|
|
|
%dir %config /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}/*
|
2010-09-09 14:55:44 +02:00
|
|
|
%{_libdir}/libgpm.so.*
|
2006-12-19 00:16:41 +01:00
|
|
|
/var/adm/fillup-templates/*
|
2010-10-27 06:51:56 +02:00
|
|
|
%ghost %{_localstatedir}/run/gpm.pid
|
2006-12-19 00:16:41 +01:00
|
|
|
|
2010-09-09 14:55:44 +02:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/*.h
|
|
|
|
%{_libdir}/libgpm.so
|
|
|
|
|
2007-03-01 21:55:29 +01:00
|
|
|
%changelog
|