# # spec file for package gpm # # Copyright (c) 2013 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/ # Name: gpm Version: 1.20.7 Release: 0 Summary: Console Mouse Support License: GPL-2.0+ and GPL-3.0+ Group: System/Console Url: http://linux.schottelius.org/gpm/ Source0: http://www.nico.schottelius.org/software/gpm/archives/gpm-%{version}.tar.lzma Source2: rcgpm Source3: sysconfig.mouse-%{name} Source4: README.SuSE Source5: baselibs.conf Source6: inputattach.c 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 Patch21: gpm-close-fds.patch Patch23: gpm-lib-silent.patch Patch25: gpm-multilib.patch Patch26: gpm-weak-wgetch.patch #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 BuildRequires: bison BuildRequires: libtool BuildRequires: lzma BuildRequires: makeinfo BuildRequires: ncurses-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %install_info_prereq PreReq: /bin/sed %insserv_prereq %fillup_prereq Provides: select %ifarch ppc64 # bug437293 Obsoletes: gpm-64bit %endif %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. %package devel Requires: %{name} = %{version} Summary: Development files for gpm (Console Mouse Support) Group: Development/Libraries/C and C++ %description devel Development files for the gpm (general purpose mouse) package. %prep %setup -q %patch0 %patch4 %patch6 %patch7 %patch9 %patch10 %patch11 %patch12 %patch15 %patch17 %patch18 %patch19 %patch20 %patch21 %patch23 %patch25 %patch26 %patch28 %patch29 cp %{S:2} %{S:3} %{S:4} . %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 ./autogen.sh autoreconf -fi CFLAGS="$RPM_OPT_FLAGS -DQUIET_LIBGPM" \ %configure --disable-static \ --sysconfdir=/etc/gpm make CC="%{__cc}" %{?_smp_mflags} %__cc %{optflags} -o inputattach %{SOURCE6} %install make install DESTDIR="%buildroot" ROOT="" # # gpm confings install -d $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/} for file in conf/gpm-* ; do install -d $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/} 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 755 inputattach %{buildroot}%{_sbindir} 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 # Do not package static library rm -fv $RPM_BUILD_ROOT/%{_libdir}/libgpm.a mkdir -p %{buildroot}%{_localstatedir}/run touch %{buildroot}%{_localstatedir}/run/gpm.pid %preun %stop_on_removal gpm %post /sbin/ldconfig %{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} %files %defattr(-,root,root) %doc COPYING README README.gpm2 README.SuSE TODO %doc doc/Announce doc/FAQ doc/README* doc/changelog %{_infodir}/* %{_mandir}/*/* %dir %config /etc/gpm %config /etc/gpm/* %config /etc/init.d/gpm %{_bindir}/* %{_sbindir}/* %{_libdir}/libgpm.so.* /var/adm/fillup-templates/* %ghost %{_localstatedir}/run/gpm.pid %files devel %defattr(-,root,root) %{_includedir}/gpm.h %{_libdir}/libgpm.so %changelog