summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Krier <cedk@gentoo.org>2006-10-18 21:27:51 +0000
committerCédric Krier <cedk@gentoo.org>2006-10-18 21:27:51 +0000
commite75db3cb054ca0a71d15f04162a1917423454a07 (patch)
treedc7c031a19eb95805e29374bbdde387637ef910d /app-office
parentdev-python/icepy: Dropping old version as dependency has gone from portage (diff)
downloadsunrise-e75db3cb054ca0a71d15f04162a1917423454a07.tar.gz
sunrise-e75db3cb054ca0a71d15f04162a1917423454a07.tar.bz2
sunrise-e75db3cb054ca0a71d15f04162a1917423454a07.zip
app-office/tinyerp-server: Ebuild for bug 106982 thanks Tommie, lzap, Masse Nicolas, Raimondo Giammanco, Jean Delattre
svn path=/sunrise/; revision=1580
Diffstat (limited to 'app-office')
-rw-r--r--app-office/tinyerp-server/ChangeLog10
-rw-r--r--app-office/tinyerp-server/Manifest24
-rw-r--r--app-office/tinyerp-server/files/digest-tinyerp-server-3.4.23
-rw-r--r--app-office/tinyerp-server/files/tinyerp-conf.d29
-rw-r--r--app-office/tinyerp-server/files/tinyerp-init.d27
-rw-r--r--app-office/tinyerp-server/metadata.xml5
-rw-r--r--app-office/tinyerp-server/tinyerp-server-3.4.2.ebuild83
7 files changed, 181 insertions, 0 deletions
diff --git a/app-office/tinyerp-server/ChangeLog b/app-office/tinyerp-server/ChangeLog
new file mode 100644
index 000000000..bbef5c696
--- /dev/null
+++ b/app-office/tinyerp-server/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for app-office/tinyerp-server
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 18 Oct 2006; Cedric Krier <ced@ced.homedns.org>
+ +tinyerp-server-3.4.2.ebuild, +files/tinyerp-conf.d,
+ +files/tinyerp-init.d, +metadata.xml:
+ Ebuild for bug 106982 thanks Tommie, lzap, Masse Nicolas, Raimondo
+ Giammanco, Jean Delattre
+
diff --git a/app-office/tinyerp-server/Manifest b/app-office/tinyerp-server/Manifest
new file mode 100644
index 000000000..35cf1489d
--- /dev/null
+++ b/app-office/tinyerp-server/Manifest
@@ -0,0 +1,24 @@
+AUX tinyerp-conf.d 756 RMD160 8ee5dc9d4cf643740be2816895d7ff14aa9eaf50 SHA1 4be5eb04ed6182137143fd37e0fbf65df1befbcc SHA256 8db051cddce0feff592402f3761bcb7a249166d73a3fa3afc324d4528fe0d50c
+MD5 fa3c40259b6e3ace849a75e40769fc03 files/tinyerp-conf.d 756
+RMD160 8ee5dc9d4cf643740be2816895d7ff14aa9eaf50 files/tinyerp-conf.d 756
+SHA256 8db051cddce0feff592402f3761bcb7a249166d73a3fa3afc324d4528fe0d50c files/tinyerp-conf.d 756
+AUX tinyerp-init.d 873 RMD160 fae4cc43e66640b8b9fbbd7ab4b6d5dd58a2c45a SHA1 588de8c2e1829abf119ad32fb8625148289e6b3a SHA256 5a86d5ad4fba62753ddcff2419c346767c4c7b3274f772116d8b2c9c8e2b8a71
+MD5 4d4ec90b0bfc109595e6d3cb2687cb67 files/tinyerp-init.d 873
+RMD160 fae4cc43e66640b8b9fbbd7ab4b6d5dd58a2c45a files/tinyerp-init.d 873
+SHA256 5a86d5ad4fba62753ddcff2419c346767c4c7b3274f772116d8b2c9c8e2b8a71 files/tinyerp-init.d 873
+DIST tinyerp-server-3.4.2.tar.gz 1066916 RMD160 4b758920cba092b0f6b48fcebfa362ee16feb393 SHA1 ae32f25c3710c6926761acccfe03002e050cf75a SHA256 3b0ec0e2c651d5b4ea20ec749bf2cce5ed792e97b71e5b2de5a52b3ed5b2db44
+EBUILD tinyerp-server-3.4.2.ebuild 2267 RMD160 6b29275a686e3e2cff62fc29b2c8dc98fbf1143b SHA1 4082c8dd101b1ad2b9535756fce6fd7a0853993b SHA256 582b51e4e9d2cf077cf56de78e6fa06aaec1032b0c9ef9bce2e5f3ec63884606
+MD5 6fd1c84171687f8ce98923dedaf69102 tinyerp-server-3.4.2.ebuild 2267
+RMD160 6b29275a686e3e2cff62fc29b2c8dc98fbf1143b tinyerp-server-3.4.2.ebuild 2267
+SHA256 582b51e4e9d2cf077cf56de78e6fa06aaec1032b0c9ef9bce2e5f3ec63884606 tinyerp-server-3.4.2.ebuild 2267
+MISC ChangeLog 368 RMD160 09b3b50c520b0f6e6ba7f709db6129fb7bad9240 SHA1 8851e916830277cf9529ffc3743a5c93feb88bf9 SHA256 2875bd10614ee134998658b8360d18956a08f4dbe4fa578f0e8c04288f6b66df
+MD5 b6ec39071d9dc874990ac469b208486b ChangeLog 368
+RMD160 09b3b50c520b0f6e6ba7f709db6129fb7bad9240 ChangeLog 368
+SHA256 2875bd10614ee134998658b8360d18956a08f4dbe4fa578f0e8c04288f6b66df ChangeLog 368
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
+MD5 1e678929a9fec6632e227bdf2262e9a1 metadata.xml 170
+RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 metadata.xml 170
+SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 metadata.xml 170
+MD5 c070b33c03e27b390ed7fe3449df4d9d files/digest-tinyerp-server-3.4.2 265
+RMD160 8d558b834f473342484858df1e3f310a678d7ce7 files/digest-tinyerp-server-3.4.2 265
+SHA256 fc3919ea79b561682fdec9f286f3f6278deed93e481bae27a6513baf3d52d320 files/digest-tinyerp-server-3.4.2 265
diff --git a/app-office/tinyerp-server/files/digest-tinyerp-server-3.4.2 b/app-office/tinyerp-server/files/digest-tinyerp-server-3.4.2
new file mode 100644
index 000000000..0b160e6b5
--- /dev/null
+++ b/app-office/tinyerp-server/files/digest-tinyerp-server-3.4.2
@@ -0,0 +1,3 @@
+MD5 f360588ac94887c6fdf13c448c35fdc1 tinyerp-server-3.4.2.tar.gz 1066916
+RMD160 4b758920cba092b0f6b48fcebfa362ee16feb393 tinyerp-server-3.4.2.tar.gz 1066916
+SHA256 3b0ec0e2c651d5b4ea20ec749bf2cce5ed792e97b71e5b2de5a52b3ed5b2db44 tinyerp-server-3.4.2.tar.gz 1066916
diff --git a/app-office/tinyerp-server/files/tinyerp-conf.d b/app-office/tinyerp-server/files/tinyerp-conf.d
new file mode 100644
index 000000000..315b7327d
--- /dev/null
+++ b/app-office/tinyerp-server/files/tinyerp-conf.d
@@ -0,0 +1,29 @@
+# The database name
+# Default is 'terp'
+SERVER_DB=terp
+
+# The user for the database
+# Default is the same as the database name (terp)
+SERVER_USER=${SERVER_DB}
+
+
+# ------------------------------------------------------
+# If you run the database on localhost and
+# have trust set in your pg_hba.conf (the default),
+# you do not need to change anything below.
+# ------------------------------------------------------
+
+# The password for the database user
+# Default is commented out (no password authentication)
+#SERVER_PW=
+
+# The database host to use
+# Default is commented out (localhost)
+#SERVER_HOST=
+
+# The database port number to use
+# Default is commented out (well-known port)
+#SERVER_PORT=
+
+# Additional parameters on the command line
+#SERVER_OPTS=""
diff --git a/app-office/tinyerp-server/files/tinyerp-init.d b/app-office/tinyerp-server/files/tinyerp-init.d
new file mode 100644
index 000000000..7e4e38732
--- /dev/null
+++ b/app-office/tinyerp-server/files/tinyerp-init.d
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+
+depend() {
+ use net logger
+ need postgresql
+}
+
+
+start() {
+ [ -n "${SERVER_DB}" ] && SERVER_OPTS="${SERVER_OPTS} --database=${SERVER_DB}"
+ [ -n "${SERVER_USER}" ] && SERVER_OPTS="${SERVER_OPTS} --db_user=${SERVER_USER}"
+ [ -n "${SERVER_PW}" ] && SERVER_OPTS="${SERVER_OPTS} --db_password=${SERVER_PW}"
+ [ -n "${SERVER_HOST}" ] && SERVER_OPTS="${SERVER_OPTS} --db_host=${SERVER_HOST}"
+ [ -n "${SERVER_PORT}" ] && SERVER_OPTS="${SERVER_OPTS} --db_port=${SERVER_PORT}"
+
+ ebegin "Starting TinyERP"
+ start-stop-daemon --start --quiet --background --chuid terp:terp --pidfile=/var/run/tinyerp/tinyerp.pid --startas /usr/bin/tinyerp-server --exec /usr/bin/python -- ${SERVER_OPTS} --pidfile=/var/run/tinyerp/tinyerp.pid
+ eend $?
+}
+
+
+stop() {
+ ebegin "Stopping TinyERP"
+ start-stop-daemon --stop --quiet --pidfile=/var/run/tinyerp/tinyerp.pid
+ eend $?
+}
+
diff --git a/app-office/tinyerp-server/metadata.xml b/app-office/tinyerp-server/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/app-office/tinyerp-server/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>
diff --git a/app-office/tinyerp-server/tinyerp-server-3.4.2.ebuild b/app-office/tinyerp-server/tinyerp-server-3.4.2.ebuild
new file mode 100644
index 000000000..576a2c0f2
--- /dev/null
+++ b/app-office/tinyerp-server/tinyerp-server-3.4.2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils distutils
+
+DESCRIPTION="Open Source ERP & CRM"
+HOMEPAGE="http://tinyerp.org/"
+SRC_URI="${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+RESTRICT="fetch"
+
+DEPEND=">=dev-db/postgresql-7.4
+ dev-python/pypgsql
+ dev-python/reportlab
+ dev-python/pyparsing
+ media-gfx/pydot
+ =dev-python/psycopg-1*
+ dev-libs/libxml2
+ dev-libs/libxslt"
+RDEPEND=${DEPEND}
+
+TINYERP_USER=terp
+TINYERP_GROUP=terp
+TINYERP_DATABASE=terp
+
+DOWNLOAD_URL="http://tinyerp.com/component/option,com_vfm/Itemid,61/do,download/file,stable|source|${P}.tar.gz/"
+pkg_nofetch() {
+ einfo "Please donwload ${SRC_URI} from:"
+ einfo ${DOWNLOAD_URL}
+ einfo "and move it to ${DISTDIR}"
+}
+
+pkg_setup() {
+ if ! built_with_use dev-libs/libxslt python ; then
+ eerror "dev-libs/libxslt must be built with python"
+ die "${PN} requires dev-libs/libxslt with USE=python"
+ fi
+}
+
+src_install() {
+ distutils_src_install
+
+ newinitd "${FILESDIR}"/tinyerp-init.d tinyerp
+ newconfd "${FILESDIR}"/tinyerp-conf.d tinyerp
+
+ dodir /var/run/tinyerp
+ fowners ${TINYERP_USER} ${TINYERP_GROUP} /var/run/tinyerp
+}
+
+pkg_postinst() {
+ enewgroup ${TINYERP_GROUP}
+ enewuser ${TINYERP_USER} -1 -1 -1 ${TINYERP_GROUP}
+
+ einfo "In order to setup the initial database, run:"
+ einfo " emerge --config =${CATEGORY}/${PF}"
+ einfo "Be sure the database is started before"
+}
+
+pquery() {
+ psql -q -At -U postgres -d template1 -c "$@"
+}
+
+pkg_config() {
+ einfo "In the following, the 'postgres' user will be used."
+ if ! pquery "SELECT usename FROM pg_user WHERE usename = '${TINYERP_USER}'" | grep -q ${TINYERP_USER}; then
+ ebegin "Creating database user ${TINYERP_USER}"
+ createuser --quiet --username=postgres --no-createdb --no-adduser --no-createrole ${TINYERP_USER}
+ eend $? || die "Failed to create database user"
+ fi
+
+ if ! pquery "SELECT datname FROM pg_database WHERE datname = '${TINYERP_DATABASE}'" |grep -q terp; then
+ ebegin "Creating database ${TINYERP_DATABASE}"
+ createdb --quiet --username=postgres --owner=terp --encoding=UNICODE ${TINYERP_DATABASE}
+ eend $? || die "Failed to create database"
+ fi
+
+ einfo "The first time tinyerp-server is run it will initialize the database"
+}