wok-undigest view openerp-server/receipt @ rev 899
Add duplicity
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jan 02 09:11:17 2013 +0100 (2013-01-02) |
parents | f4ea6ede4036 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="openerp-server"
4 VERSION="6.1-1"
5 CATEGORY="office"
6 SHORT_DESC="Open source ERP server & web server files."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 SOURCE="openerp"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 WEB_SITE="http://openerp.com/"
11 WGET_URL="http://nightly.openerp.com/${VERSION%[-r]*}/releases/$TARBALL"
13 DEPENDS="python python-simplejson psycopg2 python-lxml python-pyyaml \
14 python-reportlab python-mako python-markupsafe python-pychart \
15 python-pil python-werkzeug python-dateutil python-babel postgresql \
16 python-ldap ghostscript feedparser matplotlib \
17 python-pydot python-pygraphviz python-pyparsing python-pytz \
18 python-gdata python-openid python-vatnumber python-webdav \
19 python-vobject python-zsi python-xlwt libxslt-python pyopenssl \
20 python-mysql python-caldav"
21 BUILD_DEPENDS="slitaz-toolchain python python-dev rsync setuptools \
22 python-babel"
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 mv $SOURCE-$VERSION-* $src 2> /dev/null
28 cd $src
29 python setup.py install --root=$DESTDIR
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/var/run/openerp $fs/var/log/openerp
36 mkdir -p $fs/etc/logrotate.d $fs/etc/openerp
37 mkdir -p $fs/usr/share/applications
38 chmod 777 $fs/var/run/openerp $fs/var/log/openerp
39 cp -a $_pkg/usr/lib $_pkg/usr/bin $fs/usr
40 cp -a $_pkg/usr/openerp $fs/usr/lib/python*/site-packages
41 cp $src/install/openerp-server.logrotate $fs/etc/logrotate.d
42 cp $src/install/openerp-server.conf $fs/etc/openerp
43 cp -a stuff/* $fs
44 }
46 # Pre and post install commands for Tazpkg.
47 post_install()
48 {
49 chroot $1/ adduser -H -D -S -s /bin/sh -h /tmp -g "OpenERP Daemon user" openerp
50 chown openerp:openerp $1/etc/openerp/openerp-server.conf
51 chmod 0640 $1/etc/openerp/openerp-server.conf
52 touch $1/var/log/openerp-server.log
53 chown -R openerp $1/var/log/openerp
54 chmod 0640 $1/var/log/openerp-server.log
55 mkdir -p $1/var/lib/openerp/filestore
56 chown openerp -R $1/var/lib/openerp
57 if [ -z "$1" ]; then
58 /etc/init.d/postgresql stop
59 /etc/init.d/postgresql start
60 /etc/init.d/openerp-server start
61 fi
62 cat <<EOF
63 ----
64 To start $SOURCE server you can run :
66 /etc/init.d/openerp-server start
68 Or add $SOURCE to RUN_DAEMONS in /etc/rcS.conf
69 ----
70 EOF
71 }