security/odoo15: New port: Suite of web based open source business apps

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce,
Warehouse Management, Project Management, Billing & Accounting, Point of Sale,
Human Resources, Marketing, Manufacturing, etc

Odoo Apps can be used as stand-alone applications, but they also integrate
seamlessly so you get a full-featured Open Source ERP when you install several
Apps.
This commit is contained in:
Jose Alonso Cardenas Marquez 2022-11-18 01:00:49 -05:00
parent f025d8fc43
commit b5d9784c3d
8 changed files with 39171 additions and 0 deletions

View File

@ -49,6 +49,7 @@
SUBDIR += nextcloud-cospend
SUBDIR += odoo
SUBDIR += odoo14
SUBDIR += odoo15
SUBDIR += p5-Business-CreditCard
SUBDIR += p5-Business-MaxMind-CreditCardFraudDetection
SUBDIR += p5-Business-OCV

110
finance/odoo15/Makefile Normal file
View File

@ -0,0 +1,110 @@
PORTNAME= odoo
PORTVERSION= 15.0
PORTREVISION= 2
CATEGORIES= finance www
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
PKGNAMESUFFIX= 15
MAINTAINER= acm@FreeBSD.org
COMMENT= Suite of web based open source business apps
WWW= https://www.odoo.com
LICENSE= LGPL3
USE_GITHUB= yes
GH_TAGNAME= 02b4e98ebb2c45d9a4af10fe1bc732f048708f85
LIB_DEPENDS= libxml2.so:textproc/libxml2 \
libxslt.so:textproc/libxslt \
libevent.so:devel/libevent \
libsasl2.so:security/cyrus-sasl2
RUN_DEPENDS= wkhtmltopdf>0:converters/wkhtmltopdf \
${PYTHON_PKGNAMEPREFIX}psycopg2>0:databases/py-psycopg2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyserial>=0:comms/py-pyserial@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}vobject>=0:deskutils/py-vobject@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Babel>=1.3:devel/py-babel@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}dateutil>=0:devel/py-dateutil@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}gevent>=0:devel/py-gevent@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}greenlet>=0:devel/py-greenlet@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Jinja2>=0:devel/py-Jinja2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}lxml>=0:devel/py-lxml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mako>=0:textproc/py-mako@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}num2words>=0:devel/py-num2words@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}polib>=0:devel/py-polib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyparsing>=0:devel/py-pyparsing@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytz>=0:devel/py-pytz@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyusb>=0:devel/py-pyusb@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}vatnumber>=0:finance/py-vatnumber@${PY_FLAVOR} \
${PY_PILLOW} \
${PYTHON_PKGNAMEPREFIX}pydot>=0:graphics/py-pydot@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}ldap>=0:net/py-ldap@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}zeep>=0:net/py-zeep@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}chardet>=0:textproc/py-chardet@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}docutils>=0:textproc/py-docutils@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}feedparser>=0:textproc/py-feedparser@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}html2text>=0:textproc/py-html2text@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}markupsafe>=0:textproc/py-markupsafe@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}qrcode>=0:textproc/py-qrcode@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xlrd>=0:textproc/py-xlrd@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xlwt>=0:textproc/py-xlwt@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}XlsxWriter>=0:textproc/py-xlsxwriter@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}decorator>0:devel/py-decorator@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pypdf2>0:print/py-pypdf2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}reportlab>0:print/py-reportlab@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}libsass>0:www/py-libsass@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}werkzeug>0:www/py-werkzeug@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}secure-cookie>0:www/py-secure-cookie@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}XlsxWriter>=0:textproc/py-xlsxwriter@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xlrd>=1.2.0:textproc/py-xlrd@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xlwt>=1.3.0:textproc/py-xlwt@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}ofxparse>=0.20:finance/py-ofxparse@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}ebaysdk>=2.1.3:finance/py-ebaysdk@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}idna>0:dns/py-idna@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}stdnum>0:devel/py-stdnum@${PY_FLAVOR}
USES= cpe python:3.7+ pgsql shebangfix
USE_PYTHON= distutils
USE_OPENLDAP= yes
SHEBANG_LANG= python
SHEBANG_FILES= ${WRKSRC}/${PORTNAME}-bin
USERS= odoo
GROUPS= ${USERS}
USE_RC_SUBR= ${PORTNAME}
SUB_FILES= pkg-message
CONFLICTS= odoo14 odoo
ETCDIR= ${PREFIX}/etc/odoo
post-patch:
@${REINPLACE_CMD} -i "" -e '25d' ${WRKSRC}/odoo/service/wsgi_server.py
@${REINPLACE_CMD} -i "" -e 's|werkzeug.url_quote_plus|werkzeug.urls.url_quote_plus|g' \
${WRKSRC}/odoo/addons/base/models/ir_ui_view.py
@${REINPLACE_CMD} -i "" -e 's|werkzeug.url_unquote_plus|werkzeug.urls.url_quote_plus|g' \
-e 's|.NumberConverter|.converters.NumberConverter|g' \
${WRKSRC}/odoo/addons/base/models/ir_http.py \
${WRKSRC}/odoo/addons/http_routing/models/ir_http.py
@${REINPLACE_CMD} -i "" -e 's|from werkzeug import url_encode|from werkzeug.urls import url_encode|g' \
${WRKSRC}/odoo/addons/mail/models/mail_thread.py \
${WRKSRC}/odoo/addons/hr/models/hr_employee.py
@${REINPLACE_CMD} -i "" -e 's|(index !== |(index == |g' \
${WRKSRC}/odoo/addons/web/static/src/legacy/js/libs/content-disposition.js \
${WRKSRC}/odoo/addons/web/static/src/core/network/download.js
post-extract:
@cd ${WRKSRC}/addons/ && ${MV} * ${WRKSRC}/odoo/addons/
pre-install:
@${MKDIR} ${STAGEDIR}${ETCDIR}
post-install:
@${INSTALL_SCRIPT} ${FILESDIR}/odoo.conf ${STAGEDIR}${ETCDIR}/odoo.conf.sample
.include <bsd.port.mk>

3
finance/odoo15/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1661575896
SHA256 (odoo-odoo-15.0-02b4e98ebb2c45d9a4af10fe1bc732f048708f85_GH0.tar.gz) = bccfd6c683be0092c736b42cfc987b4b588e3c26865a96f2431b9ac6b3d5c3ec
SIZE (odoo-odoo-15.0-02b4e98ebb2c45d9a4af10fe1bc732f048708f85_GH0.tar.gz) = 140762887

View File

@ -0,0 +1,7 @@
[options]
#admin_passwd = secretpassword
db_host = localhost
db_port = 5432
db_user = odoouser
db_password = odoopwd
;addons_path = /usr/local/lib/python3.7/site-packages/odoo/addons/

View File

@ -0,0 +1,113 @@
#!/bin/sh
# PROVIDE: odoo
# REQUIRE: NETWORKING
# KEYWORD: shutdown
#
# Configuration settings for odoo in /etc/rc.conf:
#
# odoo_enable: run odoo server (default=NO)
# odoo_database: define odoo database name (default=odoodb)
# odoo_datadir: directory where odoo store data (default=/var/lib/odoo)
# odoo_flags: additional flags for odoo server (default=--without-demo=all)
#
. /etc/rc.subr
name=odoo
rcvar=odoo_enable
load_rc_config ${name}
: ${odoo_enable:=NO}
: ${odoo_database:="odoodb"}
: ${odoo_datadir:="/var/lib/${name}"}
: ${odoo_flags="--without-demo=all"}
odoo_user="odoo"
pidfile=/var/run/odoo.pid
extra_commands="initdb"
su_cmd="/usr/bin/su"
chown_cmd="/usr/sbin/chown"
mkdir_cmd="/bin/mkdir"
start_cmd="odoo_start"
stop_cmd="odoo_stop"
status_cmd="odoo_status"
restart_cmd="odoo_restart"
initdb_cmd="odoo_initdb"
start_precmd="odoo_start_precmd"
command=/usr/local/bin/odoo
command_args="--database=${odoo_database} --data-dir=${odoo_datadir} --logfile=/var/log/${name}.log --config=%%LOCALBASE%%/etc/odoo/odoo.conf ${odoo_flags}"
odoo_start_precmd() {
odoo_datadir_check
touch ${pidfile}
${chown_cmd} -R ${odoo_user}:${odoo_user} ${pidfile}
}
odoo_start()
{
daemon -p ${pidfile} -u ${odoo_user} \
${command} ${command_args}
echo "Starting ${name}"
}
odoo_datadir_check()
{
if [ ! -d "${odoo_datadir}" ]; then
${mkdir_cmd} -p ${odoo_datadir}
${chown_cmd} -R ${odoo_user}:${odoo_user} ${odoo_datadir}
echo "${name} data directory created"
fi
}
odoo_initdb()
{
echo " "
echo "#################################################################"
echo "# #"
echo "# Don't use initdb if you are updating from previous version of #"
echo "# Odoo. Cancel if this is your case (Ctrl + C) #"
echo "# #"
echo "#################################################################"
echo " "
sleep 10
odoo_start_precmd
daemon -p ${pidfile} -u ${odoo_user} \
${command} ${command_args} -i all
echo "Initializing database and starting ${name} server"
}
odoo_restart()
{
echo "Performing restart ${name}"
odoo_stop
sleep 5
odoo_start
}
odoo_status()
{
# If running, show pid
if [ -f ${pidfile} ]
then
echo "${name} is running as pid" `cat ${pidfile}`
else
echo "${name} is not running"
fi
}
odoo_stop()
{
if [ -f ${pidfile} ]
then
kill `cat ${pidfile}`
rm ${pidfile}
echo "Stopping ${name}"
fi
}
run_rc_command "$1"

View File

@ -0,0 +1,44 @@
[
{ type: install
message: <<EOM
Odoo 15 ERP was installed
1) The configuration file can be located at:
%%ETCDIR%%/odoo.conf
Look at the following url for more config options
https://www.odoo.com/documentation/15.0/administration/install/deploy.html
2) Odoo use PostgreSQL like database. You must create a database and user
before of use Odoo by first time
3) Add odoo_enable="YES" to /etc/rc.conf. Also, can add the following lines:
odoo_database="postgresql_odoo_database_name" # This is odoodb by default
odoo_datadir="/path/to/odoo/datadir" # This is /var/db/odoo by defualt
4) Odoo database host, user and password must be defined at %%ETCDIR%%/odoo.conf
5) The first time that you run odoo you must be do the following:
# service odoo initdb
This command will create PostgreSQL structure used by Odoo
Note: Don't use this command if you are updating from previous version of
odoo because it could destroy your data
6) You can load Odoo ERP from a web browser
http://odoo_ip_host:8069
7) If you want securizing Odoo access from web browser (https), you can use a
web server like proxy. Look at following documentation:
https://www.odoo.com/documentation/15.0/administration/install/deploy.html#https
EOM
}
]

9
finance/odoo15/pkg-descr Normal file
View File

@ -0,0 +1,9 @@
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce,
Warehouse Management, Project Management, Billing & Accounting, Point of Sale,
Human Resources, Marketing, Manufacturing, etc
Odoo Apps can be used as stand-alone applications, but they also integrate
seamlessly so you get a full-featured Open Source ERP when you install several
Apps.

38884
finance/odoo15/pkg-plist Normal file

File diff suppressed because it is too large Load Diff