Fix for ubuntu compatibility

This commit is contained in:
Laurent Destailleur 2014-02-02 15:46:22 +01:00
parent 4c60873d06
commit 8768ece9f7
2 changed files with 42 additions and 23 deletions

View File

@ -1,41 +1,47 @@
Source: dolibarr Source: dolibarr
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
Standards-Version: 3.9.2
Section: web Section: web
Priority: optional Priority: optional
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
Standards-Version: 3.9.4
Homepage: http://www.dolibarr.org Homepage: http://www.dolibarr.org
Build-Depends: debhelper (>= 7), po-debconf, dpatch Build-Depends: debhelper (>= 9), po-debconf, dpatch
Comments: This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version Comments: This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
Package: dolibarr Package: dolibarr
Architecture: all
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5, Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
php5-mysql | php5-mysqli, php5-cli,
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, # Required PHP extensions
# php5-geoip, php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php5-geoip,
# Required PHP libraries
php-pear, php-mail-mime,
# libfpdi-php, libfpdf-tpl-php, php-fpdf,
# libphp-adodb, # libphp-adodb,
# libnusoap-php, # libnusoap-php,
# libphp-pclzip, # libphp-pclzip,
# libfpdi-php, libfpdf-tpl-php, php-fpdf, # Required javascript libraries
# libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor, # libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor,
# ttf-dejavu-core, # Misc dependencies
# fonts-dejavu-core | ttf-dejavu-core,
xdg-utils, xdg-utils,
mysql-server, mysql-server,
${misc:Depends}, ${misc:Depends},
${perl:Depends} ${perl:Depends}
Recommends: apache2 | lighttpd | httpd, mysql-client Recommends: mysql-client, apache2 | lighttpd | httpd
Suggests: www-browser Suggests: www-browser
Architecture: all
Description: Web based software to manage a small company or foundation Description: Web based software to manage a small company or foundation
Dolibarr ERP & CRM is an easy to use open source/free software for small Dolibarr ERP & CRM is an easy to use open source/free software for small
and medium companies, foundations or freelances. It includes different and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities. Management (CRM) but also for different other activities.
.
It's a web software you can install as a standalone program or on any web It's a web software you can install as a standalone program or on any web
hosting provider to use it from anywhere with any web browser. hosting provider to use it from anywhere with any web browser.
. .
Dolibarr was designed to be easy to use. Only features you need are Dolibarr was designed to be easy to use. Only the features that you need are
visible, depending on which module were activated. visible, depending on which modules were activated.
.
Most common used modules are: Most common used modules are:
. .
Customers, Suppliers or Prospects directory, Customers, Suppliers or Prospects directory,

View File

@ -13,6 +13,11 @@ set -e
# <conflicting-package> <version> # <conflicting-package> <version>
# for details, see /usr/share/doc/packaging-manual/ # for details, see /usr/share/doc/packaging-manual/
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
# Needs to be run outside of functions to have access to parameters
. /usr/share/apache2/apache2-maintscript-helper
fi
setup_empty_conf() { setup_empty_conf() {
echo Create empty file $config echo Create empty file $config
mkdir -p /etc/dolibarr mkdir -p /etc/dolibarr
@ -36,22 +41,30 @@ enable_install_upgrade_wizard() {
} }
apache_install() { apache_install() {
# Apache 2 setup
if which a2enmod >/dev/null 2>&1 ;then
a2enmod alias
fi
webserver=$1 webserver=$1
if which a2enconf >/dev/null 2>&1 ;then
# a2enconf exists for ubuntu only
a2enconf dolibarr
else
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
echo "Add link for Apache config file" echo "Add link for Apache config file"
ln -s /etc/$webserver/conf-available/dolibarr.conf /etc/$webserver/conf.d/dolibarr.conf ln -s /etc/$webserver/conf-available/dolibarr.conf /etc/$webserver/conf.d/dolibarr.conf
fi fi
fi
} }
lighttpd_install() { lighttpd_install() {
if [ ! -f /etc/lighttpd/conf-available/50-dolibarr.conf ] ; then
if which lighty-enable-mod >/dev/null 2>&1 ; then if which lighty-enable-mod >/dev/null 2>&1 ; then
echo "Enable lighttpd link for dolibarr config file" echo "Enable lighttpd link for dolibarr config file"
lighty-enable-mod dolibarr fastcgi-php lighty-enable-mod dolibarr fastcgi-php
else else
echo "Lighttpd not installed, skipping" echo "Lighttpd not installed, skipping"
fi fi
fi
} }