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
|
|
|
#
|
2017-06-12 19:22:56 +02:00
|
|
|
# Copyright (c) 2017 SUSE LINUX 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
|
2016-01-13 14:53:14 +01:00
|
|
|
Source7: gpl-2.0.txt
|
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
|
2016-01-13 14:53:14 +01:00
|
|
|
#PATCH-FIX-UPSTREAM Copy the current licence text from gpl-2.0+ to gpm.h
|
|
|
|
Patch30: gpm-fix_fsf_addess.patch
|
2017-08-01 13:15:35 +02:00
|
|
|
#PATCH-FIX-UPSTREAM Fix missing declarations
|
|
|
|
Patch31: decls.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
|
2017-09-11 22:04:03 +02:00
|
|
|
The gpm (general purpose mouse) daemon is a mouse server for
|
|
|
|
applications running on the Linux console. It provides cut and paste
|
|
|
|
operations. If a gpm-aware program, such as mc (Midnight Commander)
|
|
|
|
or w3m (a text-based web browser), is active, they will use to gpm to
|
|
|
|
receive mouse events and do custom handling.
|
2006-12-19 00:16:41 +01:00
|
|
|
|
2014-03-27 14:05:35 +01:00
|
|
|
%package -n %lname
|
|
|
|
Summary: Console mouse support library
|
2015-04-24 09:56:46 +02:00
|
|
|
License: GPL-2.0+
|
2014-03-27 14:05:35 +01:00
|
|
|
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)
|
2015-04-24 09:56:46 +02:00
|
|
|
License: GPL-2.0+
|
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
|
2016-01-13 14:53:14 +01:00
|
|
|
%patch30
|
2017-08-01 13:15:35 +02:00
|
|
|
%patch31 -p1
|
2010-09-09 14:55:44 +02:00
|
|
|
cp %{S:2} %{S:3} %{S:4} .
|
2016-01-13 14:53:14 +01:00
|
|
|
cp %{S:7} COPYING
|
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.
|
2016-01-22 16:11:30 +01:00
|
|
|
#export SUSE_ASNEEDED=1
|
2013-10-29 13:22:04 +01:00
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
2008-02-22 01:26:05 +01:00
|
|
|
autoreconf -fi
|
2016-01-22 16:11:30 +01:00
|
|
|
export CFLAGS="%{optflags} -DQUIET_LIBGPM -D_REENTRANT"
|
2010-10-27 06:51:56 +02:00
|
|
|
%configure --disable-static \
|
2016-01-22 16:11:30 +01:00
|
|
|
--sysconfdir=%{_sysconfdir}/gpm
|
|
|
|
make CC=gcc %{?_smp_mflags}
|
|
|
|
gcc %{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
|
2016-01-22 16:11:30 +01:00
|
|
|
install -d %{buildroot}%{_sysconfdir}/${file/conf\/gpm-/gpm\/}
|
2006-12-19 00:16:41 +01:00
|
|
|
for file in conf/gpm-* ; do
|
2016-01-22 16:11:30 +01:00
|
|
|
install -d %{buildroot}%{_sysconfdir}/${file/conf\/gpm-/gpm\/}
|
|
|
|
install -m 644 $file %{buildroot}%{_sysconfdir}/${file/conf\/gpm-/gpm\/}
|
2006-12-19 00:16:41 +01:00
|
|
|
done
|
|
|
|
#
|
|
|
|
# lisp
|
2007-05-24 12:18:34 +02:00
|
|
|
# an updated version is part of emacs now
|
2016-01-22 16:11:30 +01:00
|
|
|
#install -d %%{buildroot}/usr/share/emacs/site-lisp
|
|
|
|
#install contrib/emacs/t-mouse.el* %%{buildroot}/usr/share/emacs/site-lisp
|
2006-12-19 00:16:41 +01:00
|
|
|
#
|
|
|
|
# start script
|
2016-01-22 16:11:30 +01:00
|
|
|
install -m 755 -d %{buildroot}/var/adm/fillup-templates
|
|
|
|
install -m 755 -d %{buildroot}/%{_unitdir}
|
|
|
|
install -m 755 -d %{buildroot}/usr/sbin
|
2011-01-27 17:00:19 +01:00
|
|
|
install -m 755 inputattach %{buildroot}%{_sbindir}
|
2016-01-22 16:11:30 +01:00
|
|
|
install -m 644 sysconfig.mouse-%{name} %{buildroot}/var/adm/fillup-templates
|
|
|
|
install -m 644 %{S:2} %{buildroot}/%{_unitdir}/gpm.service
|
|
|
|
ln -sf %{_sbindir}/service %{buildroot}/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
|
2016-01-22 16:11:30 +01:00
|
|
|
if grep "^GPM_PROTOCOL=" %{_sysconfdir}/sysconfig/mouse 1>/dev/null 2>/dev/null ; then
|
|
|
|
if grep "^MOUSETYPE=" %{_sysconfdir}/sysconfig/mouse 1>/dev/null 2>/dev/null ; then
|
2006-12-19 00:16:41 +01:00
|
|
|
# comment out the obsolete MOUSETYPE variable
|
2016-01-22 16:11:30 +01:00
|
|
|
perl -pi -e "s|^(MOUSETYPE=.*)$|\#\$1 \# the variable GPM_PROTOCOL was renamed to MOUSETYPE|" %%{_sysconfdir}/sysconfig/mouse
|
2006-12-19 00:16:41 +01:00
|
|
|
fi
|
|
|
|
# rename GPM_PROTOCOL to MOUSETYPE
|
2016-01-22 16:11:30 +01:00
|
|
|
perl -pi -e "s|^GPM_PROTOCOL=(.*)$|\# the variable GPM_PROTOCOL was renamed to MOUSETYPE\nMOUSETYPE=\$1|" %%{_sysconfdir}/sysconfig/mouse
|
2006-12-19 00:16:41 +01:00
|
|
|
fi
|
2010-09-09 14:55:44 +02:00
|
|
|
|
|
|
|
# Do not package static library
|
2016-01-22 16:11:30 +01:00
|
|
|
rm -fv %{buildroot}/%{_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
|
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
|
|
|
|
%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
|
|
|
|
2016-01-13 14:53:14 +01:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
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}/*/*
|
2016-01-22 16:11:30 +01:00
|
|
|
%dir %config %{_sysconfdir}/gpm
|
|
|
|
%config %{_sysconfdir}/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
|