diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-office/openerp | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-office/openerp')
-rw-r--r-- | app-office/openerp/Manifest | 4 | ||||
-rwxr-xr-x | app-office/openerp/files/openerp | 22 | ||||
-rw-r--r-- | app-office/openerp/files/openerp-2 | 23 | ||||
-rw-r--r-- | app-office/openerp/files/openerp-6.1-setup.py.patch | 32 | ||||
-rwxr-xr-x | app-office/openerp/files/openerp-confd | 3 | ||||
-rw-r--r-- | app-office/openerp/files/openerp-confd-2 | 3 | ||||
-rw-r--r-- | app-office/openerp/files/openerp.cfg | 64 | ||||
-rw-r--r-- | app-office/openerp/files/openerp.cfg.2 | 65 | ||||
-rw-r--r-- | app-office/openerp/files/openerp.logrotate | 10 | ||||
-rw-r--r-- | app-office/openerp/metadata.xml | 13 | ||||
-rw-r--r-- | app-office/openerp/openerp-6.1.1-r1.ebuild | 105 | ||||
-rw-r--r-- | app-office/openerp/openerp-7.0.20130219-r5.ebuild | 108 | ||||
-rw-r--r-- | app-office/openerp/openerp-7.0.20140125.ebuild | 120 | ||||
-rw-r--r-- | app-office/openerp/openerp-8.0.20140125.ebuild | 120 |
14 files changed, 692 insertions, 0 deletions
diff --git a/app-office/openerp/Manifest b/app-office/openerp/Manifest new file mode 100644 index 000000000000..40c10de71201 --- /dev/null +++ b/app-office/openerp/Manifest @@ -0,0 +1,4 @@ +DIST openerp-6.1-1.tar.gz 73310629 SHA256 a89016d706f1693833590d2ce5cf7768fb3586213661014adad5ed16cdc77cd7 SHA512 0cf407fda4d7ce414b548310018609381157e656069b5224bb05ae6dbf7d534b9acbbb5be561ec1f9a26786ec6fc9b917fb78faff3c67340916f663ccb5297cf WHIRLPOOL 384ae795df9d23c07a6e06c0c468cb6d9af0c2625648bda5d895271f2d1e07d00b81e7da3d4255f709d5eed299166c65b29ec335a71307ea1a3f6775b590befe +DIST openerp-7.0-20130219-002614.tar.gz 60420142 SHA256 e4408348259fa8bf86909035a4f86417671f09ac6c4a9ec50c4a55a69e5a3674 SHA512 15cb43d1a698da751a0109c256dd8875b7a064541ee7550c66d70c03143aa6486eb39b05966b1ef77e4cf9b0d333101e84fb8508411a7acf9b0a44a0f8897f3a WHIRLPOOL c4a5840fa9d76840f0da645e4a107296750d32161f21d81b22ba579b35172d2abe2fb24126e2c69de18e0b13a4555a82e938291728f6c370451a150a218fbbeb +DIST openerp-7.0-20140125-002455.tar.gz 64214375 SHA256 2bf832dda8f8e844476bb76cd60be84da1cc219e97be9da15b0a95b1e537bc4e SHA512 a923fe3240cf44f6384f18bd37853d15fe132aab97494e713f095253cd4b72d32a89e33ba3623a523b81b9863da6d5bca24c4020b20829975e4185d6e5093b3e WHIRLPOOL 5a4fcb37a6ea800e63294fe6b9dcbb3f82e91d1f0adfe412935b699b8e0c2901914dcfc5c0c62e2b289e057ecb4f30c5a4c06887c2d8e893ce1c1b03e6f5ce62 +DIST openerp-8.0dev-20140125-000101.tar.gz 82648176 SHA256 647c4a5ec28340f7c5a32dd50173b98bf62dd18ba00cc1929538a8803c704da0 SHA512 560f0cd9aadfb010dfba1a114ca17ed8dc7b63fffdd93325811b87530e97a8e629c46442e777bd0c53fb38b1a985e769e3fb5f5edf66b9b45f21be3e8973aedd WHIRLPOOL 1fb6e185250c08e948b11f2ca6581723055eefd0edb6a7999029b950b064c7aebf23a83bc014240c2d2d78284fcf8292761b6cc7733f270f14bfd4a98673a222 diff --git a/app-office/openerp/files/openerp b/app-office/openerp/files/openerp new file mode 100755 index 000000000000..d926fc514ce2 --- /dev/null +++ b/app-office/openerp/files/openerp @@ -0,0 +1,22 @@ +#!/sbin/runscript + +# Additional options that are passed to the daemon. +DAEMON_OPTS="-c ${CONFIGFILE}" + +depend() { + after postgresql +} + +start() { + ebegin "Starting openerp server" + start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/bin/openerp-server \ + --make-pidfile --user "${USER}" --background -- ${DAEMON_OPTS} + eend $? +} + +stop() { + ebegin "Stopping openerp server" + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" --signal 9 + rm -f "${PIDFILE}" + eend $? +} diff --git a/app-office/openerp/files/openerp-2 b/app-office/openerp/files/openerp-2 new file mode 100644 index 000000000000..c6e9f5a35e2e --- /dev/null +++ b/app-office/openerp/files/openerp-2 @@ -0,0 +1,23 @@ +#!/sbin/runscript + +# Additional options that are passed to the daemon. +DAEMON_OPTS="-c ${CONFIGFILE}" + +depend() { + after postgresql +} + +start() { + checkpath -q -d -m 0755 -o openerp:openerp /run/openerp + ebegin "Starting openerp server" + start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/bin/openerp-server \ + --make-pidfile --user "${USER}" --background -- ${DAEMON_OPTS} + eend $? +} + +stop() { + ebegin "Stopping openerp server" + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" --signal 9 + rm -f "${PIDFILE}" + eend $? +} diff --git a/app-office/openerp/files/openerp-6.1-setup.py.patch b/app-office/openerp/files/openerp-6.1-setup.py.patch new file mode 100644 index 000000000000..904824875614 --- /dev/null +++ b/app-office/openerp/files/openerp-6.1-setup.py.patch @@ -0,0 +1,32 @@ +--- setup.py.old 2012-07-01 17:31:24.000000000 +0400 ++++ setup.py 2012-07-01 17:33:52.000000000 +0400 +@@ -22,6 +22,7 @@ + + import glob, os, re, setuptools, sys + from os.path import join, isfile ++from distutils.sysconfig import get_python_lib + + # List all data files + def data(): +@@ -32,7 +33,7 @@ def data(): + files.append(os.path.join(root, filename)) + d = {} + for v in files: +- k=os.path.dirname(v) ++ k=os.path.join(get_python_lib(prefix=''), os.path.dirname(v)) + if k in d: + d[k].append(v) + else: +@@ -41,9 +42,9 @@ def data(): + if os.name == 'nt': + r.append(("Microsoft.VC90.CRT", glob.glob('C:\Microsoft.VC90.CRT\*.*'))) + +- import babel +- r.append(("localedata", +- glob.glob(os.path.join(os.path.dirname(babel.__file__), "localedata" , '*')))) ++# import babel ++# r.append(("localedata", ++# glob.glob(os.path.join(os.path.dirname(babel.__file__), "localedata" , '*')))) + + return r + diff --git a/app-office/openerp/files/openerp-confd b/app-office/openerp/files/openerp-confd new file mode 100755 index 000000000000..438f0ee154d4 --- /dev/null +++ b/app-office/openerp/files/openerp-confd @@ -0,0 +1,3 @@ +USER="openerp" +CONFIGFILE="/etc/openerp/openerp.cfg" +PIDFILE="/var/run/openerp/openerp.pid" diff --git a/app-office/openerp/files/openerp-confd-2 b/app-office/openerp/files/openerp-confd-2 new file mode 100644 index 000000000000..5e84946046cd --- /dev/null +++ b/app-office/openerp/files/openerp-confd-2 @@ -0,0 +1,3 @@ +USER="openerp" +CONFIGFILE="/etc/openerp/openerp.cfg" +PIDFILE="/run/openerp/openerp.pid" diff --git a/app-office/openerp/files/openerp.cfg b/app-office/openerp/files/openerp.cfg new file mode 100644 index 000000000000..a760856a18a1 --- /dev/null +++ b/app-office/openerp/files/openerp.cfg @@ -0,0 +1,64 @@ +[options] + +# General options: +admin_passwd = admin + +pidfile = /var/run/openerp/openerp-server.pid +interface = +port = 8069 +netinterface = +netport = 8070 +netrpc = True +xmlrpc = True +init = +without_demo = False +demo = {} +update = +cache_timeout = 100000 +stop_after_init = False +debug_mode = False +assert_exit_level = warn +price_accuracy = 2 + +# SSL Configuration: +secure = False +secure_cert_file = server.cert +secure_pkey_file = server.pkey + +# Logging Configuration: +logfile = /var/log/openerp/openerp-server.log +syslog = False +log_level = debug + +# SMTP Configuration: +email_from = False +smtp = localhost +smtp_port = 25 +smtp_ssl = False +smtp_user = False +smtp_password = False + +# pg_path points at local pg instance - please change as needed +# Database related options: +db_user = openerp +db_password = change_this +pg_path = /run/postgresql/.s.PGSQL.5432 +db_name = False +db_host = False +db_port = False +db_maxconn = 64 +import_partial = + +# Internationalisation options: +language = +translate_out = +translate_in = +translate_modules = ['all'] + +# Security-related options: +list_db = True +server_actions_allow_code = False + + + + diff --git a/app-office/openerp/files/openerp.cfg.2 b/app-office/openerp/files/openerp.cfg.2 new file mode 100644 index 000000000000..e11184acb4f9 --- /dev/null +++ b/app-office/openerp/files/openerp.cfg.2 @@ -0,0 +1,65 @@ +[options] + +# General options: +admin_passwd = admin + +pidfile = /run/openerp/openerp-server.pid +interface = +port = 8069 +netinterface = +netport = 8070 +netrpc = True +xmlrpc = True +init = +without_demo = False +demo = {} +update = +cache_timeout = 100000 +stop_after_init = False +debug_mode = False +assert_exit_level = warn +price_accuracy = 2 + +# SSL Configuration: +secure = False +secure_cert_file = server.cert +secure_pkey_file = server.pkey + +# Logging Configuration: +logfile = /var/log/openerp/openerp-server.log +syslog = False +log_level = debug + +# SMTP Configuration: +email_from = False +smtp = localhost +smtp_port = 25 +smtp_ssl = False +smtp_user = False +smtp_password = False + +# pg_path points at local pg instance - please change as needed +# Database related options: +db_user = openerp +db_password = change_this +pg_path = /run/postgresql/.s.PGSQL.5432 +db_name = False +db_host = False +db_port = False +db_maxconn = 64 +import_partial = + +# Internationalisation options: +language = +translate_out = +translate_in = +translate_modules = ['all'] + +# Security-related options: +list_db = True +server_actions_allow_code = False + +addons_path = /usr/openerp/addons + + + diff --git a/app-office/openerp/files/openerp.logrotate b/app-office/openerp/files/openerp.logrotate new file mode 100644 index 000000000000..ef00eb8608aa --- /dev/null +++ b/app-office/openerp/files/openerp.logrotate @@ -0,0 +1,10 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +/var/log/openerp/*.log { + monthly + create 660 openerp openerp + missingok + copytruncate +} diff --git a/app-office/openerp/metadata.xml b/app-office/openerp/metadata.xml new file mode 100644 index 000000000000..8dd197b469c7 --- /dev/null +++ b/app-office/openerp/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <maintainer> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + <description>Co Maintainer</description> + </maintainer> +</pkgmetadata> diff --git a/app-office/openerp/openerp-6.1.1-r1.ebuild b/app-office/openerp/openerp-6.1.1-r1.ebuild new file mode 100644 index 000000000000..cb5a5d12d946 --- /dev/null +++ b/app-office/openerp/openerp-6.1.1-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" +PYTHON_DEPEND="2" + +inherit eutils distutils user + +DESCRIPTION="Open Source ERP & CRM" +HOMEPAGE="http://www.openerp.com/" +FNAME="${PN}-6.1-1" +SRC_URI="http://nightly.openerp.com/6.1/releases/${FNAME}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="postgres ldap ssl" + +CDEPEND="postgres? ( dev-db/postgresql[server] ) + dev-python/lxml + dev-python/psycopg:2 + dev-python/pychart + dev-python/reportlab + media-gfx/pydot + dev-python/vobject + dev-python/mako + dev-python/pyyaml + dev-python/Babel + dev-python/gdata + ldap? ( dev-python/python-ldap ) + dev-python/python-openid + dev-python/werkzeug + dev-python/xlwt + dev-python/feedparser + dev-python/python-dateutil + dev-python/pywebdav + ssl? ( dev-python/pyopenssl ) + dev-python/vatnumber + dev-python/zsi" + +RDEPEND="${CDEPEND}" +DEPEND="${CDEPEND}" + +OPENERP_USER="openerp" +OPENERP_GROUP="openerp" + +S="${WORKDIR}/${FNAME}" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-6.1-setup.py.patch" +} + +src_install() { + distutils_src_install + + doinitd "${FILESDIR}/${PN}-2" "${PN}" + newconfd "${FILESDIR}/openerp-confd-2" "${PN}" + keepdir /var/log/openerp + + insinto /etc/logrotate.d + newins "${FILESDIR}"/openerp.logrotate openerp || die + dodir /etc/openerp + insinto /etc/openerp + newins "${FILESDIR}"/openerp.cfg openerp.cfg || die +} + +pkg_preinst() { + enewgroup ${OPENERP_GROUP} + enewuser ${OPENERP_USER} -1 -1 -1 ${OPENERP_GROUP} + + fowners ${OPENERP_USER}:${OPENERP_GROUP} /var/run/openerp + fowners ${OPENERP_USER}:${OPENERP_GROUP} /var/log/openerp + fowners -R ${OPENERP_USER}:${OPENERP_GROUP} "$(python_get_sitedir)/${PN}/addons/" + + use postgres || sed -i '6,8d' "${D}/etc/init.d/openerp" || die "sed failed" +} + +pkg_postinst() { + chown ${OPENERP_USER}:${OPENERP_GROUP} /var/run/openerp + chown ${OPENERP_USER}:${OPENERP_GROUP} /var/log/openerp + chown -R ${OPENERP_USER}:${OPENERP_GROUP} "$(python_get_sitedir)/${PN}/addons/" + + 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 = '${OPENERP_USER}'" | grep -q ${OPENERP_USER}; then + ebegin "Creating database user ${OPENERP_USER}" + createuser --username=postgres --createdb --no-adduser ${OPENERP_USER} + eend $? || die "Failed to create database user" + fi +} diff --git a/app-office/openerp/openerp-7.0.20130219-r5.ebuild b/app-office/openerp/openerp-7.0.20130219-r5.ebuild new file mode 100644 index 000000000000..da042ddfcf6b --- /dev/null +++ b/app-office/openerp/openerp-7.0.20130219-r5.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" +PYTHON_DEPEND="2" + +inherit eutils distutils user + +DESCRIPTION="Open Source ERP & CRM" +HOMEPAGE="http://www.openerp.com/" +#yes, this is definitely a horrible URI +MY_PV=${PV/7.0./7.0-} +FNAME="${PN}-${MY_PV}-002614" +SRC_URI="http://nightly.openerp.com/7.0/nightly/src/${FNAME}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="+postgres ldap ssl" + +CDEPEND="!app-office/openerp-web + postgres? ( dev-db/postgresql[server] ) + dev-python/psutil + dev-python/docutils + dev-python/lxml + dev-python/psycopg:2 + dev-python/pychart + dev-python/reportlab + media-gfx/pydot + dev-python/vobject + dev-python/mako + dev-python/pyyaml + dev-python/Babel + dev-python/gdata + ldap? ( dev-python/python-ldap ) + dev-python/python-openid + dev-python/werkzeug + dev-python/xlwt + dev-python/feedparser + dev-python/python-dateutil + dev-python/pywebdav + ssl? ( dev-python/pyopenssl ) + dev-python/vatnumber + dev-python/zsi + dev-python/mock + dev-python/unittest2 + dev-python/jinja + dev-python/matplotlib" + +RDEPEND="${CDEPEND}" +DEPEND="${CDEPEND}" + +OPENERP_USER="openerp" +OPENERP_GROUP="openerp" + +S="${WORKDIR}/${FNAME}" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_install() { + distutils_src_install + + newinitd "${FILESDIR}/${PN}-2" "${PN}" + newconfd "${FILESDIR}/openerp-confd-2" "${PN}" + keepdir /var/log/openerp + + insinto /etc/logrotate.d + newins "${FILESDIR}"/openerp.logrotate openerp || die + dodir /etc/openerp + insinto /etc/openerp + newins "${FILESDIR}"/openerp.cfg.2 openerp.cfg || die +} + +pkg_preinst() { + enewgroup ${OPENERP_GROUP} + enewuser ${OPENERP_USER} -1 -1 -1 ${OPENERP_GROUP} + + fowners ${OPENERP_USER}:${OPENERP_GROUP} /var/log/openerp + fowners -R ${OPENERP_USER}:${OPENERP_GROUP} "$(python_get_sitedir)/${PN}/addons/" + + use postgres || sed -i '6,8d' "${D}/etc/init.d/openerp" || die "sed failed" +} + +pkg_postinst() { + chown ${OPENERP_USER}:${OPENERP_GROUP} /var/log/openerp + chown -R ${OPENERP_USER}:${OPENERP_GROUP} "$(python_get_sitedir)/${PN}/addons/" + + elog "In order to setup the initial database, run:" + elog " emerge --config =${CATEGORY}/${PF}" + elog "Be sure the database is started before" +} + +psqlquery() { + psql -q -At -U postgres -d template1 -c "$@" +} + +pkg_config() { + einfo "In the following, the 'postgres' user will be used." + if ! psqlquery "SELECT usename FROM pg_user WHERE usename = '${OPENERP_USER}'" | grep -q ${OPENERP_USER}; then + ebegin "Creating database user ${OPENERP_USER}" + createuser --username=postgres --createdb --no-adduser ${OPENERP_USER} + eend $? || die "Failed to create database user" + fi +} diff --git a/app-office/openerp/openerp-7.0.20140125.ebuild b/app-office/openerp/openerp-7.0.20140125.ebuild new file mode 100644 index 000000000000..c9cf8926dfe5 --- /dev/null +++ b/app-office/openerp/openerp-7.0.20140125.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_SINGLE_IMPL=1 + +inherit eutils distutils-r1 user + +DESCRIPTION="Open Source ERP & CRM" +HOMEPAGE="http://www.openerp.com/" +MY_PV=${PV/7.0./7.0-} +FNAME="${PN}-${MY_PV}-002455" +SRC_URI="http://nightly.openerp.com/7.0/nightly/src/${FNAME}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="+postgres ldap ssl" + +CDEPEND="!app-office/openerp-web + postgres? ( dev-db/postgresql[server] ) + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/psycopg:2[${PYTHON_USEDEP}] + dev-python/pychart[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/reportlab[${PYTHON_USEDEP}] + dev-python/simplejson[${PYTHON_USEDEP}] + media-gfx/pydot + dev-python/vobject[${PYTHON_USEDEP}] + dev-python/mako[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/Babel[${PYTHON_USEDEP}] + dev-python/gdata[${PYTHON_USEDEP}] + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) + dev-python/python-openid[${PYTHON_USEDEP}] + dev-python/werkzeug[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + dev-python/feedparser[${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/pywebdav[${PYTHON_USEDEP}] + ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] ) + dev-python/vatnumber[${PYTHON_USEDEP}] + dev-python/zsi[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/unittest2[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + virtual/python-imaging[jpeg,${PYTHON_USEDEP}] + ${PYTHON_DEPS} + " + +RDEPEND="${CDEPEND}" +DEPEND="${CDEPEND}" + +OPENERP_USER="openerp" +OPENERP_GROUP="openerp" + +S="${WORKDIR}/${FNAME}" + +python_install_all() { + distutils-r1_python_install_all + + newinitd "${FILESDIR}/${PN}-2" "${PN}" + newconfd "${FILESDIR}/openerp-confd-2" "${PN}" + keepdir /var/log/openerp + + insinto /etc/logrotate.d + newins "${FILESDIR}"/openerp.logrotate openerp + dodir /etc/openerp + insinto /etc/openerp + newins "${FILESDIR}"/openerp.cfg.2 openerp.cfg + + # #453424 Fix error on /usr/openerp/import_xml.rng + dosym /usr/${PN}/import_xml.rng $(python_get_sitedir)/${PN}/import_xml.rng + + # #453424 Fix error on /usr/openerp/addons/base/res/res_company_logo.png + dosym /usr/${PN}/addons/base/res/res_company_logo.png $(python_get_sitedir)/${PN}/addons/base/res/res_company_logo.png +} + +pkg_preinst() { + enewgroup ${OPENERP_GROUP} + enewuser ${OPENERP_USER} -1 -1 -1 ${OPENERP_GROUP} + + fowners -R ${OPENERP_USER}:${OPENERP_GROUP} /etc/openerp + fowners ${OPENERP_USER}:${OPENERP_GROUP} /var/log/openerp + fowners -R ${OPENERP_USER}:${OPENERP_GROUP} "$(python_get_sitedir)/${PN}/addons/" + + fperms 0640 /etc/openerp/openerp.cfg + + use postgres || sed -i '6,8d' "${D}/etc/init.d/openerp" || die "sed failed" +} + +pkg_postinst() { + chown -R ${OPENERP_USER}:${OPENERP_GROUP} /etc/openerp + chown ${OPENERP_USER}:${OPENERP_GROUP} /var/log/openerp + chown -R ${OPENERP_USER}:${OPENERP_GROUP} "$(python_get_sitedir)/${PN}/addons/" + + elog "In order to setup the initial database, run:" + elog " emerge --config =${CATEGORY}/${PF}" + elog "Be sure the database is started before" +} + +psqlquery() { + psql -q -At -U postgres -d template1 -c "$@" +} + +pkg_config() { + einfo "In the following, the 'postgres' user will be used." + if ! psqlquery "SELECT usename FROM pg_user WHERE usename = '${OPENERP_USER}'" | grep -q ${OPENERP_USER}; then + ebegin "Creating database user ${OPENERP_USER}" + createuser --username=postgres --createdb --no-adduser ${OPENERP_USER} + eend $? || die "Failed to create database user" + fi +} diff --git a/app-office/openerp/openerp-8.0.20140125.ebuild b/app-office/openerp/openerp-8.0.20140125.ebuild new file mode 100644 index 000000000000..1ccd2542cd4c --- /dev/null +++ b/app-office/openerp/openerp-8.0.20140125.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_SINGLE_IMPL=1 + +inherit eutils distutils-r1 user + +DESCRIPTION="Open Source ERP & CRM" +HOMEPAGE="http://www.openerp.com/" +MY_PV=${PV/8.0./8.0dev-} +FNAME="${PN}-${MY_PV}-000101" +SRC_URI="http://nightly.openerp.com/trunk/nightly/src/${FNAME}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="+postgres ldap ssl" + +CDEPEND="!app-office/openerp-web + postgres? ( dev-db/postgresql[server] ) + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/psycopg:2[${PYTHON_USEDEP}] + dev-python/pychart[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/reportlab[${PYTHON_USEDEP}] + dev-python/simplejson[${PYTHON_USEDEP}] + media-gfx/pydot + dev-python/vobject[${PYTHON_USEDEP}] + dev-python/mako[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/Babel[${PYTHON_USEDEP}] + dev-python/gdata[${PYTHON_USEDEP}] + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) + dev-python/python-openid[${PYTHON_USEDEP}] + dev-python/werkzeug[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + dev-python/feedparser[${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/pywebdav[${PYTHON_USEDEP}] + ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] ) + dev-python/vatnumber[${PYTHON_USEDEP}] + dev-python/zsi[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/unittest2[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + virtual/python-imaging[jpeg,${PYTHON_USEDEP}] + ${PYTHON_DEPS} + " + +RDEPEND="${CDEPEND}" +DEPEND="${CDEPEND}" + +OPENERP_USER="openerp" +OPENERP_GROUP="openerp" + +S="${WORKDIR}/${FNAME}" + +python_install_all() { + distutils-r1_python_install_all + + newinitd "${FILESDIR}/${PN}-2" "${PN}" + newconfd "${FILESDIR}/openerp-confd-2" "${PN}" + keepdir /var/log/openerp + + insinto /etc/logrotate.d + newins "${FILESDIR}"/openerp.logrotate openerp + dodir /etc/openerp + insinto /etc/openerp + newins "${FILESDIR}"/openerp.cfg.2 openerp.cfg + + # #453424 Fix error on /usr/openerp/import_xml.rng + dosym /usr/${PN}/import_xml.rng $(python_get_sitedir)/${PN}/import_xml.rng + + # #453424 Fix error on /usr/openerp/addons/base/res/res_company_logo.png + dosym /usr/${PN}/addons/base/res/res_company_logo.png $(python_get_sitedir)/${PN}/addons/base/res/res_company_logo.png +} + +pkg_preinst() { + enewgroup ${OPENERP_GROUP} + enewuser ${OPENERP_USER} -1 -1 -1 ${OPENERP_GROUP} + + fowners -R ${OPENERP_USER}:${OPENERP_GROUP} /etc/openerp + fowners ${OPENERP_USER}:${OPENERP_GROUP} /var/log/openerp + fowners -R ${OPENERP_USER}:${OPENERP_GROUP} "$(python_get_sitedir)/${PN}/addons/" + + fperms 0640 /etc/openerp/openerp.cfg + + use postgres || sed -i '6,8d' "${D}/etc/init.d/openerp" || die "sed failed" +} + +pkg_postinst() { + chown -R ${OPENERP_USER}:${OPENERP_GROUP} /etc/openerp + chown ${OPENERP_USER}:${OPENERP_GROUP} /var/log/openerp + chown -R ${OPENERP_USER}:${OPENERP_GROUP} "$(python_get_sitedir)/${PN}/addons/" + + elog "In order to setup the initial database, run:" + elog " emerge --config =${CATEGORY}/${PF}" + elog "Be sure the database is started before" +} + +psqlquery() { + psql -q -At -U postgres -d template1 -c "$@" +} + +pkg_config() { + einfo "In the following, the 'postgres' user will be used." + if ! psqlquery "SELECT usename FROM pg_user WHERE usename = '${OPENERP_USER}'" | grep -q ${OPENERP_USER}; then + ebegin "Creating database user ${OPENERP_USER}" + createuser --username=postgres --createdb --no-adduser ${OPENERP_USER} + eend $? || die "Failed to create database user" + fi +} |