# Allow first build without ncurses support %define build_curses %{?_without_curses:0}%{!?_without_curses:1} # this defines the library version that this package builds. %define LIBMAJ 2 %define LIBVER %{LIBMAJ}.1.0 %define libname %mklibname %{name} %LIBMAJ %define develname %mklibname %{name} -d %global _legacy_common_support 1 Summary: A mouse server for the Linux console Name: gpm Version: 1.20.7 Release: %mkrel 15 License: GPLv2+ Group: System/Servers URL: http://www.nico.schottelius.org/software/gpm/ Source0: http://www.nico.schottelius.org/software/gpm/archives/%{name}-%{version}.tar.lzma Source1: gpm.service Source2: inputattach.c Source3: serio-ids.h # fedora patches (gpm-1.20.5-1.fc10.src.rpm) Patch1: gpm-1.20.1-multilib.patch Patch2: gpm-1.20.1-lib-silent.patch Patch4: gpm-1.20.5-close-fds.patch Patch5: gpm-1.20.7-weak-wgetch.patch # Include patch from upstream pull request: https://github.com/telmich/gpm/pull/12 Patch10: gpm-1.20.7-sysmacros.patch # Include patch from upstream pull request: https://github.com/telmich/gpm/pull/20 Patch11: gpm-1.20.7-sigemptyset.patch # mga patches Patch50: gpm-1.20.5-nodebug.patch Patch51: gpm-1.20.0-docfix.patch Patch52: gpm-1.20.7-do_not_build_it_twice.diff Patch53: gpm-1.20.5-format_not_a_string_literal_and_no_format_arguments.diff Requires(post): rpm-helper >= 0.24.8-1 Requires(preun): rpm-helper >= 0.24.8-1 BuildRequires: byacc %if %{build_curses} BuildRequires: pkgconfig(ncurses) %endif BuildRequires: autoconf BuildRequires: texinfo %description Gpm provides mouse support to text-based Linux applications like the emacs editor, the Midnight Commander file management system, and other programs. Gpm also provides console cut-and-paste operations using the mouse and includes a program to allow pop-up menus to appear at the click of a mouse button. Gpm should be installed if you intend to use a mouse with your system in virtual consoles. %package -n %{libname} Summary: Libraries and header files for developing mouse driven programs Group: System/Libraries %description -n %{libname} Library used by the gpm program. Install %{libname}dev if you need to develop text-mode programs which will use the mouse. You'll also need to install the gpm package. %package -n %{develname} Summary: Libraries and header files for developing mouse driven programs Group: Development/C Requires: %{libname} = %{version} Provides: gpm-devel = %{version}-%{release} Provides: libgpm-devel = %{version}-%{release} Obsoletes: gpm-devel < %{version}-%{release} Obsoletes: %{mklibname %{name} 1 -d} < %{version}-%{release} %description -n %{develname} The %{develname} package contains the libraries and header files needed for development of mouse driven programs. This package allows you to develop text-mode programs which use the mouse. Install %{develname} if you need to develop text-mode programs which will use the mouse. You'll also need to install the gpm package. %prep %setup -q for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null done # fedora patches %patch1 -p1 -b .multilib %patch2 -p1 -b .lib-silent %patch4 -p1 -b .close-fds %patch5 -p1 -b .weak-wgetch %patch10 -p1 %patch11 -p1 # mga patches %patch50 -p1 -b .nodebug %patch51 -p1 -b .docfix %patch52 -p1 -b .do_not_build_it_twice %patch53 -p0 -b .format_not_a_string_literal_and_no_format_arguments # file is missing, copy in from the rpm package cp -p %{_prefix}/lib/rpm/mkinstalldirs . cp %{SOURCE2} inputattach.c cp %{SOURCE3} serio-ids.h # fix runstatedir sed -i -e 's,/var/run,%{_rundir},g' $(grep -rl /var/run) %build %serverbuild ./autogen.sh CPPFLAGS="$CPPFLAGS -I$(pwd)/src/headers/" \ CFLAGS="$CFLAGS -D_GNU_SOURCE -DPIC -fPIC -fcommon" \ %configure %{?_without_curses} CPPFLAGS="$CPPFLAGS" make gcc $CPPFLAGS $CFLAGS -o inputattach inputattach.c serio-ids.h %install install -d %{buildroot}%{_sysconfdir} install -d %{buildroot}/%{_lib} install -d %{buildroot}%{_datadir}/emacs/site-lisp PATH=/sbin:$PATH:%{_sbindir}:$PATH %makeinstall install -m0644 doc/gpm-root.1 %{buildroot}%{_mandir}/man1 install -m0644 conf/gpm-root.conf %{buildroot}%{_sysconfdir} #install -m0755 src/hltest %{buildroot}%{_bindir} install -m0755 inputattach %{buildroot}/%{_sbindir} ln -sf /%{_lib}/libgpm.so.%{LIBVER} %{buildroot}%{_libdir}/libgpm.so ln -sf libgpm.so.%{LIBVER} %{buildroot}/%{_lib}/libgpm.so.%{LIBMAJ} mv %{buildroot}%{_libdir}/libgpm.so.* %{buildroot}/%{_lib} mkdir -p %{buildroot}%_unitdir install -m644 %{SOURCE1} %{buildroot}%_unitdir # cleanup rm -rf %{buildroot}%{_datadir}/emacs/site-lisp %post %_post_service gpm %preun %_preun_service gpm %files %config(noreplace) %{_sysconfdir}/gpm-root.conf %{_unitdir}/gpm.service %{_bindir}/display-buttons %{_bindir}/display-coords %{_bindir}/mev %{_bindir}/gpm-root %{_bindir}/hltest %{_bindir}/mouse-test %{_bindir}/disable-paste %{_bindir}/get-versions %{_sbindir}/gpm %{_sbindir}/inputattach %{_infodir}/gpm.info* %{_mandir}/man1/mev.1* %{_mandir}/man1/mouse-test.1* %{_mandir}/man1/gpm-root.1* %{_mandir}/man7/gpm-types.7* %{_mandir}/man8/gpm.8* %files -n %{libname} %attr(0755,root,root) /%{_lib}/libgpm.so.%{LIBMAJ}* %files -n %{develname} %{_libdir}/libgpm.a %{_includedir}/gpm.h %{_libdir}/libgpm.so %changelog * Thu Mar 17 2022 umeabot <umeabot> 1.20.7-15.mga9 + Revision: 1797467 - Mageia 9 Mass Rebuild * Fri Aug 21 2020 joequant <joequant> 1.20.7-14.mga8 + Revision: 1617507 - fix gcc10 build * Wed Aug 12 2020 ovitters <ovitters> 1.20.7-13.mga8 + Revision: 1613590 - service file output to syslog (mga#27094) - dont run in a vm (as per Fedora) + joequant <joequant> - fix gcc10 build * Fri Feb 14 2020 umeabot <umeabot> 1.20.7-11.mga8 + Revision: 1523030 - Mageia 8 Mass Rebuild + wally <wally> - replace deprecated %%configure2_5x * Sat Feb 16 2019 wally <wally> 1.20.7-10.mga7 + Revision: 1367535 - store PID files to /run instead of /var/run * Mon Sep 03 2018 tv <tv> 1.20.7-9.mga7 + Revision: 1256403 - really add the patches "added" by pterjan - rely on filetriggers for info system (mga#23482) + pterjan <pterjan> - Add patches from Fedora to fix build * Mon Feb 01 2016 umeabot <umeabot> 1.20.7-7.mga6 + Revision: 930431 - Mageia 6 Mass Rebuild * Wed Oct 15 2014 umeabot <umeabot> 1.20.7-6.mga5 + Revision: 749811 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 1.20.7-5.mga5 + Revision: 679914 - Mageia 5 Mass Rebuild * Fri Oct 18 2013 umeabot <umeabot> 1.20.7-4.mga4 + Revision: 505221 - Mageia 4 Mass Rebuild * Sat Jan 12 2013 umeabot <umeabot> 1.20.7-3.mga3 + Revision: 352527 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Oct 30 2012 luigiwalser <luigiwalser> 1.20.7-2.mga3 + Revision: 311644 - do not require chkconfig - sync inputattach with fedora * Sun Oct 28 2012 fwang <fwang> 1.20.7-1.mga3 + Revision: 310961 - br texinfo for makeinfo - use autogen - rediff build patch - new version 1.20.7 * Thu Aug 09 2012 tv <tv> 1.20.6-8.mga3 + Revision: 280279 - drop sysv service (& very old migration bits) * Sat Apr 28 2012 tmb <tmb> 1.20.6-7.mga2 + Revision: 233715 - Require rpm-helper >= 0.24.8-1 for systemd support * Mon Jan 16 2012 dmorgan <dmorgan> 1.20.6-6.mga2 + Revision: 196613 - Add systemd support ( from fedora) * Sat Jan 08 2011 blino <blino> 1.20.6-5.mga1 + Revision: 679 - update comments - remove old ldconfig post scripts, adapt description - imported package gpm * Thu Dec 02 2010 Oden Eriksson <oeriksson@mandriva.com> 1.20.6-4mdv2011.0 + Revision: 605496 - rebuild * Sun Mar 14 2010 Oden Eriksson <oeriksson@mandriva.com> 1.20.6-3mdv2010.1 + Revision: 519006 - rebuild * Wed Sep 02 2009 Christophe Fergeau <cfergeau@mandriva.com> 1.20.6-2mdv2010.0 + Revision: 425022 - rebuild * Tue Feb 10 2009 Funda Wang <fwang@mandriva.org> 1.20.6-1mdv2009.1 + Revision: 339063 - New version 1.20.6 package version patch merged upstream * Sat Dec 20 2008 Oden Eriksson <oeriksson@mandriva.com> 1.20.5-2mdv2009.1 + Revision: 316752 - sync with gpm-1.20.5-1.fc10.src.rpm - fix build with -Werror=format-security (P53) * Sat Jul 12 2008 Funda Wang <fwang@mandriva.org> 1.20.5-1mdv2009.0 + Revision: 234041 - autoconf is not required here - New version 1.20.5 - rediff patches + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Fri May 30 2008 Funda Wang <fwang@mandriva.org> 1.20.4-1mdv2009.0 + Revision: 213294 - update LIBVER - New major (1->2) - New version 1.20.4 - sync with fedora patches * Tue May 20 2008 Oden Eriksson <oeriksson@mandriva.com> 1.20.1-22mdv2009.0 + Revision: 209468 - bump release - added P52 to fix the build - rebuilt with gcc43 * Tue Mar 04 2008 Oden Eriksson <oeriksson@mandriva.com> 1.20.1-20mdv2008.1 + Revision: 178714 - rebuild + Thierry Vignaud <tv@mandriva.org> - rebuild - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Wed Aug 29 2007 Oden Eriksson <oeriksson@mandriva.com> 1.20.1-18mdv2008.0 + Revision: 74756 - sync with gpm-1.20.1-89.fc8.src.rpm (phew!), only 2 of our old patches applies, the rest is fixed by other means... - bump release + Thierry Vignaud <tv@mandriva.org> - kill file require on chkconfig - kill file require on info-install * Tue Oct 31 2006 Oden Eriksson <oeriksson@mandriva.com> 1.20.1-15mdv2007.0 + Revision: 74550 - bunzip patches and the init script - Import gpm * Mon Jan 09 2006 Olivier Blin <oblin@mandriva.com> 1.20.1-14mdk - convert parallel init to LSB * Mon Jan 02 2006 Olivier Blin <oblin@mandriva.com> 1.20.1-13mdk - parallel init support - remove requires on release * Fri Oct 21 2005 Olivier Thauvin <nanardon@mandriva.org> 1.20.1-12mdk - rebuild - fix prereq * Wed Jun 09 2004 Per Ãyvind Karlsen <peroyvind@linux-mandrake.com> 1.20.1-11mdk - fix buildrequires * Wed Mar 17 2004 Frederic Lepied <flepied@mandrakesoft.com> 1.20.1-10mdk - put lib in /%%{_lib} (bug #7182)