svn commit: r302704 - in head/finance/trytond: . files
Wen Heping
wen at FreeBSD.org
Sat Aug 18 07:18:25 UTC 2012
Author: wen
Date: Sat Aug 18 07:18:24 2012
New Revision: 302704
URL: http://svn.freebsd.org/changeset/ports/302704
Log:
- Add rc script [1]
- Improve Makefile by use PORTVERSION:R
Submitted by: Matthias Petermann <matthias at d2ux.net> (via Email) [1]
Reviewed by: dougb@ [1]
Thanks to: danfe@ [2]
Added:
head/finance/trytond/files/trytond.in (contents, props changed)
Modified:
head/finance/trytond/Makefile
Modified: head/finance/trytond/Makefile
==============================================================================
--- head/finance/trytond/Makefile Sat Aug 18 06:24:20 2012 (r302703)
+++ head/finance/trytond/Makefile Sat Aug 18 07:18:24 2012 (r302704)
@@ -7,8 +7,9 @@
PORTNAME= trytond
PORTVERSION= 2.4.1
+PORTREVISION= 1
CATEGORIES= finance python
-MASTER_SITES= http://downloads2.tryton.org/2.4/
+MASTER_SITES= http://downloads2.tryton.org/${PORTVERSION:R}/
MAINTAINER= wen at FreeBSD.org
COMMENT= A three-tiers high-level general purpose application platform
Added: head/finance/trytond/files/trytond.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/finance/trytond/files/trytond.in Sat Aug 18 07:18:24 2012 (r302704)
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: trytond
+# REQUIRE: postgresql LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable trytond
+#
+#
+# trytond_enable (bool): Set to "NO" by default,
+# Set it to "YES" to enable trytond
+
+. /etc/rc.subr
+
+name=trytond
+rcvar=trytond_enable
+
+load_rc_config $name
+
+trytond_enable="${trytond_enable:-"NO"}"
+trytond_config="${trytond_config:-"%%PREFIX%%/etc/trytond.conf"}"
+trytond_user="${trytond_user:-"trytond"}"
+trytond_logdir="${trytond_logdir:-"$(dirname `grep logfile %%PREFIX%%/etc/trytond.conf | awk -F "=" ' { print $2 } ' `)"}"
+
+command=%%PREFIX%%/bin/trytond
+command_args="--config=${trytond_config} >/dev/null 2>&1 &"
+
+pidfile="${trytond_pidfile:-"$(grep pidfile %%PREFIX%%/etc/trytond.conf | awk -F "=" ' { print $2 } ' |sed 's/[ ]//g' )"}"
+required_files="${trytond_config}"
+
+start_precmd="${name}_prestart"
+
+trytond_prestart ()
+{
+ install -d -o ${trytond_user} $(dirname "${trytond_pidfile}")
+ install -d -o ${trytond_user} ${trytond_logdir}
+}
+
+run_rc_command "$1"
More information about the svn-ports-head
mailing list