diff --git a/build/deb/README b/build/deb/README index 72a5d50c821..ca1be50e6d9 100644 --- a/build/deb/README +++ b/build/deb/README @@ -7,9 +7,16 @@ This directory contains files used by makepack-dolibarr.pl script to build a package, ready to be distributed, with format .DEB (for Debian, Ubuntu, ...). +# To build a debian package, you need first +# apt-get -i debhelper +# apt-get -i dpkg-source +# apt-get -i gpg + # This is standard command to work on Debian packaging: # +# gpg --gen-key Generate a GPG key +# # lintian --pedantic -E -I package.deb To test a package # # dpkg -l List all packages @@ -20,6 +27,8 @@ with format .DEB (for Debian, Ubuntu, ...). # # dpkg -L packagename List content of installed package # dpkg --purge Remove config files and interactive saved answers +# +# dpkg-buildpackage -us -uc Build a source and binary package To submit a package to Debian: diff --git a/build/deb/README.debian b/build/deb/README.debian new file mode 100755 index 00000000000..a4dacc288af --- /dev/null +++ b/build/deb/README.debian @@ -0,0 +1,103 @@ +README (english) +-------------------------------- +Starter documentation +-------------------------------- + +1) Install Dolibarr +2) Upgrade Dolibarr from an older version +3) What's new in this version +4) What Dolibarr can do +5) What Dolibarr can't do yet, todo list + + +I - DOLIBARR INSTALL +-------------------- + +Dolibarr files and its dependencies are automatically installed when you install +the dolibarr Debian package. + +Once package is installed, go on menu entry called Dolibarr or use your web browser +to call page http://localhost/dolibarr + + + +II - DOLIBARR UPGRADE +--------------------- + +Dolibarr files and its dependencies are automatically upgraded when you install +the dolibarr Debian package. + +Once new package is installed, go on menu entry called Dolibarr or use your web browser +to call page http://localhost/dolibarr +If a database upgrade is required, you will be prompted to. + + + +III - WHAT'S NEW +---------------- + +See ChangeLog file. + + + +IV - WHAT DOLIBARR CAN DO +------------------------- + +Main modules/features: +- Products and services catalog +- Customers, Prospects or Suppliers directory +- Address book +- Stock management +- Bank accounts management +- Orders management with PDF export +- Commercial proposals management with PDF export +- Contracts management +- Invoices management with PDF export +- Payments management +- Standing orders management +- Shipping management +- ECM (Electronic Content Management) +- EMailings +- Agenda with ical,vcal export for third tools integration +- Management of foundation members +- Donation management + +Other modules: +- Bookmarks management +- Can reports Dolibarr events inside Webcalendar or Phenix +- Data export tools +- LDAP connectivity +- Third parties or products categories +- ClickToDial phone numbers +- RSS + +Miscellanous: +- Mutli-user, with several permissions levels for each feature. +- Serveral menu managers (can be used by internal users, as a back-office, + with a particular menu, or by external users, as a front-office, with + another menu and permissions). +- Very user friendly and easy to use. +- Optional WYSIWYG forms, optional Ajax forms. +- Several skins. +- Code is highly customizable (a lot of use of modules and submodules). +- Works with Mysql 3.1 or higher, experimental support for PostgreSql. +- Works with PHP 4.3 or higher. +- An easy to understand and maintain code (PHP with no heavy frameworks). +- A trigger architecture to allow you to make Dolibarr business events run + PHP code to update your own information system. +- "NPR VAT Rate" (French particularity for managing VAT in DOM-TOM + called "Non Perçue Récupérable"). + + + +V - WHAT DOLIBARR CAN'T DO YET (TODO LIST) +------------------------------------------ +This is features that Dolibarr does not support completely yet: +- Accountancy. +- Dolibarr can manage only one currency. +- Dolibarr does not support the double Canadian Tax. +- Dolibarr does not make coffee (not yet). +- Stock management with option increase/decrease on invoice works on + warehouse number one only (no way to choose warehouse). +- Stock management with option increase/decrease on orders works on + warehouse number one only (no way to choose warehouse). diff --git a/build/deb/control.DEBIAN b/build/deb/control.DEBIAN index 627298d5b91..7c66775bdf1 100755 --- a/build/deb/control.DEBIAN +++ b/build/deb/control.DEBIAN @@ -3,10 +3,9 @@ Version: __VERSION__ Architecture: all Maintainer: Laurent Destailleur Installed-Size: 61200 -Depends: debconf, xdg-utils, apache2, libapache2-mod-php5, php5, php5-cli, php5-cgi, php5-curl, php5-gd, php5-ldap, php5-mysql, php-pear, php-mail-mime, mysql-server, perl +Depends: xdg-utils, apache2, libapache2-mod-php5, php5, php5-cli, php5-cgi, php5-curl, php5-gd, php5-ldap, php5-mysql, php-pear, php-mail-mime, mysql-server, perl Section: web Priority: optional -Recommends: firefox Homepage: http://www.dolibarr.org Description: Easy to use web based ERP & CRM software Dolibarr ERP & CRM is an easy to use open source/free software for small @@ -20,28 +19,28 @@ Description: Easy to use web based ERP & CRM software Only features you need are visible, depending on which module were activated. Most common used modules are: . - Customers, Suppliers or Prospects directory - Contacts directory - Orders management - Commercial proposals management - Invoices management - Products and services catalog - Stock management - Foundations members management - Bank accounts management - Point of Sale - Payments management - Commercial actions management - Contracts management - Standing orders management - Shipping management - Donations management - Bookmarks management - Mass Emailings - Reports - Data export and import tools - LDAP connectivity - PDF exports + Customers, Suppliers or Prospects directory, + Contacts directory, + Orders management, + Commercial proposals management, + Invoices management, + Products and services catalog, + Stock management, + Foundations members management, + Bank accounts management, + Point of Sale, + Payments management, + Commercial actions management, + Contracts management, + Standing orders management, + Shipping management, + Donations management, + Bookmarks management, + Mass Emailings, + Reports, + Wizards to export and import data, + LDAP connectivity, + PDF exports, And a lot of more modules... . You can also add third parties external modules or develop yours. diff --git a/build/deb/control.debian b/build/deb/control.debian index ae498d71ef7..91f0705c001 100755 --- a/build/deb/control.debian +++ b/build/deb/control.debian @@ -4,14 +4,13 @@ Standards-Version: 3.9.1 Section: web Priority: optional Homepage: http://www.dolibarr.org -Build-Depends: debhelper +Build-Depends: debhelper, po-debconf Package: dolibarr -Depends: ${misc:Depends}, debconf, xdg-utils, apache2, libapache2-mod-php5, php5, php5-cli, php5-cgi, php5-curl, php5-gd, php5-ldap, php5-mysql, php-pear, php-mail-mime, mysql-server, perl +Depends: ${misc:Depends}, xdg-utils, apache2, libapache2-mod-php5, php5, php5-cli, php5-cgi, php5-curl, php5-gd, php5-ldap, php5-mysql, php-pear, php-mail-mime, mysql-server, perl Architecture: all Section: web Priority: optional -Recommends: firefox Homepage: http://www.dolibarr.org Description: Easy to use web based ERP & CRM software Dolibarr ERP & CRM is an easy to use open source/free software for small @@ -25,28 +24,28 @@ Description: Easy to use web based ERP & CRM software Only features you need are visible, depending on which module were activated. Most common used modules are: . - Customers, Suppliers or Prospects directory - Contacts directory - Orders management - Commercial proposals management - Invoices management - Products and services catalog - Stock management - Foundations members management - Bank accounts management - Point of Sale - Payments management - Commercial actions management - Contracts management - Standing orders management - Shipping management - Donations management - Bookmarks management - Mass Emailings - Reports - Data export and import tools - LDAP connectivity - PDF exports + Customers, Suppliers or Prospects directory, + Contacts directory, + Orders management, + Commercial proposals management, + Invoices management, + Products and services catalog, + Stock management, + Foundations members management, + Bank accounts management, + Point of Sale, + Payments management, + Commercial actions management, + Contracts management, + Standing orders management, + Shipping management, + Donations management, + Bookmarks management, + Mass Emailings, + Reports, + Wizards to export and import data, + LDAP connectivity, + PDF exports, And a lot of more modules... . You can also add third parties external modules or develop yours. \ No newline at end of file diff --git a/build/deb/docs b/build/deb/docs deleted file mode 100644 index 30d29dea9be..00000000000 --- a/build/deb/docs +++ /dev/null @@ -1 +0,0 @@ -doc/* diff --git a/build/deb/examples b/build/deb/examples deleted file mode 100755 index aa4824411d6..00000000000 --- a/build/deb/examples +++ /dev/null @@ -1 +0,0 @@ -usr/share/dolibarr/htdocs/conf/conf.php.example \ No newline at end of file diff --git a/build/deb/files b/build/deb/files deleted file mode 100644 index a75e2371260..00000000000 --- a/build/deb/files +++ /dev/null @@ -1,2 +0,0 @@ -etc -usr diff --git a/build/deb/install b/build/deb/install new file mode 100755 index 00000000000..4d41fd52c65 --- /dev/null +++ b/build/deb/install @@ -0,0 +1,5 @@ +etc/dolibarr/apache.conf +usr/share/applications/dolibarr.desktop +usr/share/doc/dolibarr +usr/share/dolibarr +usr/share/pixmaps diff --git a/build/deb/install.forced.php.install b/build/deb/install.forced.php.install index 1166abe41ae..c266426209b 100755 --- a/build/deb/install.forced.php.install +++ b/build/deb/install.forced.php.install @@ -4,13 +4,13 @@ // This file must be present into htdocs/install directory // during install process to be used. // -// $Id: install.forced.php.install,v 1.7 2011/07/09 15:48:19 eldy Exp $ +// $Id: install.forced.php.install,v 1.8 2011/07/27 16:45:47 eldy Exp $ // $force_install_noedit=1; $force_install_message='KeepDefaultValuesDeb'; -$force_install_main_data_root='/usr/share/dolibarr/documents'; -#$force_install_main_data_root='/var/lib/dolibarr'; +#$force_install_main_data_root='/usr/share/dolibarr/documents'; +$force_install_main_data_root='/var/lib/dolibarr/documents'; $force_install_type='mysqli'; $force_install_dbserver='localhost'; $force_install_port='3306'; diff --git a/build/deb/menu b/build/deb/menu deleted file mode 100644 index 6dc724d0a02..00000000000 --- a/build/deb/menu +++ /dev/null @@ -1,3 +0,0 @@ -# This file seems to be useless for Ubuntu -# Good way to add menu on Ubuntu is adding file dolibarr.desktop -text Apps/Misc dolibarr none "Dolibarr ERP/CRM" rundolibarr.sh \ No newline at end of file diff --git a/build/deb/po/fr.po b/build/deb/po/fr.po new file mode 100755 index 00000000000..abb15a879a1 --- /dev/null +++ b/build/deb/po/fr.po @@ -0,0 +1,42 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id: dolibarr\n" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-07-29 04:31+0100\n" +"PO-Revision-Date: 2011-07-29 22:45+0100\n" +"Last-Translator: Laurent Destailleur \n" +"Language-Team: Laurent Destailleur \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +# +#. Description +#: ../templates:dolibarr/postrm +msgid "" +"Delete database and uploaded files ?" +msgstr "" +"Effacer la base de donnée et les fichiers uploadés ?" + +# +#. Description +#: ../templates:dolibarr/postrm +msgid "" +"Answer if you want to removed the Dolibarr MySQL database and all other datas (datas related to this question are the Dolibarr DBMS account, all Dolibarr tables, and all uploaded files)." +msgstr "" +"Indiquez si vous voulez supprimer la base Dolibarr et toutes ces données (les données en question ici sont les comptes de la base, les tables et tous les fichiers téléchargés)." + \ No newline at end of file diff --git a/build/deb/po/messages.mo b/build/deb/po/messages.mo new file mode 100755 index 00000000000..0de55a6ee38 Binary files /dev/null and b/build/deb/po/messages.mo differ diff --git a/build/deb/postinst b/build/deb/postinst index 03bd18987cd..0bc4d297b70 100644 --- a/build/deb/postinst +++ b/build/deb/postinst @@ -23,16 +23,16 @@ db_version 2.0 echo Run the dolibarr postinst script + +docdir='/var/lib/dolibarr/documents' +#docdir='/usr/share/dolibarr/documents' + + + case "$1" in configure) - # Copy apache.conf file into target directory - fileorig="/usr/share/dolibarr/build/deb/apache.conf" - config="/etc/dolibarr/apache.conf" - mkdir -p /etc/dolibarr - cp -p $fileorig $config - - # Create install.forced.php into Dolibarr install directory + # Edit install.forced.php to match Debian values fileorig="/usr/share/dolibarr/build/deb/install.forced.php.install" config="/usr/share/dolibarr/htdocs/install/install.forced.php" superuserlogin='' @@ -48,10 +48,8 @@ case "$1" in else cat $fileorig | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $config fi - - # Create document directory - #docdir='/var/lib/dolibarr/documents' - docdir='/usr/share/dolibarr/documents' + + # Create document directory for uploaded data files mkdir -p $docdir chown -R www-data:www-data $docdir chmod -R 775 $docdir @@ -96,10 +94,7 @@ case "$1" in echo Web user.group used is $webuser.$webgroup - # - # That may lead to problems if apache & apache-ssl do - # not have the same user/group. - # + # Set permissions to web server chown -R $webuser:$webgroup /usr/share/dolibarr chown -R root:$webgroup /usr/share/dolibarr/htdocs/conf/conf.php diff --git a/build/deb/postrm b/build/deb/postrm index 0ade4671858..8be194f0a41 100644 --- a/build/deb/postrm +++ b/build/deb/postrm @@ -23,13 +23,12 @@ db_version 2.0 echo Run the dolibarr postrm script -#echo "postrm db_get dolibarr/webserver" -# We disable set -e to avoid premature end of script if error -set +e -#db_get "dolibarr/webserver" || true -set -e -export webserver="$RET" +docdir='/var/lib/dolibarr/documents' +#docdir='/usr/share/dolibarr/documents' + + +export webserver="" # Allows us to loop and substitute in one pass case $webserver in Apache) webservers="apache2" ;; @@ -39,6 +38,7 @@ case $webserver in esac export includefile=/etc/dolibarr/apache.conf + case "$1" in # Call when we uninstall and purge purge) @@ -139,21 +139,25 @@ case "$1" in log="${log}Database $dbname already not exists." fi + echo "Remove directory $docdir" + rm -rf $docdir ; + else - echo "postrm Delete of dolibarr database not wanted" + echo "postrm Delete of dolibarr database and uploaded files not wanted" fi # Remove include files + export restart="" for server in $webservers ; do - # New usage export conffile="/etc/$server/conf.d/dolibarr.conf" if [ -f $conffile ] ; then + echo Delete file $conffile rm -f $conffile status=purge fi - if [ "$status" = "purge" ] ; + if [ "x$status" = "xpurge" ] ; then restart="$restart $server" fi done @@ -161,7 +165,7 @@ case "$1" in rm -rf /etc/dolibarr # Restart servers - for server in $servers ; do + for server in $restart ; do # We disable blocking errors set +e echo "Restart server $server if exists" @@ -175,7 +179,7 @@ case "$1" in done # Remove file and conf file - for dir in /usr/share/dolibarr ; do + for dir in /usr/share/dolibarr; do if [ -d $dir ] ; then # We disable blocking errors set +e @@ -190,8 +194,8 @@ case "$1" in set +e db_reset "dolibarr/postrm" set -e - - db_purge + + #db_purge ;; # Call when we uninstall @@ -201,17 +205,22 @@ case "$1" in echo "postrm Force remove of /usr/share/dolibarr/htdocs/conf" rm -fr /usr/share/dolibarr/htdocs/conf - - #echo "postrm Remove menu entry and image" - #fileorig="/usr/share/applications/dolibarr.desktop" - #rm -f $fileorig - #fileorig="/usr/share/pixmaps/dolibarr.xpm" - #rm -f $fileorig - # Not sure this is usefull - #if test -x /usr/bin/update-menus; then - # echo "update-menus" - # update-menus; - #fi + + # Remove include files + export restart="" + for server in $webservers ; do + export conffile="/etc/$server/conf.d/dolibarr.conf" + if [ -f $conffile ] ; + then + echo Delete file $conffile + rm -f $conffile + status=purge + fi + + if [ "x$status" = "xpurge" ] ; + then restart="$restart $server" + fi + done ;; upgrade) @@ -226,8 +235,8 @@ case "$1" in ;; esac -db_stop - #DEBHELPER# +db_stop + exit 0 diff --git a/build/deb/rules b/build/deb/rules index b353c0fff53..9a3f9a98c7a 100644 --- a/build/deb/rules +++ b/build/deb/rules @@ -1,8 +1,10 @@ #!/usr/bin/make -f -# This is the debhelper compatability version to use. -#export DH_COMPAT=7 # Now defined into compat file +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 +export DH_OPTIONS=-v +#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file %: - dh $@ \ No newline at end of file + dh $@ \ No newline at end of file diff --git a/build/deb/templates b/build/deb/templates index 1903003a9f4..e45bca176b7 100644 --- a/build/deb/templates +++ b/build/deb/templates @@ -1,7 +1,7 @@ Template: dolibarr/postrm Type: boolean Default: true -Description: Delete database ? +Description: Delete database and uploaded files ? Answer if you want to removed the Dolibarr MySQL database and all - its datas (datas related to this quetion are the Dolibarr DBMS account - and all Dolibarr tables). + other datas (datas related to this question are the Dolibarr DBMS + account, all Dolibarr tables, and all uploaded files).