[gentoo-commits] gentoo-x86 commit in eclass: ChangeLog s6.eclass

2015-06-03 Thread Brian Evans (grknight)
grknight15/06/03 17:37:46

  Modified: ChangeLog s6.eclass
  Log:
  Fix missing comment character and case syntax error

Revision  ChangesPath
1.1636   eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1636view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1636content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1635r2=1.1636

Index: ChangeLog
===
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1635
retrieving revision 1.1636
diff -u -r1.1635 -r1.1636
--- ChangeLog   2 Jun 2015 21:08:48 -   1.1635
+++ ChangeLog   3 Jun 2015 17:37:46 -   1.1636
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1635 2015/06/02 
21:08:48 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1636 2015/06/03 
17:37:46 grknight Exp $
+
+  03 Jun 2015; grkni...@gentoo.org s6.eclass:
+  Fix missing comment character and case syntax error
 
   02 Jun 2015; William Hubbs willi...@gentoo.org +s6.eclass:
   Add s6.eclass for handling s6 services



1.2  eclass/s6.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/s6.eclass?rev=1.2view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/s6.eclass?rev=1.2content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/s6.eclass?r1=1.1r2=1.2

Index: s6.eclass
===
RCS file: /var/cvsroot/gentoo-x86/eclass/s6.eclass,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- s6.eclass   2 Jun 2015 21:08:48 -   1.1
+++ s6.eclass   3 Jun 2015 17:37:46 -   1.2
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/s6.eclass,v 1.1 2015/06/02 21:08:48 
williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/s6.eclass,v 1.2 2015/06/03 17:37:46 
grknight Exp $
 
 # @ECLASS: s6.eclass
 # @MAINTAINER:
@@ -16,7 +16,7 @@
 # src_install() {
 #  ...
 #  s6_install_service myservice ${FILESDIR}/run-s6 
${FILESDIR}/finish-s6
-   ...
+#  ...
 #  If you want a service to be logged, install the log service as
 #  shown here.
 #  s6_install_service myservice/log ${FILESDIR}/log-run-s6 \
@@ -27,7 +27,7 @@
 
 case ${EAPI:-0} in
5) ;;
-   *) die ${ECLASS}.eclass: API in EAPI ${EAPI} not yet established
+   *) die ${ECLASS}.eclass: API in EAPI ${EAPI} not yet established ;;
 esac
 
 # @FUNCTION: _s6_get_servicedir






[gentoo-commits] gentoo-x86 commit in eclass: ChangeLog s6.eclass

2015-06-02 Thread William Hubbs (williamh)
williamh15/06/02 21:08:48

  Modified: ChangeLog
  Added:s6.eclass
  Log:
  Add s6.eclass to handle s6 services

Revision  ChangesPath
1.1635   eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1635view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1635content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1634r2=1.1635

Index: ChangeLog
===
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1634
retrieving revision 1.1635
diff -u -r1.1634 -r1.1635
--- ChangeLog   31 May 2015 15:51:21 -  1.1634
+++ ChangeLog   2 Jun 2015 21:08:48 -   1.1635
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1634 2015/05/31 
15:51:21 mrueg Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1635 2015/06/02 
21:08:48 williamh Exp $
+
+  02 Jun 2015; William Hubbs willi...@gentoo.org +s6.eclass:
+  Add s6.eclass for handling s6 services
 
   31 May 2015; Manuel RĂ¼ger mr...@gentoo.org kde5.eclass:
   Sync verbosely with kde overlay. Drop fetch restriction for unpublished



1.1  eclass/s6.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/s6.eclass?rev=1.1view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/s6.eclass?rev=1.1content-type=text/plain

Index: s6.eclass
===
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/s6.eclass,v 1.1 2015/06/02 21:08:48 
williamh Exp $

# @ECLASS: s6.eclass
# @MAINTAINER:
# William Hubbs willi...@gentoo.org
# @BLURB: helper functions to install s6 services
# @DESCRIPTION:
# This eclass provides helpers to install s6 services.
# @EXAMPLE:
#
# @CODE
# inherit s6
#
# src_install() {
#   ...
#   s6_install_service myservice ${FILESDIR}/run-s6 
${FILESDIR}/finish-s6
...
#   If you want a service to be logged, install the log service as
#   shown here.
#   s6_install_service myservice/log ${FILESDIR}/log-run-s6 \
#   ${FILESDIR}/log-finish-s6
#   ...
# }
# @CODE

case ${EAPI:-0} in
5) ;;
*) die ${ECLASS}.eclass: API in EAPI ${EAPI} not yet established
esac

# @FUNCTION: _s6_get_servicedir
# @INTERNAL
# @DESCRIPTION:
# Get unprefixed servicedir.
_s6_get_servicedir() {
echo /var/svc.d
}

# @FUNCTION: s6_get_servicedir
# @DESCRIPTION:
# Output the path for the s6 service directory (not including ${D}).
s6_get_servicedir() {
debug-print-function ${FUNCNAME} ${@}

echo ${EPREFIX}$(_s6_get_servicedir)
}

# @FUNCTION: s6_install_service
# @USAGE: servicename run finish
# @DESCRIPTION:
# Install an s6 service.
# servicename is the name of the service.
# run is the run script for the service.
# finish is the optional finish script for the service.
s6_install_service() {
debug-print-function ${FUNCNAME} ${@}

local name=$1
local run=$2
local finish=$3

[[ $name ]] ||
die ${ECLASS}.eclass: you must specify the s6 service name
[[ $run ]] ||
die ${ECLASS}.eclass: you must specify the s6 service run 
script

(
local servicepath=$(_s6_get_servicedir)/$name
exeinto $servicepath
newexe $run run
[[ $finish ]]  newexe $finish finish
)
}

# @FUNCTION: s6_service_down
# @USAGE: servicename
# @DESCRIPTION:
# Install the down flag so this service will not be started by
# default.
# servicename is the name of the service.
s6_service_down() {
debug-print-function ${FUNCNAME} ${@}

local name=$1

[[ $name ]] ||
die ${ECLASS}.eclass: you must specify the s6 service name

(
touch $T/down || die
local servicepath=$(_s6_get_servicedir)/$name
insinto $servicepath
doins $T/down
)
}

# @FUNCTION: s6_service_nosetsid
# @USAGE: servicename
# @DESCRIPTION:
# Install the nosetsid flag so this service will not be made a session
# leader.
# servicename is the name of the service.
s6_service_nosetsid() {
debug-print-function ${FUNCNAME} ${@}

local name=$1

[[ $name ]] ||
die ${ECLASS}.eclass: you must specify the s6 service name

(
touch $T/nosetsid || die
local servicepath=$(_s6_get_servicedir)/$name
insinto $servicepath
doins $T/nosetsid
)
}