From 761def3cc0cefae1f6da63d2515bd380425bb8b3 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Mon, 30 Jan 2012 23:57:55 +0100
Subject: [PATCH] Work on debian package

---
 build/debian/README.howto                     |  6 ++--
 build/debian/copyright                        | 32 ++++++++++++++++---
 build/debian/{config => dolibarr.config}      |  0
 build/debian/dolibarr.doc-base                | 10 ++++++
 build/debian/{install => dolibarr.install}    |  3 ++
 build/debian/{postinst => dolibarr.postinst}  |  0
 build/debian/{postrm => dolibarr.postrm}      |  0
 .../debian/{templates => dolibarr.templates}  |  0
 ...mplates.futur => dolibarr.templates.futur} |  0
 build/debian/po/POTFILES.in                   |  2 +-
 build/debian/po/fr.po                         |  2 --
 build/debian/source/format                    |  2 +-
 build/makepack-dolibarr.pl                    | 32 +++++++++----------
 13 files changed, 62 insertions(+), 27 deletions(-)
 rename build/debian/{config => dolibarr.config} (100%)
 create mode 100644 build/debian/dolibarr.doc-base
 rename build/debian/{install => dolibarr.install} (75%)
 rename build/debian/{postinst => dolibarr.postinst} (100%)
 rename build/debian/{postrm => dolibarr.postrm} (100%)
 rename build/debian/{templates => dolibarr.templates} (100%)
 rename build/debian/{templates.futur => dolibarr.templates.futur} (100%)

diff --git a/build/debian/README.howto b/build/debian/README.howto
index 197a2d27886..6e0c7a75d06 100644
--- a/build/debian/README.howto
+++ b/build/debian/README.howto
@@ -17,8 +17,10 @@ with format .DEB (for Debian, Ubuntu, ...).
 #
 # gpg --gen-key                          Generate a GPG key
 #
-# debconf-updatepo					     To run into po dir to regenate templates.pot 
-# podebconf-report-po --from eldy@destailleur.fr	To send email to ask translations
+# debconf-updatepo					     		To run into po dir to regenate templates.pot
+# podebconf-report-po --from email@email.com	To send email to ask translations
+# Edit manually file XX.po and remove all lines "#, fuzzy" when translation is complete
+# msgfmt -v -c -o /dev/null XX.po		 		To have status of translation for language XX 
 #
 # lintian --pedantic -E -I package.deb   To test a package   
 #
diff --git a/build/debian/copyright b/build/debian/copyright
index e63fa08b5db..46f70f5bd00 100644
--- a/build/debian/copyright
+++ b/build/debian/copyright
@@ -5,24 +5,39 @@ Source: git@github.com:Dolibarr/dolibarr.git
 
 Files: *
 Copyright: 2002-2009, Rodolphe Quiedeville   <rodolphe@quiedeville.org>
-           2003-2011, Laurent Destailleur    <eldy@users.sourceforge.net>
-           2004-2011, Regis Houssin          <regis@dolibarr.fr>
-           2006-2011, Auguria SARL           <info@auguria.org>
-           2010-2011, Juanjo Menent          <jmenent@2byte.es>
            2003-2006, Jean-Louis Bergamo     <jlb@j1b.org>
+           2003-2012, Laurent Destailleur    <eldy@users.sourceforge.net>
            2003, Xavier Dutoit               <doli@sydesy.com>
+           2004-2012, Regis Houssin          <regis@dolibarr.fr>
            2004, Sebastien Di Cintio         <sdicintio@ressource-toi.org>
            2004, Benoit Mortier              <benoit.mortier@opensides.be>
            2004, Christophe Combelles        <ccomb@free.fr>
+           2004, Guillaume Delecourt         <guillaume.delecourt@opensides.be>
            2004, Eric Seigne                 <eric.seigne@ryxeo.com>
+           2005, Brice Davoleau              <brice.davoleau@gmail.com>
+           2005, Kai Blankenhorn             <kaib@bitfolge.de>
+           2005-2006, Marc Barilley/Ocebo    <marc@ocebo.com>
+           2005, Matthieu Valleton           <mv@seeschloss.org>
            2005, Patrick Rouillon            <patrick@rouillon.net>
-           2005, Marc Barilley / Ocebo       <marc@ocebo.com>
+           2005, Simon TOSSER                <simon@kornog-computing.com>
            2006, Andre Cianfarani            <acianfa@free.fr>
+           2006-2011, Auguria SARL           <info@auguria.org>
            2006, Jean Heimburger             <jean@tiaris.info>
+           2006, Roman Ozana                 <ozana@omdesign.cz>
+           2006, Yannick Warnier             <ywarnier@beeznest.org>
            2007, Patrick Raguin              <patrick.raguin@gmail.com>
+           2007, Franky Van Liedekerke       <franky.van.liedekerker@telenet.be>
            2007-2008, Jeremie Ollivier       <jeremie.o@laposte.net>
+           2008, Matteli                     <unknown@unknown.com>
            2008, Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
+           2010, Francois Legastelois        <flegastelois@teclib.com>
+           2010-2012, Juanjo Menent          <jmenent@2byte.es>
+           2010-2012, Philippe Grand         <philippe.grand@atoo-net.com>
+           2010, Pierre Morin                <pierre.morin@auguria.net>
            2010, Servitux Servicios Informaticos <info@servitux.es>
+           2011, Herve Prot                  <herve.prot@symeos.com>
+           2011, Remy Younes                 <ryounes@gmail.com>
+           2012, Christophe Battarel         <christophe.battarel@altairis.fr>
 License: GPL-2+
  This program is free software; you can redistribute it
  and/or modify it under the terms of the GNU General Public
@@ -43,6 +58,7 @@ License: GPL-2+
  License version 2 can be found in the file
  `/usr/share/common-licenses/GPL-2'.
 
+
 Files: htdocs/includes/fpdi/*
 Copyright: FPDFI team
 License: GPL-2+
@@ -65,6 +81,7 @@ License: GPL-2+
  License version 2 can be found in the file
  `/usr/share/common-licenses/GPL-2'.
 
+
 Files: htdocs/includes/jquery/*
 Copyright: JQuery team
 License: MIT or GPL-2+
@@ -105,11 +122,13 @@ License: MIT or GPL-2+
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
 
+
 Files: htdocs/includes/jquery/plugins/flot/*
 Copyright: Flot team
 License: Public Domain
  This work is not subject to copyright in any jurisdiction
 
+
 Files: htdocs/includes/jsgantt/*
 Copyright: JSGantt team
 License: GPL-2+
@@ -132,11 +151,13 @@ License: GPL-2+
  License version 2 can be found in the file
  `/usr/share/common-licenses/GPL-2'.
 
+
 Files: htdocs/includes/phpexcel/*
 Copyright: PHPExcel team
 License: LGPL 2.1
  See http://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html
 
+
 Files: htdocs/includes/odtphp/*
 Copyright: 2008, Julien Pauli
            2008, Cyril PIERRE de GEYER 
@@ -161,6 +182,7 @@ License: GPL-2+
  License version 2 can be found in the file
  `/usr/share/common-licenses/GPL-2'.
 
+
 Files: htdocs/includes/tcpdf/*
 Copyright: TCPDF team
 License: LGPL 3.0
diff --git a/build/debian/config b/build/debian/dolibarr.config
similarity index 100%
rename from build/debian/config
rename to build/debian/dolibarr.config
diff --git a/build/debian/dolibarr.doc-base b/build/debian/dolibarr.doc-base
new file mode 100644
index 00000000000..d7d5666d883
--- /dev/null
+++ b/build/debian/dolibarr.doc-base
@@ -0,0 +1,10 @@
+Document: dolibarr
+Title: Dolibarr ERP & CRM documentation
+Author: Dolibarr team
+Abstract: This documentation covers the install, use and administration of
+ Dolibarr ERP & CRM software. 
+Section: Office
+
+Format: HTML
+Index: /usr/share/doc/dolibarr/index.html
+Files: /usr/share/doc/dolibarr/*.html
\ No newline at end of file
diff --git a/build/debian/install b/build/debian/dolibarr.install
similarity index 75%
rename from build/debian/install
rename to build/debian/dolibarr.install
index 911d25cae8a..beae194006d 100755
--- a/build/debian/install
+++ b/build/debian/dolibarr.install
@@ -2,6 +2,9 @@ debian/dolibarr.desktop usr/share/applications
 debian/dolibarr.xpm usr/share/pixmaps
 ChangeLog usr/share/doc/dolibarr
 README usr/share/doc/dolibarr
+doc/install usr/share/doc/dolibarr
+doc/user usr/share/doc/dolibarr
+doc/index.html usr/share/doc/dolibarr
 build/debian/apache.conf etc/dolibarr
 build/debian/lighttpd.conf etc/dolibarr
 build usr/share/dolibarr
diff --git a/build/debian/postinst b/build/debian/dolibarr.postinst
similarity index 100%
rename from build/debian/postinst
rename to build/debian/dolibarr.postinst
diff --git a/build/debian/postrm b/build/debian/dolibarr.postrm
similarity index 100%
rename from build/debian/postrm
rename to build/debian/dolibarr.postrm
diff --git a/build/debian/templates b/build/debian/dolibarr.templates
similarity index 100%
rename from build/debian/templates
rename to build/debian/dolibarr.templates
diff --git a/build/debian/templates.futur b/build/debian/dolibarr.templates.futur
similarity index 100%
rename from build/debian/templates.futur
rename to build/debian/dolibarr.templates.futur
diff --git a/build/debian/po/POTFILES.in b/build/debian/po/POTFILES.in
index 98e8416d9a3..40130aadd20 100755
--- a/build/debian/po/POTFILES.in
+++ b/build/debian/po/POTFILES.in
@@ -1 +1 @@
-[type: gettext/rfc822deb] templates
\ No newline at end of file
+[type: gettext/rfc822deb] dolibarr.templates
\ No newline at end of file
diff --git a/build/debian/po/fr.po b/build/debian/po/fr.po
index 3bbe762283a..a96cd360299 100755
--- a/build/debian/po/fr.po
+++ b/build/debian/po/fr.po
@@ -45,7 +45,6 @@ msgstr ""
 #. Type: boolean
 #. Description
 #: ../templates:2001
-#, fuzzy
 msgid "Delete database and uploaded files ?"
 msgstr "Effacer la base de donnée et les fichiers uploadés ?"
 
@@ -53,7 +52,6 @@ msgstr "Effacer la base de donnée et les fichiers uploadés ?"
 #. Type: boolean
 #. Description
 #: ../templates:2001
-#, fuzzy
 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 "
diff --git a/build/debian/source/format b/build/debian/source/format
index 9f8e9b69a33..9f6742789cd 100644
--- a/build/debian/source/format
+++ b/build/debian/source/format
@@ -1 +1 @@
-1.0
\ No newline at end of file
+3.0 (native)
\ No newline at end of file
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index 21a0f53096c..2d7ec389c59 100644
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -569,20 +569,19 @@ if ($nboftargetok) {
             $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/debian/source`;
             $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/changelog`;
             $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/compat`;
-            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/config`;
             $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/control*`;
             $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/copyright`;
+            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.config`;
             $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.desktop`;
+            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.doc-base`;
+            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.install`;
             $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.lintian-overrides`;
-            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/format`;
-            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/install`;
-            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/menu`;
-            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/postrm`;
-            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/postinst`;
+            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.postrm`;
+            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.postinst`;
+            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.templates`;
+            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.templates.futur`;
             $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/rules`;
             $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/README.howto`;
-            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/templates`;
-            $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/templates.futur`;
             $ret=`rm -f  $BUILDROOT/$PROJECT.tmp/build/debian/wash`;
             $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/doap`;
             $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/exe`;
@@ -608,20 +607,21 @@ if ($nboftargetok) {
             $ret=`cp -f  "$SOURCE/build/debian/compat"         "$BUILDROOT/$PROJECT.tmp/debian"`;
             $ret=`cp -f  "$SOURCE/build/debian/control"        "$BUILDROOT/$PROJECT.tmp/debian"`;
             $ret=`cp -f  "$SOURCE/build/debian/copyright"      "$BUILDROOT/$PROJECT.tmp/debian"`;
-            $ret=`cp -f  "$SOURCE/build/debian/dolibarr.xpm"  		      	"$BUILDROOT/$PROJECT.tmp/debian"`;
             $ret=`cp -f  "$SOURCE/build/debian/dolibarr.desktop"        	"$BUILDROOT/$PROJECT.tmp/debian"`;
+            $ret=`cp -f  "$SOURCE/build/debian/dolibarr.doc-base"        	"$BUILDROOT/$PROJECT.tmp/debian"`;
+            $ret=`cp -f  "$SOURCE/build/debian/dolibarr.install" 	        "$BUILDROOT/$PROJECT.tmp/debian"`;
             $ret=`cp -f  "$SOURCE/build/debian/dolibarr.lintian-overrides"  "$BUILDROOT/$PROJECT.tmp/debian"`;
-            $ret=`cp -f  "$SOURCE/build/debian/install"        "$BUILDROOT/$PROJECT.tmp/debian"`;
-            $ret=`cp -fr "$SOURCE/build/debian/patches"        "$BUILDROOT/$PROJECT.tmp/debian"`;
-            $ret=`cp -fr "$SOURCE/build/debian/po"             "$BUILDROOT/$PROJECT.tmp/debian"`;
+            $ret=`cp -f  "$SOURCE/build/debian/dolibarr.xpm"  		      	"$BUILDROOT/$PROJECT.tmp/debian"`;
             $ret=`cp -f  "$SOURCE/build/debian/README.source"  "$BUILDROOT/$PROJECT.tmp/debian"`;
             $ret=`cp -f  "$SOURCE/build/debian/rules"          "$BUILDROOT/$PROJECT.tmp/debian"`;
+            $ret=`cp -fr "$SOURCE/build/debian/patches"        "$BUILDROOT/$PROJECT.tmp/debian"`;
+            $ret=`cp -fr "$SOURCE/build/debian/po"             "$BUILDROOT/$PROJECT.tmp/debian"`;
             $ret=`cp -fr "$SOURCE/build/debian/source"         "$BUILDROOT/$PROJECT.tmp/debian"`;
             # Add files also required to build binary package
-            $ret=`cp -f  "$SOURCE/build/debian/config"         "$BUILDROOT/$PROJECT.tmp/debian"`;
-            $ret=`cp -f  "$SOURCE/build/debian/postinst"       "$BUILDROOT/$PROJECT.tmp/debian"`;
-            $ret=`cp -f  "$SOURCE/build/debian/postrm"         "$BUILDROOT/$PROJECT.tmp/debian"`;
-            $ret=`cp -f  "$SOURCE/build/debian/templates"      "$BUILDROOT/$PROJECT.tmp/debian"`;
+            $ret=`cp -f  "$SOURCE/build/debian/dolibarr.config"         "$BUILDROOT/$PROJECT.tmp/debian"`;
+            $ret=`cp -f  "$SOURCE/build/debian/dolibarr.postinst"       "$BUILDROOT/$PROJECT.tmp/debian"`;
+            $ret=`cp -f  "$SOURCE/build/debian/dolibarr.postrm"         "$BUILDROOT/$PROJECT.tmp/debian"`;
+            $ret=`cp -f  "$SOURCE/build/debian/dolibarr.templates"      "$BUILDROOT/$PROJECT.tmp/debian"`;
             
 			# Set owners and permissions
             print "Set owners on files/dir\n";
-- 
GitLab