summaryrefslogtreecommitdiff
path: root/pcr/trytond
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/trytond')
-rw-r--r--pcr/trytond/PKGBUILD31
-rw-r--r--pcr/trytond/trytond.install20
-rw-r--r--pcr/trytond/trytond.service10
3 files changed, 61 insertions, 0 deletions
diff --git a/pcr/trytond/PKGBUILD b/pcr/trytond/PKGBUILD
new file mode 100644
index 000000000..b270df368
--- /dev/null
+++ b/pcr/trytond/PKGBUILD
@@ -0,0 +1,31 @@
+# Contributor: Florian Walch <florian.walch@gmx.at>
+# Maintainer: Robin Baumgartner <robin@baumgartners.ch>
+pkgname=trytond
+pkgver=2.6.3
+_pkgdir=2.6
+pkgrel=1
+pkgdesc="A three-tiers high-level general purpose application platform (server application)"
+arch=('any')
+url="http://www.tryton.org/"
+license=('GPL3')
+depends=('python2>=2.4' 'python-lxml' 'python2-egenix-mx-base' 'python2-relatorio>=0.2.0' 'python2-genshi>=0.5' 'python2-polib')
+optdepends=('python-psycopg2: support for PostgreSQL database'
+ 'python-pywebdav: support for WebDAV feature'
+ 'pydot: support for displaying workflow graphs'
+ 'python-pytz: timezone support'
+ 'pyopenssl: support for SSL connection')
+makedepends=('python2-distribute')
+install="trytond.install"
+source=("http://downloads.tryton.org/$_pkgdir/$pkgname-$pkgver.tar.gz"
+ 'trytond.install'
+ 'trytond.service')
+md5sums=('0dd81769fc18fe2d20e83de4f17cb10d'
+ '768e68c01cb5913e36ea89c67fc98038'
+ 'b1535a8528dfd8f655624bf6faea6985')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ python2 setup.py install --root=$pkgdir
+ install -D -m644 etc/trytond.conf $pkgdir/etc/trytond.conf
+ install -D -m755 $srcdir/trytond.service $pkgdir/usr/lib/systemd/system/trytond.service
+}
diff --git a/pcr/trytond/trytond.install b/pcr/trytond/trytond.install
new file mode 100644
index 000000000..46d6daaba
--- /dev/null
+++ b/pcr/trytond/trytond.install
@@ -0,0 +1,20 @@
+post_install() {
+ echo
+ echo "Adding tryton group... "
+ groupadd tryton
+ echo
+ echo "Adding tryton user... "
+ useradd -c "Tryton Server Daemon" -g tryton -s /bin/false tryton
+
+ echo "Note:"
+ echo "==> Please don't forget to configure your PostgreSQL database for the program."
+}
+
+post_remove() {
+ echo "Removing tryton system user... "
+ userdel tryton && echo "trytond [done]"
+}
+
+op=$1
+shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
diff --git a/pcr/trytond/trytond.service b/pcr/trytond/trytond.service
new file mode 100644
index 000000000..7d85691b3
--- /dev/null
+++ b/pcr/trytond/trytond.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Tryton Server Daemon
+
+[Service]
+Type=simple
+User=tryton
+ExecStart=/usr/bin/trytond
+
+[Install]
+WantedBy=multi-user.target