diff options
author | André Fabian Silva Delgado <andre@pc-01.localdomain> | 2012-06-10 18:27:19 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <andre@pc-01.localdomain> | 2012-06-10 18:27:19 -0300 |
commit | 144fd0584bef03781a60b0cb04645e922b4c66c3 (patch) | |
tree | 47a3a39ee139d967d513e36d26d49c49cf116b8a | |
parent | 304bc200d77e78c869d97d11b731991a9b7b8c09 (diff) | |
download | abslibre-144fd0584bef03781a60b0cb04645e922b4c66c3.tar.gz abslibre-144fd0584bef03781a60b0cb04645e922b4c66c3.tar.bz2 abslibre-144fd0584bef03781a60b0cb04645e922b4c66c3.zip |
gnuhealth: new package and packages dependencies
-rw-r--r-- | social/gnuhealth/PKGBUILD | 45 | ||||
-rw-r--r-- | social/python-relatorio/PKGBUILD | 21 | ||||
-rw-r--r-- | social/python2-polib/PKGBUILD | 25 | ||||
-rw-r--r-- | social/trytond/PKGBUILD | 30 | ||||
-rw-r--r-- | social/trytond/trytond.install | 20 | ||||
-rw-r--r-- | social/trytond/trytond.rc | 52 |
6 files changed, 193 insertions, 0 deletions
diff --git a/social/gnuhealth/PKGBUILD b/social/gnuhealth/PKGBUILD new file mode 100644 index 000000000..f1da528ff --- /dev/null +++ b/social/gnuhealth/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: SpepS <dreamspepser at yahoo dot it> + +pkgname=gnuhealth +pkgver=1.6.1 +pkgrel=1 +pkgdesc="A free Health and Hospital Information System" +arch=(any) +url="http://health.gnu.org/" +license=('GPL3') +depends=('trytond') +source=("http://ftp.gnu.org/gnu/health/$pkgname-$pkgver.tar.gz") +md5sums=('fef8c811ca6de3fdd6e2430d644e13c9') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # python2 fixes + export PYTHON=python2 + sed -i '/TRYTON_PATH/s/python/&2/' configure + + # makefile fixes + sed -e '/install:/a\\tinstall -d $(DESTDIR)$(tryton_modules)/' \ + -e 's/$(tryton/$(DESTDIR)&/' -i Makefile.in + + # mv man file + mv health/man . + + ./configure --prefix=/usr +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make MANTARGET="$pkgdir/usr/share/man/man1" \ + DESTDIR="$pkgdir/" install + + # man + install -Dm644 man/$pkgname.1 \ + "$pkgdir/usr/share/man/man1/$pkgname.1" + + # python2 fix + sed -i 's/env python/&2/' \ + `grep -rl 'env python' "$pkgdir"` +} + +# vim:set ts=2 sw=2 et: diff --git a/social/python-relatorio/PKGBUILD b/social/python-relatorio/PKGBUILD new file mode 100644 index 000000000..6255eeee5 --- /dev/null +++ b/social/python-relatorio/PKGBUILD @@ -0,0 +1,21 @@ +# Contributor: Florian Walch <florian.walch@gmx.at> +# Maintainer: Thomas Bahn <Thomas-Bahn@gmx.net> +pkgname=python-relatorio +pkgver=0.5.6 +pkgrel=1 +pkgdesc="A templating library able to output odt and pdf files" +arch=('i686' 'x86_64') +url="http://relatorio.openhex.org" +license=('GPL') +depends=('python-genshi>=0.5' 'python-lxml>=1.3.6') +makedepends=('python2-distribute') +source=("http://pypi.python.org/packages/source/r/relatorio/relatorio-$pkgver.tar.gz") + +build() { + cd $srcdir/relatorio-$pkgver + chmod 644 relatorio.egg-info/* + python2 setup.py install --root=$pkgdir +} + + +md5sums=('944fb60fadaff451ab6ee8818de516ad') diff --git a/social/python2-polib/PKGBUILD b/social/python2-polib/PKGBUILD new file mode 100644 index 000000000..fc346ec97 --- /dev/null +++ b/social/python2-polib/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: Esteban V. Carnevale <evcarnevale@gmail.com> + +pkgname=python2-polib +_pkgname='polib' +pkgver=0.7.0 +pkgrel=1 +pkgdesc='A library to manipulate gettext files' +url='http://polib.readthedocs.org/en/latest/index.html' +arch=('any') +license=('MIT') +depends=('python2') + +source=("https://bitbucket.org/izi/polib/downloads/polib-${pkgver}.tar.gz") +md5sums=('958f8f81ade7d2484edc25b3989fe247') + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + python2 setup.py build +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + python2 setup.py install --root="${pkgdir}" --optimize=1 + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} diff --git a/social/trytond/PKGBUILD b/social/trytond/PKGBUILD new file mode 100644 index 000000000..9f8348f06 --- /dev/null +++ b/social/trytond/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Robin Baumgartner <robin@baumgartners.ch> +pkgname=trytond +pkgver=2.4.0 +_pkgdir=2.4 +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' 'python-egenix-mx-base' 'python-relatorio>=0.2.0' 'python-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.rc') +md5sums=('ce0bbb8fcd0ef6a02c575823712e29e4' + '768e68c01cb5913e36ea89c67fc98038' + '3ca6aff9b30a52bcf159be7ca630fb6e') + +build() { + cd $srcdir/$pkgname-$pkgver + python2 setup.py install --root=$pkgdir + install -D -m644 etc/trytond.conf $pkgdir/etc/trytond.conf + install -D -m755 $startdir/trytond.rc $pkgdir/etc/rc.d/trytond +} diff --git a/social/trytond/trytond.install b/social/trytond/trytond.install new file mode 100644 index 000000000..46d6daaba --- /dev/null +++ b/social/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/social/trytond/trytond.rc b/social/trytond/trytond.rc new file mode 100644 index 000000000..a93172a58 --- /dev/null +++ b/social/trytond/trytond.rc @@ -0,0 +1,52 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/bin/python /usr/bin/trytond` +case "$1" in + start) + stat_busy "Starting Tryton server" + # handling log file + if [ ! -e /var/log/trytond/trytond.log ]; then + mkdir -p /var/log/trytond + touch /var/log/trytond/trytond.log + chown -R trytond:trytond /var/log/trytond + fi + # starting the daemon + if [ -z "$PID" ]; then + su - trytond -s /bin/bash -c "/usr/bin/python2 /usr/bin/trytond \ + --logfile=/var/log/trytond/trytond.log &> /dev/null &" + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon trytond + stat_done + fi + else + stat_fail + fi + ;; + stop) + stat_busy "Stopping Tryton server" + if [ ! -z "$PID" ]; then + if [ $? -gt 0 ]; then + stat_fail + else + kill $PID &> /dev/null & + rm_daemon trytond + stat_done + fi + else + stat_fail + fi + ;; + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |