wok-current rev 3365
Add OpenERP server
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Jun 11 23:24:27 2009 +0200 (2009-06-11) |
parents | 39784a334c7c |
children | e07655bdf85b |
files | openerp-server/receipt openerp-server/stuff/etc/init.d/openerp-server openerp-server/stuff/etc/openerp/openerp-server.cfg |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/openerp-server/receipt Thu Jun 11 23:24:27 2009 +0200 1.3 @@ -0,0 +1,49 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="openerp-server" 1.7 +VERSION="5.0.1-0" 1.8 +CATEGORY="office" 1.9 +SHORT_DESC="Open source ERP server files." 1.10 +MAINTAINER="pankso@slitaz.org" 1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.12 +WEB_SITE="http://openerp.com/" 1.13 +WGET_URL="$WEB_SITE/download/stable/source/$TARBALL" 1.14 +DEPENDS="python postgresql libxml2-python libxslt psycopg2 reportlab \ 1.15 +pyparsing graphviz libgcrypt pil python-lxml matplotlib pyxml pychart \ 1.16 +pydot egenix-mx-base" 1.17 +BUILD_DEPENDS="libxml2-python psycopg2 libxml2 libxslt reportlab pychart \ 1.18 +pydot python-dev" 1.19 + 1.20 +# Rules to configure and make the package. 1.21 +compile_rules() 1.22 +{ 1.23 + cd $src 1.24 + python setup.py install --root=$PWD/_pkg 1.25 +} 1.26 + 1.27 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.28 +genpkg_rules() 1.29 +{ 1.30 + mkdir -p $fs/usr $fs/var/run/openerp $fs/var/log/openerp 1.31 + chmod 777 $fs/var/run/openerp $fs/var/log/openerp 1.32 + cp -a $_pkg/usr/bin $fs/usr 1.33 + cp -a $_pkg/usr/lib $fs/usr 1.34 + cp -a stuff/* $fs 1.35 + sed -i 's|cd .*_pkg|cd |' $fs/usr/bin/openerp-server 1.36 +} 1.37 + 1.38 +# Pre and post install commands for Tazpkg. 1.39 +post_install() 1.40 +{ 1.41 + #chroot $1/ adduser -H -D -S -s /bin/false -h /dev/null -g "OpenERP Daemon user" openerp 1.42 + [ -z "$1" ] && /etc/init.d/$PACKAGE start 1.43 + cat <<EOF 1.44 +---- 1.45 +To start $PACKAGE server you can run : 1.46 + 1.47 + /etc/init.d/$PACKAGE start 1.48 + 1.49 +Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf 1.50 +---- 1.51 +EOF 1.52 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/openerp-server/stuff/etc/init.d/openerp-server Thu Jun 11 23:24:27 2009 +0200 2.3 @@ -0,0 +1,70 @@ 2.4 +#!/bin/sh 2.5 +# /etc/init.d/openerp-server : Start, stop and restart OpenERP server on SliTaz, at 2.6 +# boot time or with the command line. 2.7 +# 2.8 +# To start OpenERP server at boot time, just put openerp-server in the $RUN_DAEMONS 2.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf 2.10 +# 2.11 +. /etc/init.d/rc.functions 2.12 +. /etc/daemons.conf 2.13 + 2.14 +NAME=OpenERP 2.15 +DESC="OpenERP server" 2.16 +DAEMON=/usr/bin/openerp-server 2.17 +OPTIONS=$OPENERP_OPTIONS 2.18 +PIDFILE=/var/run/openerp/openerp-server.pid 2.19 +LOGFILE=/var/log/openerp/openerp-server.log 2.20 +CONFIGFILE=/etc/openerp/openerp-server.cfg 2.21 + 2.22 +if [ -z "$OPTIONS" ]; then 2.23 + OPTIONS="--pidfile=$PIDFILE --logfile=$LOGFILE -c $CONFIGFILE" 2.24 + LANG=$(. /etc/locale.conf; echo $LANG) 2.25 + [ -f /usr/lib/python*/site-packages/tinyerp-server/i18n/$LANG.csv ] && \ 2.26 + OPTIONS="$OPTIONS -l $LANG" 2.27 +fi 2.28 + 2.29 +case "$1" in 2.30 + start) 2.31 + if [ -f "$PIDFILE" ]; then 2.32 + echo "$NAME already running (PID: `cat $PIDFILE`)." 2.33 + exit 1 2.34 + fi 2.35 + echo -n "Starting $DESC: $NAME... " 2.36 + $DAEMON $OPTIONS & 2.37 + status 2.38 + sleep 4 2.39 + # At boot OpenERP dont start correctly if we start it in background. 2.40 + if [ ! -f "$PIDFILE" ]; then 2.41 + sleep 6 2.42 + $DAEMON $OPTIONS > $LOGFILE 2.43 + fi ;; 2.44 + stop) 2.45 + if [ ! -f "$PIDFILE" ]; then 2.46 + echo "$NAME is not running." 2.47 + exit 1 2.48 + fi 2.49 + echo -n "Stopping $DESC: $NAME... " 2.50 + kill `cat $PIDFILE` 2.51 + rm -f $PIDFILE 2.52 + status 2.53 + sleep 2 ;; 2.54 + restart) 2.55 + if ! active_pidfile $PIDFILE python ; then 2.56 + echo "$NAME is not running." 2.57 + exit 1 2.58 + fi 2.59 + echo -n "Restarting $DESC: $NAME... " 2.60 + kill `cat $PIDFILE` 2.61 + rm -f $PIDFILE 2> /dev/null 2.62 + sleep 2 2.63 + $DAEMON $OPTIONS & 2.64 + status 2.65 + sleep 2 ;; 2.66 + *) 2.67 + echo "" 2.68 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 2.69 + echo "" 2.70 + exit 1 ;; 2.71 +esac 2.72 + 2.73 +exit 0
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/openerp-server/stuff/etc/openerp/openerp-server.cfg Thu Jun 11 23:24:27 2009 +0200 3.3 @@ -0,0 +1,18 @@ 3.4 +[options] 3.5 +without_demo = False 3.6 +upgrade = False 3.7 +verbose = False 3.8 +xmlrpc = True 3.9 +stop_after_init = False 3.10 +root_path = /usr/lib/python2.5/site-packages/openerp-server 3.11 +addons_path = /usr/lib/python2.5/site-packages/openerp-server/addons 3.12 +soap = False 3.13 +translate_modules = ['all'] 3.14 +netrpc = True 3.15 +demo = {} 3.16 +interface = 3.17 +db_user = postgres 3.18 +db_password = False 3.19 +db_host = False 3.20 +db_port = False 3.21 +reportgz = False