--- /dev/null
+# ChangeLog for app-office/tinyerp-server
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-office/tinyerp-server/ChangeLog,v 1.1 2006/12/06 21:43:23 cedk Exp $
+
+*tinyerp-server-4.0.0 (06 Dec 2006)
+
+ 06 Dec 2006; Cedric Krier <cedk@gentoo.org>
+ +files/tinyerp-server-4.0.0-setup.patch, +files/tinyerp-conf.d,
+ +files/tinyerp-init.d, +metadata.xml, +tinyerp-server-4.0.0.ebuild:
+ New ebuild for bug #106982 thanks to Tommie, lzap, Masse Nicolas,
+ Raimondo Giammanco, Jean Delattre
+
--- /dev/null
+AUX tinyerp-conf.d 737 RMD160 fd8104a61a071cba679882fa5a96842716245909 SHA1 efbf304fc259cb7d04f308fcfc88c0fb41586572 SHA256 f683d85b5ec1b85d48cdbfbc89484a6236cc0084ca833c4bf2f349ee7a866b65
+MD5 4fc48955ad294ad4a0d32b4269457cfd files/tinyerp-conf.d 737
+RMD160 fd8104a61a071cba679882fa5a96842716245909 files/tinyerp-conf.d 737
+SHA256 f683d85b5ec1b85d48cdbfbc89484a6236cc0084ca833c4bf2f349ee7a866b65 files/tinyerp-conf.d 737
+AUX tinyerp-init.d 913 RMD160 2487a20770869abc35d0b2f5e2905434f83e051b SHA1 fcc663639bddc3de25a775f50c2d2d2a3c5fe745 SHA256 13b26fa788fbb0c0cedb9e5e53d49e0741654270f953958275c87167d698c42f
+MD5 81199ace2e5813250d9c800d7a5f9c17 files/tinyerp-init.d 913
+RMD160 2487a20770869abc35d0b2f5e2905434f83e051b files/tinyerp-init.d 913
+SHA256 13b26fa788fbb0c0cedb9e5e53d49e0741654270f953958275c87167d698c42f files/tinyerp-init.d 913
+AUX tinyerp-server-4.0.0-setup.patch 816 RMD160 4e68502570823e167d59f3026754eda26d02aacd SHA1 d57c73c484173c551f22b92b032325479fdc9fc4 SHA256 c457f9353bd59dbd0109faef4f4069a14f91f0862b10914bd8c94c2f8c9afbd6
+MD5 5c3774fd905acc54d1bff263e5faaaf9 files/tinyerp-server-4.0.0-setup.patch 816
+RMD160 4e68502570823e167d59f3026754eda26d02aacd files/tinyerp-server-4.0.0-setup.patch 816
+SHA256 c457f9353bd59dbd0109faef4f4069a14f91f0862b10914bd8c94c2f8c9afbd6 files/tinyerp-server-4.0.0-setup.patch 816
+DIST tinyerp-server-4.0.0.tar.gz 2984163 RMD160 caab72f15577b49acdae45da9e37f68994ae3694 SHA1 187aa1c98d1da84f836ac4a90c053615b574c4ce SHA256 a742072c718f741914c607e717dbcb1c9c82a478f5d54cf23c3b454f21b22f0f
+EBUILD tinyerp-server-4.0.0.ebuild 1818 RMD160 f372462db97be35f466045a4ea097cbb8b7a37d4 SHA1 4e031834429312941dd151f04be2577670d500d8 SHA256 afaa133b7187f3f1c989410efbcc338326c18231d38e67ea32f11e8757197ae6
+MD5 3fb0e9f3aa625a10c15b4b921fc74dd2 tinyerp-server-4.0.0.ebuild 1818
+RMD160 f372462db97be35f466045a4ea097cbb8b7a37d4 tinyerp-server-4.0.0.ebuild 1818
+SHA256 afaa133b7187f3f1c989410efbcc338326c18231d38e67ea32f11e8757197ae6 tinyerp-server-4.0.0.ebuild 1818
+MISC ChangeLog 450 RMD160 ff1507d0534a0129e45441eeadee1054e854f178 SHA1 06714754bec13fd9f0f44ad8ca381d65397ac624 SHA256 f14df669d83a071910b2ce8245f8dd4a2001088eff3567ecbb9dd4b471c4ca8b
+MD5 8431682ffd057ad56dbd2039edee6fae ChangeLog 450
+RMD160 ff1507d0534a0129e45441eeadee1054e854f178 ChangeLog 450
+SHA256 f14df669d83a071910b2ce8245f8dd4a2001088eff3567ecbb9dd4b471c4ca8b ChangeLog 450
+MISC metadata.xml 284 RMD160 ac769fb0d742e57e331042699926a209194189c6 SHA1 adf5999b09847fd8a7b82aa1b8d0f78296b676a5 SHA256 fcb9a8a44ce9ce002637c2e430ae9f6ee90468eed6aad3b6306c200f1dc233b8
+MD5 7b5e8018fb81b89379122a48a5620125 metadata.xml 284
+RMD160 ac769fb0d742e57e331042699926a209194189c6 metadata.xml 284
+SHA256 fcb9a8a44ce9ce002637c2e430ae9f6ee90468eed6aad3b6306c200f1dc233b8 metadata.xml 284
+MD5 a8efd53b6b577e43231bb406362ebd2c files/digest-tinyerp-server-4.0.0 265
+RMD160 dfb6dd371a241d5cc8e935c6ce4e21d106574465 files/digest-tinyerp-server-4.0.0 265
+SHA256 223ac30b0227a25f5c01281917912013650421523acb381754ceb98c6fed400d files/digest-tinyerp-server-4.0.0 265
--- /dev/null
+MD5 6eb0f0c0b221eab431c507a6d461b4e5 tinyerp-server-4.0.0.tar.gz 2984163
+RMD160 caab72f15577b49acdae45da9e37f68994ae3694 tinyerp-server-4.0.0.tar.gz 2984163
+SHA256 a742072c718f741914c607e717dbcb1c9c82a478f5d54cf23c3b454f21b22f0f tinyerp-server-4.0.0.tar.gz 2984163
--- /dev/null
+# The database name
+#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=""
--- /dev/null
+#!/sbin/runscript
+
+depend() {
+ use net logger
+ after 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 --logfile=/var/log/tinyerp/tinyerp.log
+ eend $?
+}
+
+
+stop() {
+ ebegin "Stopping TinyERP"
+ start-stop-daemon --stop --quiet --pidfile=/var/run/tinyerp/tinyerp.pid
+ eend $?
+}
+
--- /dev/null
+diff -ru tinyerp-server-4.0.0~/setup.py tinyerp-server-4.0.0/setup.py
+--- tinyerp-server-4.0.0~/setup.py 2006-12-06 19:57:57.000000000 +0100
++++ tinyerp-server-4.0.0/setup.py 2006-12-06 19:58:13.000000000 +0100
+@@ -89,7 +89,7 @@
+ ['man/terp_serverrc.5']),
+ (opj('share','doc', 'tinyerp-server-%s' % version),
+ [f for f in glob.glob('doc/*') if os.path.isfile(f)]),
+- (opj('lib','python%s' % py_short_version, 'site-package', 'tinyerp-server', 'i18n'),
++ (opj('lib','python%s' % py_short_version, 'site-packages', 'tinyerp-server', 'i18n'),
+ glob.glob('bin/i18n/*')),
+ (opj('lib', 'python%s' % py_short_version, 'site-packages', 'tinyerp-server', 'addons', 'custom'),
+ glob.glob('bin/addons/custom/*xml') +
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>cedk@gentoo.org</email>
+</maintainer>
+<longdescription>An Open Source ERP & CRM</longdescription>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-office/tinyerp-server/tinyerp-server-4.0.0.ebuild,v 1.1 2006/12/06 21:43:23 cedk Exp $
+
+inherit eutils distutils
+
+DESCRIPTION="Open Source ERP & CRM"
+HOMEPAGE="http://tinyerp.org/"
+SRC_URI="mirro://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+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
+
+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_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-setup.patch
+}
+
+src_install() {
+ distutils_src_install
+
+ newinitd "${FILESDIR}"/tinyerp-init.d tinyerp
+ newconfd "${FILESDIR}"/tinyerp-conf.d tinyerp
+
+ keepdir /var/run/tinyerp
+ keepdir /var/log/tinyerp
+}
+
+pkg_preinst() {
+ enewgroup ${TINYERP_GROUP}
+ enewuser ${TINYERP_USER} -1 -1 -1 ${TINYERP_GROUP}
+
+ fowners ${TINYERP_USER}:${TINYERP_GROUP} /var/run/tinyerp
+ fowners ${TINYERP_USER}:${TINYERP_GROUP} /var/log/tinyerp
+}
+
+pkg_postinst() {
+ elog "In order to setup the initial database, run:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "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 --createdb --no-adduser --no-createrole ${TINYERP_USER}
+ eend $? || die "Failed to create database user"
+ fi
+}