forked from Wavyzz/dolibarr
Compare commits
1 Commits
4.0.0-beta
...
3.5.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5df06d3f5e |
@@ -2,10 +2,10 @@ Source: dolibarr
|
|||||||
Section: web
|
Section: web
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||||
Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
# Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net> # Only if differs from Maintainer
|
||||||
Standards-Version: 3.9.4
|
Standards-Version: 3.9.4
|
||||||
Homepage: http://www.dolibarr.org
|
Homepage: http://www.dolibarr.org
|
||||||
Build-Depends: debhelper (>= 9), po-debconf, dpatch
|
Build-Depends: debhelper (>= 9), po-debconf
|
||||||
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
|
||||||
@@ -30,7 +30,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
|||||||
${perl:Depends}
|
${perl:Depends}
|
||||||
Recommends: mysql-client, apache2 | lighttpd | httpd
|
Recommends: mysql-client, apache2 | lighttpd | httpd
|
||||||
Suggests: www-browser
|
Suggests: www-browser
|
||||||
Description: Web based software to manage a small company or foundation
|
Description: Web based software to manage a 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
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
install.dpatch
|
|
||||||
1
build/debian/patches/series
Normal file
1
build/debian/patches/series
Normal file
@@ -0,0 +1 @@
|
|||||||
|
use-etc-dolibarr-conf.patch
|
||||||
40
build/debian/patches/install.dpatch → build/debian/patches/use-etc-dolibarr-conf.patch
Executable file → Normal file
40
build/debian/patches/install.dpatch → build/debian/patches/use-etc-dolibarr-conf.patch
Executable file → Normal file
@@ -1,17 +1,17 @@
|
|||||||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
Description: Enable /etc/dolibarr/conf.php so that we use packaged libraries
|
||||||
## install.patch by <eldy@users.sourceforge.net>
|
Update some PHP include files to refer to /etc/dolibarr/conf.php
|
||||||
##
|
instead of the in-tree conf/conf.php.
|
||||||
## All lines beginning with `## DP:' are a description of the patch.
|
.
|
||||||
## DP: Updates htdocs/filefunc.inc.php
|
/etc/dolibarr/conf.php configures Dolibarr to use packaged libraries
|
||||||
## DP: Updates htdocs/install/inc.php
|
instead of the embedded ones.
|
||||||
## DP: Updates htdocs/support/inc.php
|
Author: Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
Forwarded: not-needed
|
||||||
@DPATCH@
|
Last-Update: 2013-07-29
|
||||||
|
---
|
||||||
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||||
--- old/htdocs/filefunc.inc.php 2011-09-03 02:32:48.666952000 +0200
|
--- a/htdocs/filefunc.inc.php
|
||||||
+++ new/htdocs/filefunc.inc.php 2011-09-03 02:33:00.510952001 +0200
|
+++ b/htdocs/filefunc.inc.php
|
||||||
@@ -63,8 +63,8 @@
|
@@ -63,8 +63,8 @@ $conffiletoshowshort = "conf.php";
|
||||||
$conffile = "conf/conf.php";
|
$conffile = "conf/conf.php";
|
||||||
$conffiletoshow = "htdocs/conf/conf.php";
|
$conffiletoshow = "htdocs/conf/conf.php";
|
||||||
// For debian/redhat like systems
|
// For debian/redhat like systems
|
||||||
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
|
|
||||||
// Include configuration
|
// Include configuration
|
||||||
--- old/htdocs/install/inc.php 2011-09-03 02:33:26.450952000 +0200
|
--- a/htdocs/install/inc.php
|
||||||
+++ new/htdocs/install/inc.php 2011-09-03 02:33:36.286952001 +0200
|
+++ b/htdocs/install/inc.php
|
||||||
@@ -71,8 +71,8 @@
|
@@ -73,8 +73,8 @@ $conffiletoshowshort = "conf.php";
|
||||||
$conffile = "../conf/conf.php";
|
$conffile = "../conf/conf.php";
|
||||||
$conffiletoshow = "htdocs/conf/conf.php";
|
$conffiletoshow = "htdocs/conf/conf.php";
|
||||||
// For debian/redhat like systems
|
// For debian/redhat like systems
|
||||||
@@ -35,9 +35,9 @@
|
|||||||
|
|
||||||
|
|
||||||
if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
||||||
--- old/htdocs/support/inc.php 2011-09-03 02:34:39.606952000 +0200
|
--- a/htdocs/support/inc.php
|
||||||
+++ new/htdocs/support/inc.php 2011-09-03 02:33:59.814952000 +0200
|
+++ b/htdocs/support/inc.php
|
||||||
@@ -69,8 +69,8 @@
|
@@ -69,8 +69,8 @@ $conffiletoshowshort = "conf.php";
|
||||||
$conffile = "../conf/conf.php";
|
$conffile = "../conf/conf.php";
|
||||||
$conffiletoshow = "htdocs/conf/conf.php";
|
$conffiletoshow = "htdocs/conf/conf.php";
|
||||||
// For debian/redhat like systems
|
// For debian/redhat like systems
|
||||||
@@ -7,29 +7,11 @@ export DH_OPTIONS=-v
|
|||||||
#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file
|
#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file
|
||||||
|
|
||||||
|
|
||||||
# use dpatch
|
%:
|
||||||
include /usr/share/dpatch/dpatch.make
|
|
||||||
|
|
||||||
|
|
||||||
configure:
|
|
||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
build: patch
|
override_dh_install:
|
||||||
dh $@
|
dh_install
|
||||||
|
|
||||||
build-arch: patch
|
|
||||||
dh $@
|
|
||||||
|
|
||||||
build-indep: patch
|
|
||||||
dh $@
|
|
||||||
|
|
||||||
binary:
|
|
||||||
dh $@
|
|
||||||
|
|
||||||
binary-indep:
|
|
||||||
dh $@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
# Delete files
|
# Delete files
|
||||||
rm -f .buildpath
|
rm -f .buildpath
|
||||||
rm -fr .cache
|
rm -fr .cache
|
||||||
@@ -119,7 +101,16 @@ clean:
|
|||||||
rm -f htdocs/includes/phpexcel/license.txt
|
rm -f htdocs/includes/phpexcel/license.txt
|
||||||
rm -f htdocs/includes/tcpdf/LICENSE.TXT
|
rm -f htdocs/includes/tcpdf/LICENSE.TXT
|
||||||
|
|
||||||
dh $@
|
# Drop unwanted executable permissions
|
||||||
|
find debian/dolibarr/usr/share/dolibarr/htdocs -type f -print0 | \
|
||||||
|
xargs -0 chmod 644
|
||||||
|
# Add missing executable permissions
|
||||||
|
find debian/dolibarr/usr/share/dolibarr/scripts -type f -name '*.php' -print0 | \
|
||||||
|
xargs -0 chmod 755
|
||||||
|
|
||||||
binary-arch:
|
override_dh_fixperms:
|
||||||
|
dh_fixperms
|
||||||
|
# Give rights to the webserver on the upload directory
|
||||||
|
chown www-data:www-data debian/dolibarr/var/lib/dolibarr/documents
|
||||||
|
chmod 2775 debian/dolibarr/var/lib/dolibarr/documents
|
||||||
|
|
||||||
@@ -1 +1 @@
|
|||||||
3.0 (native)
|
3.0 (quilt)
|
||||||
@@ -19,8 +19,10 @@ $PROJECT="dolibarr";
|
|||||||
$RPMSUBVERSION="auto"; # auto use value found into BUILD
|
$RPMSUBVERSION="auto"; # auto use value found into BUILD
|
||||||
|
|
||||||
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||||
|
%REQUIREMENTPUBLISH=(
|
||||||
|
"SF"=>"git ssh rsync"
|
||||||
|
);
|
||||||
%REQUIREMENTTARGET=( # Tool requirement for each package
|
%REQUIREMENTTARGET=( # Tool requirement for each package
|
||||||
"SNAPSHOT"=>"tar",
|
|
||||||
"TGZ"=>"tar",
|
"TGZ"=>"tar",
|
||||||
"ZIP"=>"7z",
|
"ZIP"=>"7z",
|
||||||
"XZ"=>"xz",
|
"XZ"=>"xz",
|
||||||
@@ -28,9 +30,10 @@ $RPMSUBVERSION="auto"; # auto use value found into BUILD
|
|||||||
"RPM_FEDORA"=>"rpmbuild",
|
"RPM_FEDORA"=>"rpmbuild",
|
||||||
"RPM_MANDRIVA"=>"rpmbuild",
|
"RPM_MANDRIVA"=>"rpmbuild",
|
||||||
"RPM_OPENSUSE"=>"rpmbuild",
|
"RPM_OPENSUSE"=>"rpmbuild",
|
||||||
"DEB"=>"dpkg dpatch",
|
"DEB"=>"dpkg",
|
||||||
"APS"=>"zip",
|
"APS"=>"zip",
|
||||||
"EXEDOLIWAMP"=>"ISCC.exe"
|
"EXEDOLIWAMP"=>"ISCC.exe",
|
||||||
|
"SNAPSHOT"=>"tar"
|
||||||
);
|
);
|
||||||
%ALTERNATEPATH=(
|
%ALTERNATEPATH=(
|
||||||
"7z"=>"7-ZIP",
|
"7z"=>"7-ZIP",
|
||||||
@@ -55,6 +58,7 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
|||||||
|
|
||||||
$SOURCE="$DIR/..";
|
$SOURCE="$DIR/..";
|
||||||
$DESTI="$SOURCE/build";
|
$DESTI="$SOURCE/build";
|
||||||
|
$PUBLISH="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
|
||||||
if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
|
if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
|
||||||
{
|
{
|
||||||
print "Error: Missing environment variables.\n";
|
print "Error: Missing environment variables.\n";
|
||||||
@@ -124,13 +128,41 @@ $FILENAMESNAPSHOT = "$PROJECT-snapshot";
|
|||||||
$FILENAMETGZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
$FILENAMETGZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||||
$FILENAMEZIP = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
$FILENAMEZIP = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||||
$FILENAMEXZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
$FILENAMEXZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||||
$FILENAMERPM = "$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
|
|
||||||
$FILENAMEDEB = "see later";
|
$FILENAMEDEB = "see later";
|
||||||
$FILENAMEAPS = "$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
$FILENAMEAPS = "$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
||||||
$FILENAMEEXEDOLIWAMP = "DoliWamp-$MAJOR.$MINOR.$BUILD";
|
$FILENAMEEXEDOLIWAMP = "DoliWamp-$MAJOR.$MINOR.$BUILD";
|
||||||
|
# For RPM
|
||||||
|
$ARCH='noarch';
|
||||||
|
$newbuild = $BUILD;
|
||||||
|
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev (fedora)
|
||||||
|
$newbuild =~ s/beta/0.2.beta1/gi; # beta (fedora)
|
||||||
|
$newbuild =~ s/rc./0.3.rc1/gi; # rc (fedora)
|
||||||
|
if ($newbuild !~ /-/) { $newbuild.='-0.3'; } # finale (fedora)
|
||||||
|
#$newbuild =~ s/(dev|alpha)/0/gi; # dev
|
||||||
|
#$newbuild =~ s/beta/1/gi; # beta
|
||||||
|
#$newbuild =~ s/rc./2/gi; # rc
|
||||||
|
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
|
||||||
|
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
|
||||||
|
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
|
||||||
|
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
|
||||||
|
$FILENAMERPM=$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm";
|
||||||
|
# For Deb
|
||||||
|
$newbuild = $BUILD;
|
||||||
|
$newbuild =~ s/(dev|alpha)/1/gi; # dev
|
||||||
|
$newbuild =~ s/beta/2/gi; # beta
|
||||||
|
$newbuild =~ s/rc./3/gi; # rc
|
||||||
|
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale is same than rc.
|
||||||
|
# now newbuild is 0-1 or 0-3 for example. Note that for native package (see debian/source/format), we should not use a dash part but to get a better version management
|
||||||
|
$build = $newbuild;
|
||||||
|
$build =~ s/-.*$//g;
|
||||||
|
# now build is 0 for example
|
||||||
|
# $build .= '+nmu1';
|
||||||
|
# now build is 0+nmu1 for example
|
||||||
|
$FILENAMEDEBNATIVE="${PROJECT}_${MAJOR}.${MINOR}.${build}";
|
||||||
|
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${newbuild}";
|
||||||
|
|
||||||
|
|
||||||
my $copyalreadydone=0; # Use "-" before number of choice to avoid copy
|
my $copyalreadydone=0;
|
||||||
my $batch=0;
|
my $batch=0;
|
||||||
for (0..@ARGV-1) {
|
for (0..@ARGV-1) {
|
||||||
if ($ARGV[$_] =~ /^-*target=(\w+)/i) { $target=$1; $batch=1; }
|
if ($ARGV[$_] =~ /^-*target=(\w+)/i) { $target=$1; $batch=1; }
|
||||||
@@ -140,40 +172,47 @@ for (0..@ARGV-1) {
|
|||||||
$FILENAMESNAPSHOT.="-".$PREFIX;
|
$FILENAMESNAPSHOT.="-".$PREFIX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTI is defined
|
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTIBETARC is defined
|
||||||
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTI is defined
|
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTISTABLE is defined
|
||||||
|
if ($ENV{"PUBLISHBETARC"} && $BUILD =~ /[a-z]/i) { $PUBLISH = $ENV{"PUBLISHBETARC"}; } # Force target site for publishing if env PUBLISHBETARC is defined
|
||||||
|
if ($ENV{"PUBLISHSTABLE"} && $BUILD =~ /^[0-9]+$/) { $PUBLISH = $ENV{"PUBLISHSTABLE"}; } # Force target site for publishing if env PUBLISHSTABLE is defined
|
||||||
|
|
||||||
print "Makepack version $VERSION\n";
|
print "Makepack version $VERSION\n";
|
||||||
print "Building package name: $PROJECT\n";
|
print "Building/publishing package name: $PROJECT\n";
|
||||||
print "Building package version: $MAJOR.$MINOR.$BUILD\n";
|
print "Building/publishing package version: $MAJOR.$MINOR.$BUILD\n";
|
||||||
print "Source directory (SOURCE): $SOURCE\n";
|
print "Source directory (SOURCE): $SOURCE\n";
|
||||||
print "Target directory (DESTI) : $DESTI\n";
|
print "Target directory (DESTI) : $DESTI\n";
|
||||||
|
print "Publishing target (PUBLISH): $PUBLISH\n";
|
||||||
|
|
||||||
|
|
||||||
# Choose package targets
|
# Choose package targets
|
||||||
#-----------------------
|
#-----------------------
|
||||||
if ($target) {
|
if ($target) {
|
||||||
$CHOOSEDTARGET{uc($target)}=1;
|
if ($target eq "ALL") {
|
||||||
|
foreach my $key (@LISTETARGET) {
|
||||||
|
if ($key ne 'SNAPSHOT' && $key ne 'SF') { $CHOOSEDTARGET{$key}=1; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($target ne "ALL" && $target ne "SF") { $CHOOSEDTARGET{uc($target)}=1; }
|
||||||
|
if ($target eq "SF") { $CHOOSEDPUBLISH{"SF"}=1; }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my $found=0;
|
my $found=0;
|
||||||
my $NUM_SCRIPT;
|
my $NUM_SCRIPT;
|
||||||
while (! $found) {
|
|
||||||
my $cpt=0;
|
my $cpt=0;
|
||||||
printf(" %2d - %-12s (%s)\n",$cpt,"All (Except SNAPSHOT)","Need ".join(",",values %REQUIREMENTTARGET));
|
while (! $found) {
|
||||||
|
printf(" %2d - %-12s (%s)\n",$cpt,"ALL (1..9)","Need ".join(",",values %REQUIREMENTTARGET));
|
||||||
foreach my $target (@LISTETARGET) {
|
foreach my $target (@LISTETARGET) {
|
||||||
$cpt++;
|
$cpt++;
|
||||||
printf(" %2d - %-12s (%s)\n",$cpt,$target,"Need ".$REQUIREMENTTARGET{$target});
|
printf(" %2d - %-12s (%s)\n",$cpt,$target,"Need ".$REQUIREMENTTARGET{$target});
|
||||||
}
|
}
|
||||||
|
$cpt=99;
|
||||||
|
printf(" %2d - %-12s (%s)\n",$cpt,"SF (publish)","Need ".join(",",values %REQUIREMENTPUBLISH));
|
||||||
|
|
||||||
# On demande de choisir le fichier à passer
|
# Ask which target to build
|
||||||
print "Choose one package number or several separated with space (0 - ".$cpt."): ";
|
print "Choose one package number or several separated with space (0 - ".$cpt."): ";
|
||||||
$NUM_SCRIPT=<STDIN>;
|
$NUM_SCRIPT=<STDIN>;
|
||||||
chomp($NUM_SCRIPT);
|
chomp($NUM_SCRIPT);
|
||||||
if ($NUM_SCRIPT =~ s/-//g) {
|
|
||||||
# Do not do copy
|
|
||||||
$copyalreadydone=1;
|
|
||||||
}
|
|
||||||
if ($NUM_SCRIPT !~ /^[0-9\s]+$/)
|
if ($NUM_SCRIPT !~ /^[0-9\s]+$/)
|
||||||
{
|
{
|
||||||
print "This is not a valid package number list.\n";
|
print "This is not a valid package number list.\n";
|
||||||
@@ -185,14 +224,19 @@ else {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
if ($NUM_SCRIPT) {
|
if ($NUM_SCRIPT eq "99") {
|
||||||
foreach my $num (split(/\s+/,$NUM_SCRIPT)) {
|
$CHOOSEDPUBLISH{"SF"}=1;
|
||||||
$CHOOSEDTARGET{$LISTETARGET[$num-1]}=1;
|
}
|
||||||
|
else {
|
||||||
|
if ($NUM_SCRIPT eq "0") {
|
||||||
|
foreach my $key (@LISTETARGET) {
|
||||||
|
if ($key ne 'SNAPSHOT' && $key ne 'SF') { $CHOOSEDTARGET{$key}=1; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
foreach my $key (@LISTETARGET) {
|
foreach my $num (split(/\s+/,$NUM_SCRIPT)) {
|
||||||
if ($key ne 'SNAPSHOT') { $CHOOSEDTARGET{$key}=1; }
|
$CHOOSEDTARGET{$LISTETARGET[$num-1]}=1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -210,7 +254,8 @@ foreach my $target (keys %CHOOSEDTARGET) {
|
|||||||
}
|
}
|
||||||
$atleastonerpm=1;
|
$atleastonerpm=1;
|
||||||
}
|
}
|
||||||
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target})) {
|
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target}))
|
||||||
|
{
|
||||||
# Test
|
# Test
|
||||||
print "Test requirement for target $target: Search '$req'... ";
|
print "Test requirement for target $target: Search '$req'... ";
|
||||||
$newreq=$req; $newparam='';
|
$newreq=$req; $newparam='';
|
||||||
@@ -245,16 +290,20 @@ print "\n";
|
|||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
$nboftargetok=0;
|
$nboftargetok=0;
|
||||||
$nboftargetneedbuildroot=0;
|
$nboftargetneedbuildroot=0;
|
||||||
$nboftargetneedcvs=0;
|
$nbofpublishneedtag=0;
|
||||||
foreach my $target (keys %CHOOSEDTARGET) {
|
foreach my $target (keys %CHOOSEDTARGET) {
|
||||||
if ($CHOOSEDTARGET{$target} < 0) { next; }
|
if ($CHOOSEDTARGET{$target} < 0) { next; }
|
||||||
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP')
|
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP')
|
||||||
{
|
{
|
||||||
$nboftargetneedbuildroot++;
|
$nboftargetneedbuildroot++;
|
||||||
}
|
}
|
||||||
if ($target eq 'SNAPSHOT')
|
$nboftargetok++;
|
||||||
|
}
|
||||||
|
foreach my $target (keys %CHOOSEDPUBLISH) {
|
||||||
|
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||||
|
if ($target eq 'SF')
|
||||||
{
|
{
|
||||||
$nboftargetneedcvs++;
|
$nbofpublishneedtag++;
|
||||||
}
|
}
|
||||||
$nboftargetok++;
|
$nboftargetok++;
|
||||||
}
|
}
|
||||||
@@ -263,13 +312,26 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
# Update CVS if required
|
# Update CVS if required
|
||||||
#-----------------------
|
#-----------------------
|
||||||
if ($nboftargetneedcvs)
|
if ($nbofpublishneedtag)
|
||||||
{
|
{
|
||||||
print "Go to directory $SOURCE\n";
|
print "Go to directory $SOURCE\n";
|
||||||
$olddir=getcwd();
|
$olddir=getcwd();
|
||||||
chdir("$SOURCE");
|
chdir("$SOURCE");
|
||||||
print "Run cvs update -P -d\n";
|
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||||
$ret=`cvs update -P -d 2>&1`;
|
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
|
||||||
|
if ($ret =~ /already exists/)
|
||||||
|
{
|
||||||
|
print "WARNING: Tag ".$MAJOR.'.'.$MINOR.'.'.$BUILD." already exists. Overwrite (y/N) ? ";
|
||||||
|
$QUESTIONOVERWRITETAG=<STDIN>;
|
||||||
|
chomp($QUESTIONOVERWRITETAG);
|
||||||
|
if ($QUESTIONOVERWRITETAG =~ /(o|y)/)
|
||||||
|
{
|
||||||
|
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||||
|
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print 'Run git push --tags'."\n";
|
||||||
|
#$ret=`git push --tags`;
|
||||||
chdir("$olddir");
|
chdir("$olddir");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,11 +355,13 @@ if ($nboftargetok) {
|
|||||||
print "Clean $BUILDROOT\n";
|
print "Clean $BUILDROOT\n";
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.git`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/.git`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitmodules`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/.gitmodules`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/quickbuild.xml`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/quickbuild.xml`;
|
||||||
@@ -328,6 +392,8 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mysql/README`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mysql/README`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`;
|
||||||
|
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`;
|
||||||
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
|
||||||
@@ -366,6 +432,7 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||||
@@ -379,6 +446,7 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`;
|
||||||
@@ -411,7 +479,6 @@ if ($nboftargetok) {
|
|||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
|
|
||||||
print "Compress $BUILDROOT into $FILENAMESNAPSHOT.tgz...\n";
|
print "Compress $BUILDROOT into $FILENAMESNAPSHOT.tgz...\n";
|
||||||
#$cmd="tar --exclude \"$BUILDROOT/tgz/tar_exclude.txt\" --exclude .cache --exclude .settings --exclude conf.php --directory \"$BUILDROOT\" -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
|
|
||||||
$cmd="tar --exclude doli*.tgz --exclude doli*.deb --exclude doli*.exe --exclude doli*.xz --exclude doli*.zip --exclude doli*.rpm --exclude .cache --exclude .settings --exclude conf.php --exclude conf.php.mysql --exclude conf.php.old --exclude conf.php.postgres --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
|
$cmd="tar --exclude doli*.tgz --exclude doli*.deb --exclude doli*.exe --exclude doli*.xz --exclude doli*.zip --exclude doli*.rpm --exclude .cache --exclude .settings --exclude conf.php --exclude conf.php.mysql --exclude conf.php.old --exclude conf.php.postgres --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
|
||||||
print $cmd."\n";
|
print $cmd."\n";
|
||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
@@ -521,30 +588,15 @@ if ($nboftargetok) {
|
|||||||
mkdir($DESTI.'/'.$subdir);
|
mkdir($DESTI.'/'.$subdir);
|
||||||
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
|
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
|
||||||
|
|
||||||
$ARCH='noarch';
|
|
||||||
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
|
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
|
||||||
$newbuild = $BUILD;
|
|
||||||
# For fedora
|
|
||||||
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev
|
|
||||||
$newbuild =~ s/beta/0.2.beta1/gi; # beta
|
|
||||||
$newbuild =~ s/rc./0.3.rc1/gi; # rc
|
|
||||||
if ($newbuild !~ /-/) { $newbuild.='-0.3'; } # finale
|
|
||||||
#$newbuild =~ s/(dev|alpha)/0/gi; # dev
|
|
||||||
#$newbuild =~ s/beta/1/gi; # beta
|
|
||||||
#$newbuild =~ s/rc./2/gi; # rc
|
|
||||||
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
|
|
||||||
#print "newbuild=".$newbuild."\n";exit;
|
|
||||||
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
|
|
||||||
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
|
|
||||||
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
|
|
||||||
|
|
||||||
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
|
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
|
||||||
|
|
||||||
#print "Create directory $RPMDIR\n";
|
#print "Create directory $RPMDIR\n";
|
||||||
#$ret=`mkdir -p "$RPMDIR"`;
|
#$ret=`mkdir -p "$RPMDIR"`;
|
||||||
|
|
||||||
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm...\n";
|
print "Remove target ".$FILENAMERPM."...\n";
|
||||||
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm");
|
unlink("$NEWDESTI/".$FILENAMERPM);
|
||||||
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
|
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
|
||||||
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm");
|
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm");
|
||||||
|
|
||||||
@@ -555,8 +607,8 @@ if ($nboftargetok) {
|
|||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
|
|
||||||
# Set owners
|
# Set owners
|
||||||
print "Set owners on files/dir\n";
|
#print "Set owners on files/dir\n";
|
||||||
$ret=`chown -R root.root $BUILDROOT/$FILENAMETGZ2`;
|
#$ret=`chown -R root.root $BUILDROOT/$FILENAMETGZ2`;
|
||||||
|
|
||||||
print "Set permissions on files/dir\n";
|
print "Set permissions on files/dir\n";
|
||||||
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
|
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
|
||||||
@@ -599,11 +651,9 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
# Move to final dir
|
# Move to final dir
|
||||||
print "Move $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm into $NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm\n";
|
print "Move $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm into $NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm\n";
|
||||||
#$cmd="mv \"$RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\" \"$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\"";
|
|
||||||
$cmd="mv $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm \"$NEWDESTI/\"";
|
$cmd="mv $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm \"$NEWDESTI/\"";
|
||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
print "Move $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm into $NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm\n";
|
print "Move $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm into $NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm\n";
|
||||||
#$cmd="mv \"$RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\" \"$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\"";
|
|
||||||
$cmd="mv $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm \"$NEWDESTI/\"";
|
$cmd="mv $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm \"$NEWDESTI/\"";
|
||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
print "Move $RPMDIR/SOURCES/".$FILENAMETGZ2.".tgz into $NEWDESTI/".$FILENAMETGZ2.".tgz\n";
|
print "Move $RPMDIR/SOURCES/".$FILENAMETGZ2.".tgz into $NEWDESTI/".$FILENAMETGZ2.".tgz\n";
|
||||||
@@ -620,21 +670,6 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
$olddir=getcwd();
|
$olddir=getcwd();
|
||||||
|
|
||||||
$newbuild = $BUILD;
|
|
||||||
$newbuild =~ s/(dev|alpha)/1/gi; # dev
|
|
||||||
$newbuild =~ s/beta/2/gi; # beta
|
|
||||||
$newbuild =~ s/rc./3/gi; # rc
|
|
||||||
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";
|
print "Remove target ${FILENAMEDEB}_all.deb...\n";
|
||||||
unlink("$NEWDESTI/${FILENAMEDEB}_all.deb");
|
unlink("$NEWDESTI/${FILENAMEDEB}_all.deb");
|
||||||
print "Remove target ${FILENAMEDEB}.dsc...\n";
|
print "Remove target ${FILENAMEDEB}.dsc...\n";
|
||||||
@@ -643,6 +678,8 @@ if ($nboftargetok) {
|
|||||||
unlink("$NEWDESTI/${FILENAMEDEB}.tar.gz");
|
unlink("$NEWDESTI/${FILENAMEDEB}.tar.gz");
|
||||||
print "Remove target ${FILENAMEDEB}.changes...\n";
|
print "Remove target ${FILENAMEDEB}.changes...\n";
|
||||||
unlink("$NEWDESTI/${FILENAMEDEB}.changes");
|
unlink("$NEWDESTI/${FILENAMEDEB}.changes");
|
||||||
|
print "Remove target ${FILENAMEDEBNATIVE}.orig.tar.gz...\n";
|
||||||
|
unlink("$NEWDESTI/${FILENAMEDEBNATIVE}.orig.tar.gz");
|
||||||
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build`;
|
||||||
@@ -679,7 +716,7 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.templates.futur`;
|
$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/rules`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/README.howto`;
|
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/README.howto`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/wash`;
|
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/watch`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/doap`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/doap`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/exe`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/exe`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/launchpad`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/launchpad`;
|
||||||
@@ -688,12 +725,6 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/perl`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/perl`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`;
|
$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`;
|
|
||||||
# Rename upstream changelog to match debian rules
|
# Rename upstream changelog to match debian rules
|
||||||
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
|
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
|
||||||
|
|
||||||
@@ -713,6 +744,7 @@ if ($nboftargetok) {
|
|||||||
$ret=`cp -f "$SOURCE/build/debian/dolibarr.xpm" "$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/README.source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
$ret=`cp -f "$SOURCE/build/debian/rules" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -f "$SOURCE/build/debian/rules" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
|
$ret=`cp -f "$SOURCE/build/debian/watch" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
$ret=`cp -fr "$SOURCE/build/debian/patches" "$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/po" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
$ret=`cp -fr "$SOURCE/build/debian/source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -fr "$SOURCE/build/debian/source" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
@@ -727,8 +759,9 @@ if ($nboftargetok) {
|
|||||||
$ret=`cp -f "$SOURCE/build/debian/install.forced.php.install" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
$ret=`cp -f "$SOURCE/build/debian/install.forced.php.install" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||||
|
|
||||||
# Set owners and permissions
|
# Set owners and permissions
|
||||||
print "Set owners on files/dir\n";
|
#print "Set owners on files/dir\n";
|
||||||
$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
|
#$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
|
||||||
|
|
||||||
print "Set permissions on files/dir\n";
|
print "Set permissions on files/dir\n";
|
||||||
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp`;
|
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp`;
|
||||||
$cmd="find $BUILDROOT/$PROJECT.tmp -type f -exec chmod 644 {} \\; ";
|
$cmd="find $BUILDROOT/$PROJECT.tmp -type f -exec chmod 644 {} \\; ";
|
||||||
@@ -757,6 +790,16 @@ if ($nboftargetok) {
|
|||||||
$cmd="mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
$cmd="mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
|
|
||||||
|
|
||||||
|
print "Go into directory $BUILDROOT\n";
|
||||||
|
chdir("$BUILDROOT");
|
||||||
|
|
||||||
|
# We need a tarball to be able to build "quilt" debian package (not required for native but we need patch so it is not a native)
|
||||||
|
print "Compress $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build into $BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz...\n";
|
||||||
|
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz\" $PROJECT-$MAJOR.$MINOR.$build";
|
||||||
|
print $cmd."\n";
|
||||||
|
$ret=`$cmd`;
|
||||||
|
|
||||||
# Creation of source package
|
# Creation of source package
|
||||||
print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
|
print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
|
||||||
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
|
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
|
||||||
@@ -768,13 +811,14 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
chdir("$olddir");
|
chdir("$olddir");
|
||||||
|
|
||||||
print "You can check package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}_all.deb\"\n";
|
print "You can check bin package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}_all.deb\"\n";
|
||||||
|
print "You can check src package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}.dsc\"\n";
|
||||||
|
|
||||||
# Move to final dir
|
# Move to final dir
|
||||||
print "Move *_all.deb to $NEWDESTI\n";
|
print "Move *_all.deb *.dsc *.orig.tar.gz *.changes to $NEWDESTI\n";
|
||||||
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
|
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
|
||||||
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
|
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
|
||||||
$ret=`mv $BUILDROOT/*.tar.gz "$NEWDESTI/"`;
|
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
|
||||||
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
|
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
@@ -889,6 +933,81 @@ if ($nboftargetok) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Build package for each target
|
||||||
|
#------------------------------
|
||||||
|
foreach my $target (keys %CHOOSEDPUBLISH)
|
||||||
|
{
|
||||||
|
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||||
|
|
||||||
|
print "\nList of files to publish\n";
|
||||||
|
%filestoscan=(
|
||||||
|
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||||
|
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
||||||
|
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
||||||
|
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
||||||
|
);
|
||||||
|
foreach my $file (sort keys %filestoscan)
|
||||||
|
{
|
||||||
|
$found=0;
|
||||||
|
my $filesize = -s $file;
|
||||||
|
print $file." ".($filesize?"(found)":"(not found)");
|
||||||
|
print ($filesize?" - ".$filesize:"");
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($target eq 'SF')
|
||||||
|
{
|
||||||
|
print "\n";
|
||||||
|
|
||||||
|
$NEWPUBLISH=$PUBLISH;
|
||||||
|
print "Publish to target $NEWPUBLISH. Click enter or CTRL+C...\n";
|
||||||
|
|
||||||
|
# Ask which target to build
|
||||||
|
$NUM_SCRIPT=<STDIN>;
|
||||||
|
chomp($NUM_SCRIPT);
|
||||||
|
|
||||||
|
print "Create empty dir /tmp/emptydir. We need it to create target dir using rsync.\n";
|
||||||
|
$ret=`mkdir -p "/tmp/emptydir/"`;
|
||||||
|
|
||||||
|
foreach my $file (sort keys %filestoscan)
|
||||||
|
{
|
||||||
|
$found=0;
|
||||||
|
my $filesize = -s $file;
|
||||||
|
if (! $filesize) { next; }
|
||||||
|
|
||||||
|
print "\n";
|
||||||
|
print "Publish file ".$file." to ".$filestoscan{$file}."\n";
|
||||||
|
|
||||||
|
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
||||||
|
|
||||||
|
# mkdir
|
||||||
|
#my $ssh = Net::SSH::Perl->new("frs.sourceforge.net");
|
||||||
|
#$ssh->login("$user","$pass");
|
||||||
|
#use String::ShellQuote qw( shell_quote );
|
||||||
|
#$ssh->cmd('mkdir '.shell_quote($destFolder).' && exit');
|
||||||
|
|
||||||
|
#use Net::SFTP::Foreign;
|
||||||
|
#my $sftp = Net::SFTP::Foreign->new($ip, user => $user, password => $pass, autodie => 1);
|
||||||
|
#$sftp->mkdir($destFolder)
|
||||||
|
|
||||||
|
#$command="ssh eldy,dolibarr\@frs.sourceforge.net mkdir -p \"$destFolder\"";
|
||||||
|
#print "$command\n";
|
||||||
|
#my $ret=`$command 2>&1`;
|
||||||
|
$command="rsync -s -e 'ssh' --recursive /tmp/emptydir/ \"".$destFolder."\"";
|
||||||
|
print "$command\n";
|
||||||
|
my $ret=`$command 2>&1`;
|
||||||
|
|
||||||
|
$command="rsync -s -n $OPTIONUPDATEDIST -e 'ssh' \"$file\" \"".$destFolder."\"";
|
||||||
|
print "$command\n";
|
||||||
|
my $ret=`$command 2>&1`;
|
||||||
|
print "$ret\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "\n----- Summary -----\n";
|
print "\n----- Summary -----\n";
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
*~
|
||||||
|
.#*
|
||||||
|
Thumbs.db
|
||||||
build/exe
|
build/exe
|
||||||
build/html
|
build/html
|
||||||
dev/dbmodel
|
dev/dbmodel
|
||||||
@@ -7,58 +10,10 @@ dev/initdata
|
|||||||
dev/iso-normes
|
dev/iso-normes
|
||||||
dev/licence
|
dev/licence
|
||||||
dev/load
|
dev/load
|
||||||
dev/skeletons/*socpeople*
|
|
||||||
dev/spec
|
|
||||||
dev/test
|
|
||||||
dev/uml
|
|
||||||
dev/xdebug
|
|
||||||
doc/dev/dolibarr-phpdoc
|
|
||||||
doc/dev/barcode
|
|
||||||
doc/dev/compta
|
|
||||||
doc/dev/dbmodel
|
|
||||||
doc/dev/normes
|
|
||||||
doc/dev/html
|
|
||||||
doc/dev/iso-normes
|
|
||||||
doc/flyer
|
|
||||||
doc/font
|
|
||||||
doc/rollup
|
|
||||||
doc/tshirts
|
|
||||||
doc/wiki
|
|
||||||
document
|
|
||||||
documents
|
|
||||||
htdocs/conf/conf.php
|
htdocs/conf/conf.php
|
||||||
htdocs/conf/conf.php.mysql
|
htdocs/conf/conf.php.mysql
|
||||||
htdocs/conf/conf.php.old
|
htdocs/conf/conf.php.old
|
||||||
htdocs/conf/conf.php.postgres
|
htdocs/conf/conf.php.postgres
|
||||||
htdocs/avoir
|
|
||||||
htdocs/custom
|
|
||||||
htdocs/custom2
|
|
||||||
htdocs/customleave
|
|
||||||
htdocs/customgoogle
|
|
||||||
htdocs/document
|
|
||||||
htdocs/documents
|
|
||||||
htdocs/includes/fckeditor/_samples
|
|
||||||
htdocs/includes/fckeditor/_testcases
|
|
||||||
htdocs/includes/nusoap/samples
|
|
||||||
htdocs/includes/tcpdf/fonts/utils
|
|
||||||
htdocs/includes/tcpdf/fonts/free*.ctg.z
|
|
||||||
htdocs/includes/tcpdf/fonts/free*.z
|
|
||||||
mssql
|
|
||||||
test
|
|
||||||
CVS
|
|
||||||
*~
|
|
||||||
.#*
|
|
||||||
.buildpath
|
|
||||||
.cache
|
|
||||||
.cvsignore
|
|
||||||
.gitignore
|
|
||||||
.externalToolBuilders
|
|
||||||
.htaccess
|
|
||||||
.settings
|
|
||||||
.project
|
|
||||||
.travis.yml
|
|
||||||
Thumbs.db
|
|
||||||
data_dev.sql
|
|
||||||
doli*.tar.gz
|
doli*.tar.gz
|
||||||
doli*.tgz
|
doli*.tgz
|
||||||
doli*.exe
|
doli*.exe
|
||||||
@@ -66,5 +21,4 @@ doli*.rpm
|
|||||||
doli*.deb
|
doli*.deb
|
||||||
doli*.zip
|
doli*.zip
|
||||||
cvschangelogbuilder_dolibarr*
|
cvschangelogbuilder_dolibarr*
|
||||||
doxygen_warnings.log
|
|
||||||
dolibarr_install.log
|
dolibarr_install.log
|
||||||
@@ -1,65 +1,19 @@
|
|||||||
*/build
|
*~
|
||||||
|
*.#*
|
||||||
|
Thumbs.db
|
||||||
|
*/build/exe
|
||||||
|
*/build/html
|
||||||
*/dev/dbmodel/*
|
*/dev/dbmodel/*
|
||||||
*/dev/fpdf/*
|
*/dev/fpdf/*
|
||||||
*/dev/initdemo/*
|
*/dev/initdemo/*
|
||||||
|
*/dev/initdata/*
|
||||||
*/dev/iso-normes/*
|
*/dev/iso-normes/*
|
||||||
*/dev/licence/*
|
*/dev/licence/*
|
||||||
*/dev/load/*
|
*/dev/load/*
|
||||||
*/dev/test/*
|
|
||||||
*/dev/uml/*
|
|
||||||
*/dev/xdebug/*
|
|
||||||
*/doc/dev/dolibarr-phpdoc/*
|
|
||||||
*/doc/dev/barcode/*
|
|
||||||
*/doc/dev/compta/*
|
|
||||||
*/doc/dev/dbmodel/*
|
|
||||||
*/doc/dev/normes/*
|
|
||||||
*/doc/dev/html/*
|
|
||||||
*/doc/dev/iso-normes/*
|
|
||||||
*/doc/flyer/*
|
|
||||||
*/doc/font/*
|
|
||||||
*/doc/rollup/*
|
|
||||||
*/doc/tshirt/*
|
|
||||||
*/doc/wiki/*
|
|
||||||
*/document/*
|
|
||||||
*/documents/*
|
|
||||||
*/htdocs/avoir/*
|
|
||||||
*/htdocs/conf/conf.php
|
*/htdocs/conf/conf.php
|
||||||
*/htdocs/conf/conf.php.mysql
|
*/htdocs/conf/conf.php.mysql
|
||||||
*/htdocs/conf/conf.php.old
|
*/htdocs/conf/conf.php.old
|
||||||
*/htdocs/conf/conf.php.postgres
|
*/htdocs/conf/conf.php.postgres
|
||||||
*/htdocs/custom/*
|
|
||||||
*/htdocs/custom2/*
|
|
||||||
*/htdocs/document/*
|
|
||||||
*/htdocs/documents/*
|
|
||||||
*/htdocs/includes/ckeditor/_source
|
|
||||||
*/htdocs/includes/ckeditor/*_source.js
|
|
||||||
*/htdocs/includes/fckeditor/_samples/*
|
|
||||||
*/htdocs/includes/fckeditor/_testcases/*
|
|
||||||
*/htdocs/includes/nusoap/samples/*
|
|
||||||
*/htdocs/includes/phplot5/doc/*
|
|
||||||
*/htdocs/includes/phplot5/examples/*
|
|
||||||
*/htdocs/includes/scriptaculous/test/*
|
|
||||||
*/htdocs/includes/treemenu/docs/*
|
|
||||||
*/htdocs/includes/treemenu/images/*
|
|
||||||
*/htdocs/includes/treemenu/imagesAlt/*
|
|
||||||
*/htdocs/includes/treemenu/imagesAlt2/*
|
|
||||||
*/htdocs/includes/tcpdf/fonts/utils/*
|
|
||||||
*/htdocs/includes/tcpdf/fonts/free*.ctg.z
|
|
||||||
*/htdocs/includes/tcpdf/fonts/free*.z
|
|
||||||
*/test
|
|
||||||
*/CVS/*
|
|
||||||
*~
|
|
||||||
*.#*
|
|
||||||
*.buildpath*
|
|
||||||
*.cache*
|
|
||||||
*.cvsignore*
|
|
||||||
*.gitignore*
|
|
||||||
*.htaccess*
|
|
||||||
*.settings*
|
|
||||||
*.project*
|
|
||||||
*.travis.yml*
|
|
||||||
Thumbs.db
|
|
||||||
data_dev.sql
|
|
||||||
dolibarr*.tar.gz
|
dolibarr*.tar.gz
|
||||||
dolibarr*.tgz
|
dolibarr*.tgz
|
||||||
dolibarr*.exe
|
dolibarr*.exe
|
||||||
@@ -67,5 +21,4 @@ dolibarr*.rpm
|
|||||||
dolibarr*.deb
|
dolibarr*.deb
|
||||||
dolibarr*.zip
|
dolibarr*.zip
|
||||||
cvschangelogbuilder_dolibarr*
|
cvschangelogbuilder_dolibarr*
|
||||||
doxygen_warnings.log
|
|
||||||
dolibarr_install.log
|
dolibarr_install.log
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
Order deny,allow
|
|
||||||
Deny from all
|
|
||||||
|
|
||||||
<FilesMatch "\.(js)$">
|
|
||||||
Order deny,allow
|
|
||||||
Allow from all
|
|
||||||
</FilesMatch>
|
|
||||||
Reference in New Issue
Block a user