wok-undigest rev 649
add openerp-server
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 23 17:59:34 2012 +0100 (2012-02-23) |
parents | 75995ce16f21 |
children | f4ea6ede4036 |
files | openerp-server/receipt openerp-server/stuff/etc/init.d/openerp-server openerp-server/stuff/etc/pgsql.d/openerp openerp-server/stuff/usr/share/applications/openerp.desktop |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/openerp-server/receipt Thu Feb 23 17:59:34 2012 +0100 1.3 @@ -0,0 +1,71 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="openerp-server" 1.7 +VERSION="6.1-1" 1.8 +CATEGORY="office" 1.9 +SHORT_DESC="Open source ERP server & web server files." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +SOURCE="openerp" 1.12 +TARBALL="$SOURCE-$VERSION.tar.gz" 1.13 +WEB_SITE="http://openerp.com/" 1.14 +WGET_URL="http://nightly.openerp.com/${VERSION%[-r]*}/release/$TARBALL" 1.15 + 1.16 +DEPENDS="python python-simplejson psycopg2 python-lxml python-pyyaml \ 1.17 +python-reportlab python-mako python-markupsafe python-pychart \ 1.18 +python-pil python-werkzeug python-dateutil python-babel postgresql \ 1.19 +python-ldap ghostscript feedparser matplotlib \ 1.20 +python-pydot python-pygraphviz python-pyparsing python-pytz \ 1.21 +python-gdata python-openid python-vatnumber python-webdav \ 1.22 +python-vobject python-zsi python-xlwt libxslt-python pyopenssl \ 1.23 +python27-mysql python27-caldav" 1.24 +BUILD_DEPENDS="slitaz-toolchain python python-dev rsync setuptools \ 1.25 +python-babel" 1.26 + 1.27 +# Rules to configure and make the package. 1.28 +compile_rules() 1.29 +{ 1.30 + mv $SOURCE-$VERSION-* $src 2> /dev/null 1.31 + cd $src 1.32 + python setup.py install --root=$DESTDIR 1.33 +} 1.34 + 1.35 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.36 +genpkg_rules() 1.37 +{ 1.38 + mkdir -p $fs/var/run/openerp $fs/var/log/openerp 1.39 + mkdir -p $fs/etc/logrotate.d $fs/etc/openerp 1.40 + mkdir -p $fs/usr/share/applications 1.41 + chmod 777 $fs/var/run/openerp $fs/var/log/openerp 1.42 + cp -a $_pkg/usr/lib $_pkg/usr/bin $fs/usr 1.43 + cp -a $_pkg/usr/openerp $fs/usr/lib/python*/site-packages 1.44 + cp $src/install/openerp-server.logrotate $fs/etc/logrotate.d 1.45 + cp $src/install/openerp-server.conf $fs/etc/openerp 1.46 + cp -a stuff/* $fs 1.47 +} 1.48 + 1.49 +# Pre and post install commands for Tazpkg. 1.50 +post_install() 1.51 +{ 1.52 + chroot $1/ adduser -H -D -S -s /bin/sh -h /tmp -g "OpenERP Daemon user" openerp 1.53 + chown openerp:openerp $1/etc/openerp/openerp-server.conf 1.54 + chmod 0640 $1/etc/openerp/openerp-server.conf 1.55 + touch $1/var/log/openerp-server.log 1.56 + chown -R openerp $1/var/log/openerp 1.57 + chmod 0640 $1/var/log/openerp-server.log 1.58 + mkdir -p $1/var/lib/openerp/filestore 1.59 + chown openerp -R $1/var/lib/openerp 1.60 + if [ -z "$1" ]; then 1.61 + /etc/init.d/postgresql stop 1.62 + /etc/init.d/postgresql start 1.63 + /etc/init.d/openerp-server start 1.64 + fi 1.65 + cat <<EOF 1.66 +---- 1.67 +To start $SOURCE server you can run : 1.68 + 1.69 + /etc/init.d/openerp-server start 1.70 + 1.71 +Or add $SOURCE to RUN_DAEMONS in /etc/rcS.conf 1.72 +---- 1.73 +EOF 1.74 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/openerp-server/stuff/etc/init.d/openerp-server Thu Feb 23 17:59:34 2012 +0100 2.3 @@ -0,0 +1,71 @@ 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.conf 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/openerp/addons/base/i18n/$LANG.po ] || LANG=${LANG%_*} 2.26 + [ -f /usr/openerp/addons/base/i18n/$LANG.po ] && 2.27 + OPTIONS="$OPTIONS -l $LANG" 2.28 +fi 2.29 + 2.30 +case "$1" in 2.31 + start) 2.32 + if active_pidfile $PIDFILE openerp-server ; then 2.33 + echo "$NAME already running (PID: `cat $PIDFILE`)." 2.34 + exit 1 2.35 + fi 2.36 + echo -n "Starting $DESC: $NAME... " 2.37 + su -c "$DAEMON $OPTIONS" openerp & 2.38 + status 2.39 + sleep 4 2.40 + # At boot OpenERP dont start correctly if we start it in background. 2.41 + if ! active_pidfile $PIDFILE openerp-server ; then 2.42 + sleep 6 2.43 + su -c "$DAEMON $OPTIONS" openerp > $LOGFILE 2.44 + fi ;; 2.45 + stop) 2.46 + if ! active_pidfile $PIDFILE openerp-server ; then 2.47 + echo "$NAME is not running." 2.48 + exit 1 2.49 + fi 2.50 + echo -n "Stopping $DESC: $NAME... " 2.51 + kill `cat $PIDFILE` 2.52 + rm -f $PIDFILE 2.53 + status 2.54 + sleep 2 ;; 2.55 + restart) 2.56 + if ! active_pidfile $PIDFILE openerp-server ; then 2.57 + echo "$NAME is not running." 2.58 + exit 1 2.59 + fi 2.60 + echo -n "Restarting $DESC: $NAME... " 2.61 + kill `cat $PIDFILE` 2.62 + rm -f $PIDFILE 2> /dev/null 2.63 + sleep 2 2.64 + su -c "$DAEMON $OPTIONS" openerp & 2.65 + status 2.66 + sleep 2 ;; 2.67 + *) 2.68 + echo "" 2.69 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 2.70 + echo "" 2.71 + exit 1 ;; 2.72 +esac 2.73 + 2.74 +exit 0
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/openerp-server/stuff/etc/pgsql.d/openerp Thu Feb 23 17:59:34 2012 +0100 3.3 @@ -0,0 +1,4 @@ 3.4 +#!/bin/sh 3.5 + 3.6 +su - postgres -c "createuser -s openerp" 2> /dev/null || true 3.7 +chmod -x /etc/pgsql.d/openerp
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/openerp-server/stuff/usr/share/applications/openerp.desktop Thu Feb 23 17:59:34 2012 +0100 4.3 @@ -0,0 +1,7 @@ 4.4 +[Desktop Entry] 4.5 +Encoding=UTF-8 4.6 +Name=OpenERP Web Client 4.7 +Icon=openerp 4.8 +Exec=browser http://localhost:8069/ 4.9 +Type=Application 4.10 +Categories=Office;