[packages/gpm] Drop all Upstart hacks

jajcus jajcus at pld-linux.org
Thu Apr 23 09:07:48 CEST 2015


commit 25b2bb76570f7be2e2063e67a20f1b616487f856
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Thu Apr 23 09:04:30 2015 +0200

    Drop all Upstart hacks

 gpm.init    |  2 --
 gpm.spec    | 35 ++++-------------------------------
 gpm.upstart | 50 --------------------------------------------------
 3 files changed, 4 insertions(+), 83 deletions(-)
---
diff --git a/gpm.spec b/gpm.spec
index a282c60..1d824bc 100644
--- a/gpm.spec
+++ b/gpm.spec
@@ -17,7 +17,7 @@ Summary(tr.UTF-8):	Genel amaçlı fare desteği
 Summary(uk.UTF-8):	Сервер роботи з мишою для консолі Linux
 Name:		gpm
 Version:	1.20.6
-Release:	17
+Release:	18
 Epoch:		1
 License:	GPL v2+
 Group:		Daemons
@@ -26,8 +26,7 @@ Source0:	http://linux.schottelius.org/gpm/archives/%{name}-%{version}.tar.bz2
 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
-Source5:	%{name}.service
+Source4:	%{name}.service
 # Source3-md5:	893cf1468604523c6e9f9257a5671688
 Patch0:		%{name}-info.patch
 Patch1:		%{name}-DESTDIR.patch
@@ -230,19 +229,6 @@ Emacs mode files for GPM.
 %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} = %{epoch}:%{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
@@ -269,7 +255,7 @@ sed -i -e 's#/usr##' doc/manpager
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,init},%{systemdunitdir}}
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{systemdunitdir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
@@ -279,8 +265,7 @@ install -p src/prog/mouse-test src/prog/hltest $RPM_BUILD_ROOT%{_sbindir}
 
 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
+cp -a %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/gpm.service
 
 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.gpm-non-english-man-pages
@@ -356,12 +341,6 @@ fi
 %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
@@ -407,9 +386,3 @@ fi
 %files emacs
 %defattr(644,root,root,755)
 %{_datadir}/emacs/site-lisp/*.el*
-
-%if "%{pld_release}" == "th"
-%files upstart
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /etc/init/gpm.conf
-%endif
diff --git a/gpm.init b/gpm.init
index c868645..73f9a88 100644
--- a/gpm.init
+++ b/gpm.init
@@ -22,8 +22,6 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
-upstart_controlled
-
 # Get service config
 [ -f /etc/sysconfig/mouse ] && . /etc/sysconfig/mouse
 
diff --git a/gpm.upstart b/gpm.upstart
deleted file mode 100644
index 6200e98..0000000
--- a/gpm.upstart
+++ /dev/null
@@ -1,50 +0,0 @@
-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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gpm.git/commitdiff/25b2bb76570f7be2e2063e67a20f1b616487f856



More information about the pld-cvs-commit mailing list