packages: gpm/gpm.init, gpm/gpm.spec, gpm/gpm.upstart (NEW) - add upstart
glen
glen at pld-linux.org
Fri Sep 2 08:28:28 CEST 2011
Author: glen Date: Fri Sep 2 06:28:28 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- add upstart
---- Files affected:
packages/gpm:
gpm.init (1.29 -> 1.30) , gpm.spec (1.167 -> 1.168) , gpm.upstart (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/gpm/gpm.init
diff -u packages/gpm/gpm.init:1.29 packages/gpm/gpm.init:1.30
--- packages/gpm/gpm.init:1.29 Sun Jul 20 19:31:35 2008
+++ packages/gpm/gpm.init Fri Sep 2 08:28:23 2011
@@ -22,6 +22,8 @@
# Source function library
. /etc/rc.d/init.d/functions
+upstart_controlled
+
# Get service config
[ -f /etc/sysconfig/mouse ] && . /etc/sysconfig/mouse
================================================================
Index: packages/gpm/gpm.spec
diff -u packages/gpm/gpm.spec:1.167 packages/gpm/gpm.spec:1.168
--- packages/gpm/gpm.spec:1.167 Wed Aug 31 20:31:05 2011
+++ packages/gpm/gpm.spec Fri Sep 2 08:28:23 2011
@@ -15,7 +15,7 @@
Summary(uk.UTF-8): Сервер роботи з мишою для консолі Linux
Name: gpm
Version: 1.20.6
-Release: 5
+Release: 6
Epoch: 1
License: GPL v2+
Group: Daemons
@@ -24,6 +24,7 @@
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
+Source4: %{name}.upstart
# Source3-md5: 893cf1468604523c6e9f9257a5671688
Patch0: %{name}-info.patch
Patch1: %{name}-DESTDIR.patch
@@ -245,7 +246,7 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,init}}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -255,6 +256,7 @@
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
bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
@@ -290,6 +292,7 @@
%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
%attr(755,root,root) %{_bindir}/display-buttons
%attr(755,root,root) %{_bindir}/display-coords
@@ -335,6 +338,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.168 2011/09/02 06:28:23 glen
+- add upstart
+
Revision 1.167 2011/08/31 18:31:05 arekm
- release 5
================================================================
Index: packages/gpm/gpm.upstart
diff -u /dev/null packages/gpm/gpm.upstart:1.1
--- /dev/null Fri Sep 2 08:28:28 2011
+++ packages/gpm/gpm.upstart Fri Sep 2 08:28:23 2011
@@ -0,0 +1,50 @@
+description "GPM adds mouse to console"
+
+start on pld.sysinit-done
+stop on pld.shutdown-started
+
+console output
+respawn
+expect fork
+
+pre-start script
+ # config is required
+ [ -f /etc/sysconfig/mouse ]
+end script
+
+script
+ . /etc/sysconfig/mouse
+
+ nls() {
+ . /etc/rc.d/init.d/functions
+ nls "$@"
+ exit 1
+ }
+
+ [ -z "$DEVICE" ] && nls "Please set %s in /etc/sysconfig/mouse" "DEVICE"
+ [ -z "$MOUSETYPE" ] && nls "Please set %s in /etc/sysconfig/mouse" "MOUSETYPE"
+
+ OPTIONS=""
+ [ -n "$DEVICE" ] && OPTIONS="-m $DEVICE"
+ [ -n "$MOUSETYPE" ] && OPTIONS="$OPTIONS -t $MOUSETYPE"
+ [ -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
+
+ exec /usr/sbin/gpm $OPTIONS $GPM_OPTIONS < /dev/null
+end script
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gpm/gpm.init?r1=1.29&r2=1.30&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gpm/gpm.spec?r1=1.167&r2=1.168&f=u
More information about the pld-cvs-commit
mailing list