From ad0e78a56ad95798c581d2675feaecc120cf98d8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Feb 2014 16:29:56 +0100 Subject: [PATCH] Fix: debian and ubuntu package --- build/debian/changelog | 4 ++-- build/debian/dolibarr.install | 2 +- build/debian/rules | 5 +++-- build/makepack-dolibarr.pl | 28 ++++++++++++++++++---------- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/build/debian/changelog b/build/debian/changelog index 899d08100d9..b53a9bb741f 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -3,7 +3,7 @@ dolibarr (3.5.0-3) unstable; urgency=low [ Laurent Destailleur (eldy) ] * New upstream release. - -- Laurent Destailleur (eldy) Fri, 31 Jan 2013 12:00:00 +0100 + -- Laurent Destailleur (eldy) Fri, 31 Jan 2014 12:00:00 +0100 dolibarr (3.4.2-3) unstable; urgency=low @@ -24,4 +24,4 @@ dolibarr (3.4.0-3) unstable; urgency=low [ Laurent Destailleur (eldy) ] * Maintenance release. - -- Laurent Destailleur (eldy) Mon, 22 Apr 2013 12:00:00 +0100 + -- Laurent Destailleur (eldy) Mon, 22 Apr 2013 12:00:00 +0100 \ No newline at end of file diff --git a/build/debian/dolibarr.install b/build/debian/dolibarr.install index 106a3b7dcf8..72dff46ed15 100755 --- a/build/debian/dolibarr.install +++ b/build/debian/dolibarr.install @@ -6,7 +6,7 @@ debian/lighttpd/50-dolibarr.conf etc/lighttpd/conf-available/ debian/install.forced.php.install etc/dolibarr/ htdocs usr/share/dolibarr/ scripts usr/share/dolibarr/ -ChangeLog usr/share/doc/dolibarr/ +changelog usr/share/doc/dolibarr/ README usr/share/doc/dolibarr/ doc/install usr/share/doc/dolibarr/ doc/user usr/share/doc/dolibarr/ diff --git a/build/debian/rules b/build/debian/rules index 528924e64d8..b1b7ca09aff 100755 --- a/build/debian/rules +++ b/build/debian/rules @@ -114,8 +114,9 @@ clean: # clean from files to avoid warning of missing dependencies rm -fr htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.py - # Licence files are included into copyright file. - rm -fr htdocs/includes/phpexcel/license.txt + # Licence files are already included into copyright file. + rm -f htdocs/includes/jquery/plugins/flot/LICENSE.txt + rm -f htdocs/includes/phpexcel/license.txt rm -f htdocs/includes/tcpdf/LICENSE.TXT dh $@ diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 4751b9a43c9..964b5b58d98 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -46,7 +46,7 @@ $FILENAMETGZ="$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMEXZ="$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION"; -$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}"; +$FILENAMEDEB="see later"; $FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app"; $FILENAMEEXEDOLIWAMP="DoliWamp-$MAJOR.$MINOR.$BUILD"; if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat @@ -365,6 +365,8 @@ if ($nboftargetok) { $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems. $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems. + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # Keep this removal in case we embed libraries + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; @@ -613,15 +615,17 @@ if ($nboftargetok) { $newbuild =~ s/(dev|alpha)/1/gi; # dev $newbuild =~ s/beta/2/gi; # beta $newbuild =~ s/rc./3/gi; # rc - if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale - # now newbuild is 0-1 or 0-4 for example + if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale is same than rc + # now newbuild is 0-1 or 0-3 for example print "Version is $MAJOR.$MINOR.$newbuild\n"; $build = $newbuild; $build =~ s/-.*$//g; # now build is 0 for example # $build .= '+nmu1'; # now build is 0+nmu1 for example - + + $FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${newbuild}"; + print "Remove target ${FILENAMEDEB}_all.deb...\n"; unlink("$NEWDESTI/${FILENAMEDEB}_all.deb"); print "Remove target ${FILENAMEDEB}.dsc...\n"; @@ -676,12 +680,14 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`; # We remove embedded libraries or fonts (this is also inside rules file, target clean) - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/fonts`, - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/geoip`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/nusoap`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/odtphp/zip/pclzip`; - + #$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor`; + #$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/fonts`, + #$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/geoip`; + #$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/nusoap`; + #$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/odtphp/zip/pclzip`; + # Rename upstream changelog to match debian rules + $ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`; + # Prepare source package (init debian dir) print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n"; $ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`; @@ -753,6 +759,8 @@ if ($nboftargetok) { chdir("$olddir"); + print "You can check package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}_all.deb\"\n"; + # Move to final dir print "Move *_all.deb to $NEWDESTI\n"; $ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;