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
|
|
|
#
|
2014-03-27 14:05:35 +01:00
|
|
|
# Copyright (c) 2014 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/
|
|
|
|
#
|
|
|
|
|
2008-02-22 01:26:05 +01:00
|
|
|
|
2006-12-19 00:16:41 +01:00
|
|
|
Name: gpm
|
2014-03-27 14:05:35 +01:00
|
|
|
%define lname libgpm2
|
2013-04-16 13:33:36 +02:00
|
|
|
Version: 1.20.7
|
2013-01-19 17:07:34 +01:00
|
|
|
Release: 0
|
2006-12-19 00:16:41 +01:00
|
|
|
Summary: Console Mouse Support
|
2013-04-22 13:29:18 +02:00
|
|
|
License: GPL-2.0+ and GPL-3.0+
|
2013-01-19 17:07:34 +01:00
|
|
|
Group: System/Console
|
|
|
|
Url: http://linux.schottelius.org/gpm/
|
|
|
|
|
2013-04-16 15:03:27 +02:00
|
|
|
Source0: http://www.nico.schottelius.org/software/gpm/archives/gpm-%{version}.tar.lzma
|
2013-10-29 13:22:04 +01:00
|
|
|
Source2: gpm.service
|
2010-09-09 14:55:44 +02:00
|
|
|
Source3: sysconfig.mouse-%{name}
|
2013-10-29 13:22:04 +01:00
|
|
|
Source4: README.SUSE
|
2010-09-09 14:55:44 +02:00
|
|
|
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
|
|
|
|
Patch23: gpm-lib-silent.patch
|
|
|
|
Patch25: gpm-multilib.patch
|
|
|
|
Patch26: gpm-weak-wgetch.patch
|
2013-04-16 13:33:36 +02:00
|
|
|
#PATCH-FIX-UPSTREAM Pass path to gpm.h
|
|
|
|
Patch28: gpm-dependencies.patch
|
|
|
|
#PATCH-FIX-UPSTREAM Create the symlink libgpm.so
|
|
|
|
Patch29: gpm-do_create_symlink.patch
|
2013-01-19 17:07:34 +01:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: lzma
|
2013-04-16 13:33:36 +02:00
|
|
|
BuildRequires: makeinfo
|
2013-01-19 17:07:34 +01:00
|
|
|
BuildRequires: ncurses-devel
|
2013-12-02 12:40:37 +01:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2013-10-29 13:22:04 +01:00
|
|
|
Requires(pre): %install_info_prereq
|
|
|
|
Requires(pre): /bin/sed
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
%{?systemd_requires}
|
2013-01-19 17:07:34 +01:00
|
|
|
Provides: select
|
|
|
|
%ifarch ppc64
|
|
|
|
# bug437293
|
|
|
|
Obsoletes: gpm-64bit
|
|
|
|
%endif
|
2006-12-19 00:16:41 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2014-03-27 14:05:35 +01:00
|
|
|
%package -n %lname
|
|
|
|
Summary: Console mouse support library
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
This package provides a library that handles mouse requests and
|
|
|
|
delivers them to applications. See the description for the "gpm"
|
|
|
|
package for more information.
|
|
|
|
|
2010-09-09 14:55:44 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for gpm (Console Mouse Support)
|
2013-01-19 17:07:34 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2014-03-27 14:05:35 +01:00
|
|
|
Requires: %lname = %version
|
2010-09-09 14:55:44 +02:00
|
|
|
|
|
|
|
%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
|
|
|
|
%patch23
|
|
|
|
%patch25
|
|
|
|
%patch26
|
2013-04-16 13:33:36 +02:00
|
|
|
%patch28
|
|
|
|
%patch29
|
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.
|
2013-04-16 13:33:36 +02:00
|
|
|
#export SUSE_ASNEEDED=0
|
2013-10-29 13:22:04 +01:00
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
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
|
2013-01-19 17:07:34 +01:00
|
|
|
make install DESTDIR="%buildroot" 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
|
2013-10-29 13:22:04 +01:00
|
|
|
install -m 755 -d $RPM_BUILD_ROOT/%{_unitdir}
|
2006-12-19 00:16:41 +01:00
|
|
|
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
|
2014-04-06 07:24:27 +02:00
|
|
|
install -m 644 %{S:2} $RPM_BUILD_ROOT/%{_unitdir}/gpm.service
|
2013-10-29 13:22:04 +01:00
|
|
|
ln -sf /sbin/service $RPM_BUILD_ROOT/usr/sbin/rcgpm
|
2006-12-19 00:16:41 +01:00
|
|
|
# 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
|
2013-10-29 13:22:04 +01:00
|
|
|
mkdir -p %{buildroot}/run
|
|
|
|
touch %{buildroot}/run/gpm.pid
|
2010-10-28 12:21:31 +02:00
|
|
|
|
2014-03-27 14:05:35 +01:00
|
|
|
%pre
|
|
|
|
%service_add_pre gpm.service
|
|
|
|
|
2010-09-09 14:55:44 +02:00
|
|
|
%preun
|
2013-10-29 13:22:04 +01:00
|
|
|
%service_del_preun gpm.service
|
2010-09-09 14:55:44 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
2013-10-29 13:22:04 +01:00
|
|
|
%{fillup_only gpm}
|
|
|
|
%service_add_post gpm.service
|
2008-08-22 20:38:21 +02:00
|
|
|
%{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
|
2013-10-29 13:22:04 +01:00
|
|
|
%service_del_postun gpm.service
|
2006-12-19 00:16:41 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2013-10-29 13:22:04 +01:00
|
|
|
%doc COPYING README README.gpm2 README.SUSE TODO
|
2013-04-16 13:33:36 +02:00
|
|
|
%doc doc/Announce doc/FAQ doc/README* doc/changelog
|
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/*
|
2013-10-29 13:22:04 +01:00
|
|
|
%{_unitdir}/gpm.service
|
2008-02-22 01:26:05 +01:00
|
|
|
%{_bindir}/*
|
|
|
|
%{_sbindir}/*
|
2006-12-19 00:16:41 +01:00
|
|
|
/var/adm/fillup-templates/*
|
2013-10-29 13:22:04 +01:00
|
|
|
%ghost /run/gpm.pid
|
2006-12-19 00:16:41 +01:00
|
|
|
|
2014-03-27 14:05:35 +01:00
|
|
|
%files -n %lname
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libgpm.so.2*
|
|
|
|
|
2010-09-09 14:55:44 +02:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2013-04-16 13:33:36 +02:00
|
|
|
%{_includedir}/gpm.h
|
2010-09-09 14:55:44 +02:00
|
|
|
%{_libdir}/libgpm.so
|
|
|
|
|
2007-03-01 21:55:29 +01:00
|
|
|
%changelog
|