packages: gpm/gpm.init, gpm/gpm.spec, gpm/gpm.sysconfig, gpm/gpm.service (N...
baggins
baggins at pld-linux.org
Mon Feb 13 22:06:19 CET 2012
Author: baggins Date: Mon Feb 13 21:06:19 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 11
- added systemd support
- upstart script moved to separate package
---- Files affected:
packages/gpm:
gpm.init (1.32 -> 1.33) , gpm.spec (1.175 -> 1.176) , gpm.sysconfig (1.10 -> 1.11) , gpm.service (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/gpm/gpm.init
diff -u packages/gpm/gpm.init:1.32 packages/gpm/gpm.init:1.33
--- packages/gpm/gpm.init:1.32 Fri Dec 2 00:59:40 2011
+++ packages/gpm/gpm.init Mon Feb 13 22:06:13 2012
@@ -34,9 +34,6 @@
return
fi
- [ -z "$DEVICE" ] && nls "Please set %s in /etc/sysconfig/mouse" "DEVICE"
- [ -z "$MOUSETYPE" ] && nls "Please set %s in /etc/sysconfig/mouse" "MOUSETYPE"
-
msg_starting "Gpm"
OPTIONS=""
[ -n "$DEVICE" ] && OPTIONS="-m $DEVICE"
================================================================
Index: packages/gpm/gpm.spec
diff -u packages/gpm/gpm.spec:1.175 packages/gpm/gpm.spec:1.176
--- packages/gpm/gpm.spec:1.175 Tue Jan 10 17:43:53 2012
+++ packages/gpm/gpm.spec Mon Feb 13 22:06:13 2012
@@ -15,7 +15,7 @@
Summary(uk.UTF-8): СеÑÐ²ÐµÑ ÑобоÑи з миÑÐ¾Ñ Ð´Ð»Ñ ÐºÐ¾Ð½ÑÐ¾Ð»Ñ Linux
Name: gpm
Version: 1.20.6
-Release: 10
+Release: 11
Epoch: 1
License: GPL v2+
Group: Daemons
@@ -25,6 +25,7 @@
Source2: %{name}.sysconfig
Source3: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
Source4: %{name}.upstart
+Source5: %{name}.service
# Source3-md5: 893cf1468604523c6e9f9257a5671688
Patch0: %{name}-info.patch
Patch1: %{name}-DESTDIR.patch
@@ -38,11 +39,12 @@
BuildRequires: bison
BuildRequires: gawk
BuildRequires: ncurses-devel >= 5.0
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.626
BuildRequires: texinfo
Requires(post,preun): /sbin/chkconfig
Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: rc-scripts >= 0.4.3.0
+Requires: systemd-units >= 37-0.10
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -222,6 +224,19 @@
%description emacs -l pl.UTF-8
Pliki trybu GPM dla Emacsa.
+%package upstart
+Summary: Upstart job description for gpm
+Summary(pl.UTF-8): Opis zadania Upstart dla gpm
+Group: Daemons
+Requires: %{name} = %{version}-%{release}
+Requires: upstart >= 0.6
+
+%description upstart
+Upstart job description for gpm.
+
+%description upstart -l pl.UTF-8
+Opis zadania Upstart dla gpm.
+
%prep
%setup -q
%patch0 -p1
@@ -246,7 +261,7 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,init}
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,init},%{systemdunitdir}}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -257,6 +272,8 @@
install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/gpm
install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mouse
cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/init/gpm.conf
+cp -a %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/gpm.service
+
bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
@@ -273,26 +290,75 @@
/sbin/chkconfig --add gpm
%service gpm restart "gpm daemon"
+%systemd_post gpm.service
%preun
if [ "$1" = "0" ]; then
%service gpm stop
/sbin/chkconfig --del gpm
fi
+%systemd_preun gpm.service
+
+%postun
+[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%systemd_reload
-%postun -p /sbin/postshell
--/usr/sbin/fix-info-dir -c %{_infodir}
+%triggerpostun -- %{name} < 1:1.20.6-11
+if [ -f /etc/sysconfig/mouse ]; then
+ . /etc/sysconfig/mouse
+ OPTIONS=""
+ if [ -n "$DEVICE" ]; then
+ OPTIONS="-m $DEVICE"
+ else
+ OPTIONS="-m /dev/input/mice"
+ fi
+ if [ -n "$MOUSETYPE" ]; then
+ OPTIONS="$OPTIONS -t $MOUSETYPE"
+ else
+ OPTIONS="$OPTIONS -t imps2"
+ fi
+ [ -n "$BAUD_RATE" ] && OPTIONS="$OPTIONS -b $BAUD_RATE"
+ [ -n "$CLEAR_LINES" ] && OPTIONS="$OPTIONS -o $CLEAR_LINES"
+ [ -n "$BUTTON_SEQ" ] && OPTIONS="$OPTIONS -B $BUTTON_SEQ"
+ [ -n "$TAP_BUTTON" ] && OPTIONS="$OPTIONS -g $TAP_BUTTON"
+ [ -n "$ACCEL" ] && OPTIONS="$OPTIONS -a $ACCEL"
+ [ -n "$DELTA" ] && OPTIONS="$OPTIONS -d $DELTA"
+ [ -n "$INTERVAL" ] && OPTIONS="$OPTIONS -i $INTERVAL"
+ [ -n "$RESP" ] && OPTIONS="$OPTIONS -r $RESP"
+ [ -n "$SAMPLE_RATE" ] && OPTIONS="$OPTIONS -s $SAMPLE_RATE"
+ [ -n "$CHARSET" ] && OPTIONS="$OPTIONS -l \\\"$CHARSET\\\""
+ [ "$BUTTON_COUNT" = "2" ] && OPTIONS="$OPTIONS -2"
+ [ "$BUTTON_COUNT" = "3" ] && OPTIONS="$OPTIONS -3"
+ if [ -n "$POINTER_VIS" ] && [ "$POINTER_VIS" != "no" ]; then
+ OPTIONS="$OPTIONS -p"
+ fi
+ if [ -n "$REPEATER" ] && [ "$REPEATER" != "no" ]; then
+ OPTIONS="$OPTIONS -R"
+ fi
+ %{__cp} -f /etc/sysconfig/mouse{,.rpmsave}
+ [ -f /etc/sysconfig/mouse.rpmnew ] && %{__cp} -f /etc/sysconfig/mouse{.rpmnew,}
+ echo >>/etc/sysconfig/mouse
+ echo "# Added by rpm trigger" >>/etc/sysconfig/mouse
+ echo "GPM_OPTIONS=\"$OPTIONS\"" >>/etc/sysconfig/mouse
+fi
+%systemd_trigger gpm.service
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
+%post upstart
+%upstart_post gpm
+
+%postun upstart
+%upstart_postun gpm
+
%files
%defattr(644,root,root,755)
%doc BUGS Changes README TODO doc/FAQ doc/README* conf/*.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gpm-root.conf
%attr(754,root,root) /etc/rc.d/init.d/gpm
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mouse
-%config(noreplace) %verify(not md5 mtime size) /etc/init/gpm.conf
+%{systemdunitdir}/gpm.service
%attr(755,root,root) %{_bindir}/display-buttons
%attr(755,root,root) %{_bindir}/display-coords
@@ -332,12 +398,21 @@
%defattr(644,root,root,755)
%{_datadir}/emacs/site-lisp/*.el*
+%files upstart
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/init/gpm.conf
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.176 2012/02/13 21:06:13 baggins
+- rel 11
+- added systemd support
+- upstart script moved to separate package
+
Revision 1.175 2012/01/10 16:43:53 lisu
- restored -ncursesw.patch and just modify it
================================================================
Index: packages/gpm/gpm.sysconfig
diff -u packages/gpm/gpm.sysconfig:1.10 packages/gpm/gpm.sysconfig:1.11
--- packages/gpm/gpm.sysconfig:1.10 Thu Oct 19 17:11:28 2006
+++ packages/gpm/gpm.sysconfig Mon Feb 13 22:06:13 2012
@@ -1,60 +1,7 @@
# Customized settings for gpm
# Check out "man gpm" for detailed setup options
-# Mouse device (for example /dev/mouse, /dev/ttyS0, /dev/psaux, /dev/input/mice)
-DEVICE=/dev/input/mice
-
-# Mouse type (ms, msc, ps2, ...) Use "gpm -m /dev/mouse -t help" for detailed list
-MOUSETYPE=imps2
-
-# Force specified button count (2/3)
-BUTTON_COUNT=
-
-# Device baud rate (default == 1200)
-BAUD_RATE=
-
-# Clear some serial lines on startup. May be "dtr", "rts" or "both".
-# Needed by some strange serial mice (for example A4Tech NWW-9)
-CLEAR_LINES=
-
-# Acceleration (default 2) - delta multiplying factor:
-ACCEL=
-
-# Delta (must be 2 or more):
-DELTA=
-
-# Multiple click max interval (in milliseconds)
-INTERVAL=
-
-# Mouse responsiveness
-RESP=
-
-# Mouse device sample frequency
-SAMPLE_RATE=
-
-# Button sequence ("123" by default). May be useful for left-handed people
-# ("321" reverts button order)
-BUTTON_SEQ=
-
-# Which button should be considered pressed if touchpad was "tapped"
-# (1,2,3)
-TAP_BUTTON=
-
-# when "yes", gpm shows mouse pointer during text selection
-POINTER_VIS=no
-
-# should gpm repeat received data to /dev/gpmdata (using MouseSystems
-# protocol). May be useful for other programs that would like to use
-# mouse while gpm is running (does not require port access)
-REPEATER=no
-
-# word-constituent characters. For example:
-# "a-zA-Z0-9_±æê³ñó¶¿¼¡ÆÊ£ÑÓ¦¯¬" selects polish national characters as
-# word-constituent. This is necessary as gpm does not support locales.
-CHARSET=
-
-# other gpm options, for example when you need multiple devices support
-GPM_OPTIONS=
+GPM_OPTIONS="-m /dev/input/mice -t imps2"
# Nice level for gpm
SERVICE_RUN_NICE_LEVEL="-1"
================================================================
Index: packages/gpm/gpm.service
diff -u /dev/null packages/gpm/gpm.service:1.1
--- /dev/null Mon Feb 13 22:06:19 2012
+++ packages/gpm/gpm.service Mon Feb 13 22:06:13 2012
@@ -0,0 +1,13 @@
+[Unit]
+Description=Console Mouse manager
+After=syslog.target
+
+[Service]
+StandardOutput=syslog
+Type=forking
+EnvironmentFile=/etc/sysconfig/mouse
+ExecStart=/usr/sbin/gpm $GPM_OPTIONS
+PIDFile=/var/run/gpm.pid
+
+[Install]
+WantedBy=multi-user.target
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gpm/gpm.init?r1=1.32&r2=1.33&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gpm/gpm.spec?r1=1.175&r2=1.176&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gpm/gpm.sysconfig?r1=1.10&r2=1.11&f=u
More information about the pld-cvs-commit
mailing list