# 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 Summary: A mouse server for the Linux console Name: gpm Version: 1.20.7 Release: %mkrel 3 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 # 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): info-install Requires(preun): info-install Requires(post): rpm-helper >= 0.24.8-1 Requires(preun): rpm-helper >= 0.24.8-1 BuildRequires: byacc %if %{build_curses} BuildRequires: ncurses-devel %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 # 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 %build %serverbuild ./autogen.sh CFLAGS="$CFLAGS -D_GNU_SOURCE -DPIC -fPIC" \ %configure2_5x %{?_without_curses} make gcc $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 if [ -x "/sbin/install-info" ]; then %_install_info %{name}.info fi %preun %_preun_service gpm %_remove_install_info %{name}.info %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 * 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