Skip to content
Snippets Groups Projects
Commit 06662875 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Work on APS package

parent a4ae2ca8
Branches
Tags
No related merge requests found
<!-- Application namespaces and APS version (step 9) -->
<application xmlns="http://apstandard.com/ns/1" version="1.1">
<!-- Application common properties (step 9) -->
<name>Dolibarr</name>
<version>__VERSION__</version>
<release>__RELEASE__</release>
<homepage>http://www.dolibarr.org/</homepage>
<vendor>
<name>Dolibarr</name>
<homepage>http://www.dolibarr.org/</homepage>
<icon path="images/appicon_64.png" />
</vendor>
<packager>
<name>Laurent Destailleur</name>
<homepage>http://www.nltechno.com</homepage>
<uri>uuid:714f0a7b-85d6-4eb8-b68e-40f9acbb3103</uri>
</packager>
<presentation>
<summary>Dolibarr ERP - CRM, the easy to use software to manage small or medium companies, freelancers or foundations</summary>
<description>
Dolibarr is a free modular software (you see only
features you need) to manage small and medium companies, freelancers
or foundations.
This OpenSource software is designed to provide all features you need to
manage information on many aspects of your business
into an intuitive and user-friendly graphical interface
It's an OpenSource software you can install on a web server or as a
standalone software. Dolibarr is designed to provide simplicity to end-user.
</description>
<icon path="images/appicon_64.png" />
<screenshot path="images/dolibarr_screenshot1.png">
<description>Screenshot 1</description>
</screenshot>
<changelog>
<version version="3.1.0" release="0">
<entry>See http://www.dolibarr.org/files/ChangeLog</entry>
</version>
</changelog>
<categories>
<category>Back office/Billing</category>
<category>Back office/Accounting and Financial</category>
<category>Back office/Customer Relationship Management</category>
<category>Back office/Enterprise Resource Planning</category>
</categories>
<languages>
<language>en</language>
<language>fr</language>
<language>es</language>
<language>de</language>
<language>pt</language>
</languages>
</presentation>
<upgrade match="/application/version = '3.0'" />
<!-- Application service (step 4) -->
<service id="dolibarr">
<!-- Service presentation properties (step 7) -->
<license must-accept="true">
<text>
<name>GPLv2</name>
<file>COPYING</file>
</text>
</license>
<presentation>
<name>Dolibarr instance</name>
<summary>Dolibarr services</summary>
<entry-points>
<entry class="frontpage" dst="/">
<label>Application entry point</label>
</entry>
</entry-points>
</presentation>
<!-- Service settings (step 7) -->
<settings>
<group>
<name>Administrator's preferences</name>
<setting id="admin_name" type="string" default-value="admin"
min-length="1" max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_\-]*">
<name>Administrator's login</name>
<error-message>
Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens.
</error-message>
</setting>
<setting id="admin_password" type="password" min-length="1">
<name>Password</name>
</setting>
</group>
</settings>
<!-- Service used technologies (step 6) -->
<requirements xmlns:php="http://apstandard.com/ns/1/php"
xmlns:db="http://apstandard.com/ns/1/db">
<php:version min="4.2.0" />
<php:extension>mysql</php:extension>
<php:extension>mbstring</php:extension>
<php:safe-mode>false</php:safe-mode>
<db:db>
<db:id>main</db:id>
<db:default-name>dolibarr</db:default-name>
<db:can-use-tables-prefix>false</db:can-use-tables-prefix>
<db:server-type>mysql</db:server-type>
<db:server-min-version>4.1.0</db:server-min-version>
</db:db>
</requirements>
<!-- Content delivery settings (step 8) -->
<provision>
<url-mapping>
<default-prefix>dolibarr</default-prefix>
<installed-size>35000000</installed-size>
<mapping url="/" path="htdocs" xmlns:php="http://apstandard.com/ns/1/php">
<php:handler>
<php:extension>php</php:extension>
</php:handler>
</mapping>
</url-mapping>
<!-- Service configuration script declaration (step 10) -->
<configuration-script name="configure.php">
<configuration-script-language>php</configuration-script-language>
<status-control/>
</configuration-script>
</provision>
</service>
</application>
\ No newline at end of file
<!-- Application namespaces and APS version (step 9) -->
<application xmlns="http://apstandard.com/ns/1" version="1.2">
<!-- Application common properties (step 9) -->
<id>dolibarr</id>
<name>Dolibarr</name>
<version>__VERSION__</version>
<release>__RELEASE__</release>
<homepage>http://www.dolibarr.org/</homepage>
<vendor>
<name>Dolibarr</name>
<homepage>http://www.dolibarr.org/</homepage>
<icon path="images/icon.png" />
</vendor>
<packager>
<name>Laurent Destailleur</name>
<homepage>http://www.nltechno.com</homepage>
<uri>uuid:714f0a7b-85d6-4eb8-b68e-40f9acbb3103</uri>
</packager>
<presentation>
<summary>Dolibarr ERP - CRM, the easy to use software to manage small or medium companies, freelancers or foundations</summary>
<description>
Dolibarr is a free modular software (you see only
features you need) to manage small and medium companies, freelancers
or foundations.
This OpenSource software is designed to provide all features you need to
manage information on many aspects of your business
into an intuitive and user-friendly graphical interface
It's an OpenSource software you can install on a web server or as a
standalone software. Dolibarr is designed to provide simplicity to end-user.
</description>
<icon path="doc/images/appicon_64.png" />
<screenshot path="doc/images/dolibarr_screenshot1.jpg">
<description>Screenshot 1</description>
</screenshot>
<changelog>
<version version="3.1.0" release="0">
<entry>See http://www.dolibarr.org/files/ChangeLog</entry>
</version>
</changelog>
<categories>
<category>Back office/Billing</category>
<category>Back office/Accounting and Financial</category>
<category>Back office/Customer Relationship Management</category>
<category>Back office/Enterprise Resource Planning</category>
</categories>
<languages>
<language>en</language>
<language>fr</language>
<language>es</language>
<language>de</language>
<language>pt</language>
</languages>
</presentation>
<upgrade match="/application/version = '3.0'" />
<!-- Application service (step 4) -->
<service id="dolibarr">
<!-- Service presentation properties (step 7) -->
<license must-accept="true">
<text xml:lang="">
<name>GPLv2</name>
<file>COPYING</file>
</text>
</license>
<presentation>
<name>Dolibarr instance</name>
<entry-points>
<entry class="frontpage" dst="/">
<label>Application entry point</label>
</entry>
</entry-points>
</presentation>
<!-- Service settings (step 7) -->
<settings>
<group>
<name>Administrator's preferences</name>
<setting id="admin_name" type="string" default-value="admin"
min-length="1" max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_\-]*">
<name>Administrator's login</name>
<error-message>
Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens.
</error-message>
</setting>
<setting id="admin_password" type="password" min-length="1">
<name>Password</name>
</setting>
</group>
</settings>
<!-- Service used technologies (step 6) -->
<requirements xmlns:php="http://apstandard.com/ns/1/php"
xmlns:db="http://apstandard.com/ns/1/db">
<php:version min="4.2.0" />
<php:extension>mysql</php:extension>
<php:extension>mbstring</php:extension>
<php:safe-mode>false</php:safe-mode>
<db:db>
<db:id>main</db:id>
<db:default-name>dolibarr</db:default-name>
<db:can-use-tables-prefix>false</db:can-use-tables-prefix>
<db:server-type>mysql</db:server-type>
<db:server-min-version>4.1.0</db:server-min-version>
</db:db>
</requirements>
<!-- Content delivery settings (step 8) -->
<provision>
<url-mapping>
<default-prefix>dolibarr</default-prefix>
<installed-size>35000000</installed-size>
<mapping url="/" path="htdocs" xmlns:php="http://apstandard.com/ns/1/php">
<php:handler>
<php:extension>php</php:extension>
</php:handler>
</mapping>
</url-mapping>
<!-- Service configuration script declaration (step 10) -->
<configuration-script name="configure">
<script-language>php</script-language>
</configuration-script>
</provision>
</service>
</application>
\ No newline at end of file
<!-- Application namespaces and APS version (step 9) --> <!-- Application namespaces and APS version (step 9) -->
<application xmlns="http://apstandard.com/ns/1" version="1.2"> <application xmlns="http://apstandard.com/ns/1" version="1.1">
<!-- Application common properties (step 9) --> <!-- Application common properties (step 9) -->
<id>http://www.dolibarr.org/</id>
<name>Dolibarr</name> <name>Dolibarr</name>
<version>__VERSION__</version> <version>__VERSION__</version>
<release>__RELEASE__</release> <release>__RELEASE__</release>
...@@ -9,26 +8,39 @@ ...@@ -9,26 +8,39 @@
<vendor> <vendor>
<name>Dolibarr</name> <name>Dolibarr</name>
<homepage>http://www.dolibarr.org/</homepage> <homepage>http://www.dolibarr.org/</homepage>
<icon path="images/icon.png"/> <icon path="images/appicon_64.png" />
</vendor> </vendor>
<packager> <packager>
<name>Parallels</name> <name>Laurent Destailleur</name>
<homepage>http://parallels.com</homepage> <homepage>http://www.nltechno.com</homepage>
<uri>uuid:714f0a7b-85d6-4eb8-b68e-40f9acbb3103</uri> <uri>uuid:714f0a7b-85d6-4eb8-b68e-40f9acbb3103</uri>
</packager> </packager>
<presentation> <presentation>
<summary>Dolibarr ERP - CRM, the easy to use software to manage small or medium companies, freelancers or foundations</summary> <summary>Dolibarr ERP - CRM, the easy to use software to manage small or medium companies, freelancers or foundations</summary>
<description> <description>
Dolibarr is a free modular software (you see only features you need) to manage small and medium companies, freelancers or foundations. Dolibarr is a free modular software (you see only
This Opensource software is designed to provide all features you need to manage information on many aspects of your business features you need) to manage small and medium companies, freelancers
or foundations.
This Opensource software is designed to provide all features you need to
manage information on many aspects of your business
into an intuitive and user-friendly graphical interface into an intuitive and user-friendly graphical interface
It's an OpenSource software you can install on a web server or as a standalone software. Dolibarr is designed to provide simplicity: It's an OpenSource software you can install on a web server or as a
* Simple to use (any module can be disabled to removed not required features, only the permissions features can not be disabled). standalone software. Dolibarr is designed to provide simplicity:
* Simple to install (with DoliWamp the auto-installer for Windows, DoliBuntu, the auto-installer for Ubuntu/Debian or DoliMamp the auto-installer for Mac OS X, for those who do not know how to install an Apache server, MySQL, PHP. A web assistant is available for others, no additional components required, no Java, no Python, no Perl, no PEARL PHP modules, no other exotic library). * Simple to use (any module can be disabled to removed not required
* Simple for development (no heavy frameworks). Dolibarr, developed in PHP object, incorporates its own natural code, allowing every developer to be immediately operational, with no other knowledge than PHP). features, only the permissions features can not be disabled).
* Simple to install (with DoliWamp the auto-installer for Windows,
DoliBuntu, the auto-installer for Ubuntu/Debian or DoliMamp the
auto-installer for Mac OS X, for those who do not know how to install
an Apache server, MySQL, PHP. A web assistant is available for
others, no additional components required, no Java, no Python, no
Perl, no PEARL PHP modules, no other exotic library).
* Simple for development (no heavy frameworks). Dolibarr, developed in
PHP object, incorporates its own natural code, allowing every
developer to be immediately operational, with no other knowledge than
PHP).
</description> </description>
<icon path="doc/images/appicon_64.png"/> <icon path="images/appicon_64.png" />
<screenshot path="doc/images/dolibarr_screenshot1.jpg"> <screenshot path="images/dolibarr_screenshot1.png">
<description>Screenshot 1</description> <description>Screenshot 1</description>
</screenshot> </screenshot>
<changelog> <changelog>
...@@ -37,7 +49,10 @@ It's an OpenSource software you can install on a web server or as a standalone s ...@@ -37,7 +49,10 @@ It's an OpenSource software you can install on a web server or as a standalone s
</version> </version>
</changelog> </changelog>
<categories> <categories>
<category>Back office/Billing</category>
<category>Back office/Accounting and Financial</category>
<category>Back office/Customer Relationship Management</category> <category>Back office/Customer Relationship Management</category>
<category>Back office/Enterprise Resource Planning</category>
</categories> </categories>
<languages> <languages>
<language>en</language> <language>en</language>
...@@ -49,7 +64,7 @@ It's an OpenSource software you can install on a web server or as a standalone s ...@@ -49,7 +64,7 @@ It's an OpenSource software you can install on a web server or as a standalone s
</presentation> </presentation>
<upgrade match="/application/version = '3.0'" /> <upgrade match="/application/version = '3.0'" />
<!-- Application service (step 4) --> <!-- Application service (step 4) -->
<service id="blog"> <service id="dolibarr">
<!-- Service presentation properties (step 7) --> <!-- Service presentation properties (step 7) -->
<license must-accept="true"> <license must-accept="true">
<text> <text>
...@@ -61,7 +76,7 @@ It's an OpenSource software you can install on a web server or as a standalone s ...@@ -61,7 +76,7 @@ It's an OpenSource software you can install on a web server or as a standalone s
<name>Dolibarr instance</name> <name>Dolibarr instance</name>
<entry-points> <entry-points>
<entry class="frontpage" dst="/"> <entry class="frontpage" dst="/">
Application entry point <label>Application entry point</label>
</entry> </entry>
</entry-points> </entry-points>
</presentation> </presentation>
...@@ -69,16 +84,14 @@ Application entry point ...@@ -69,16 +84,14 @@ Application entry point
<settings> <settings>
<group> <group>
<name>Administrator's preferences</name> <name>Administrator's preferences</name>
<setting id="admin_name" type="string" <setting id="admin_name" type="string" default-value="admin"
default-value="admin" min-length="1" min-length="1" max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_\-]*">
max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_\-]*">
<name>Administrator's login</name> <name>Administrator's login</name>
<error-message>Please make sure the text you entered <error-message>
starts with a letter and continues with either numbers, Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens.
letters, underscores or hyphens.</error-message> </error-message>
</setting> </setting>
<setting id="admin_password" <setting id="admin_password" type="password" min-length="1">
type="password" min-length="1" >
<name>Password</name> <name>Password</name>
</setting> </setting>
</group> </group>
...@@ -103,16 +116,16 @@ xmlns:db="http://apstandard.com/ns/1/db"> ...@@ -103,16 +116,16 @@ xmlns:db="http://apstandard.com/ns/1/db">
<url-mapping> <url-mapping>
<default-prefix>dolibarr</default-prefix> <default-prefix>dolibarr</default-prefix>
<installed-size>35000000</installed-size> <installed-size>35000000</installed-size>
<mapping url="/" path="htdocs" <mapping url="/" path="htdocs" xmlns:php="http://apstandard.com/ns/1/php">
xmlns:php="http://apstandard.com/ns/1/php">
<php:handler> <php:handler>
<php:extension>php</php:extension> <php:extension>php</php:extension>
</php:handler> </php:handler>
</mapping> </mapping>
</url-mapping> </url-mapping>
<!-- Service configuration script declaration (step 10) --> <!-- Service configuration script declaration (step 10) -->
<configuration-script name="configure"> <configuration-script name="configure.php">
<script-language>php</script-language> <configuration-script-language>php</configuration-script-language>
<status-control/>
</configuration-script> </configuration-script>
</provision> </provision>
</service> </service>
......
README (English)
##################################################
This directory is dedicated to APS package building
##################################################
Docs for APS format 1.1:
http://www.apsstandard.org/r/doc/aps-format-1.1-packaging-guide/index.htm
Docs for APS format 1.2 (need APP-LIST.xml):
http://www.apsstandard.org/r/doc/aps-format-1.2-packaging-guide/index.htm
To check an APS package on Debian:
* Install libgdiplus with
apt-get install libgdiplus
* Install apslint.exe
tar -xvf xxxx.tgz
* Go into directory of apslint and run command
mono ./apslint.exe '/media/DATA/Mes Developpements/dolibarr/build/dolibarr-3.1.0-dev.app.zip'
<?php
if(count($_SERVER['argv']) < 2)
{
print "Usage: configure (install | upgrade <version> | configure | remove)\n";
exit(1);
}
$command = $_SERVER['argv'][1];
//$command stores the argument with which the script was invoked.
if($command == "install")
{
$db_id = 'dolibarr';
//The database identifier value is to be substituted by the value
//defined in the application requirements section of the
//metadata file.For details, see the 6.3.1.1. Database requirement
//type section of the Specification.
$query_file = 'schema.sql'; //File containing list of SQL queries.
//List of database-related variables that are passed to the configuration
//script. See the 6.3.1.1.1. Environment variables section of the
//Specification for details.
$db_address = getenv("DB_${db_id}_HOST");
/*if (fetch_env_var("DB_${db_id}_PORT") !== False)
$db_address .= ':' . fetch_env_var("DB_${db_id}_PORT");
*/
$dblogin = getenv("DB_${db_id}_LOGIN");
$dbpassword = getenv("DB_${db_id}_PASSWORD");
$dbname = getenv("DB_${db_id}_NAME");
//PHP functions for connecting to the mysql server and
//executing SQL queries.
mysql_connect($dbaddress, $dblogin, $dbpassword);
mysql_select_db($dbname);
/*
$sql_queries = file($query_file);
foreach ($sql_queries as $query) mysql_query($query);
*/
//Other code to be executed on invoking configure with
//the install argument.
exit(0);
}
if($command == "remove")
{
//Code to be executed on invoking configure with the remove argument
exit(0);
}
if($command == "upgrade")
{
//Code to be executed on invoking configure with the upgrade argument
exit(0);
}
if($command == "configure")
{
//Code to be executed on invoking configure with the configure argument
exit(0);
}
print "Error: unknown command $command.\n";
exit(1);
?>
\ No newline at end of file
#!/usr/bin/perl #!/usr/bin/perl
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl # \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe) # \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \version $Id: makepack-dolibarr.pl,v 1.103 2011/06/24 23:10:52 eldy Exp $ # \version $Id: makepack-dolibarr.pl,v 1.104 2011/06/25 19:41:36 eldy Exp $
# \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> # \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
...@@ -48,7 +48,7 @@ if (-d "/usr/src/RPM") { ...@@ -48,7 +48,7 @@ if (-d "/usr/src/RPM") {
use vars qw/ $REVISION $VERSION /; use vars qw/ $REVISION $VERSION /;
$REVISION='$Revision: 1.103 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1; $REVISION='$Revision: 1.104 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
$VERSION="1.0 (build $REVISION)"; $VERSION="1.0 (build $REVISION)";
...@@ -171,7 +171,11 @@ foreach my $target (keys %CHOOSEDTARGET) { ...@@ -171,7 +171,11 @@ foreach my $target (keys %CHOOSEDTARGET) {
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'... ";
$ret=`"$req" 2>&1`; $newreq=$req; $newparam='';
if ($newreq eq 'zip') { $newparam.='-h'; }
$cmd="\"$newreq\" $newparam 2>&1";
print "Test command ".$cmd."... ";
$ret=`$cmd`;
$coderetour=$?; $coderetour2=$coderetour>>8; $coderetour=$?; $coderetour2=$coderetour>>8;
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) { if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
# Not found error, we try in PROGPATH # Not found error, we try in PROGPATH
...@@ -240,11 +244,25 @@ if ($nboftargetok) { ...@@ -240,11 +244,25 @@ if ($nboftargetok) {
$ret=`cp -pr "$SOURCE" "$BUILDROOT/$PROJECT"`; $ret=`cp -pr "$SOURCE" "$BUILDROOT/$PROJECT"`;
} }
print "Clean $BUILDROOT\n"; print "Clean $BUILDROOT\n";
$ret=`rm -f $BUILDROOT/$PROJECT/index.php`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`; $ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
$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/index.php`;
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`; $ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/DoliWamp-*`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/DoliMamp-*`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.deb`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.rpm`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tgz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.zip`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/doxygen/doxygen_warnings.log`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.mysql`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.postgres`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`; $ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
$ret=`rm -fr $BUILDROOT/$PROJECT/document`; $ret=`rm -fr $BUILDROOT/$PROJECT/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php`;
...@@ -370,6 +388,8 @@ if ($nboftargetok) { ...@@ -370,6 +388,8 @@ if ($nboftargetok) {
# now newbuild is 0-0 or 0-3 for example # now newbuild is 0-0 or 0-3 for example
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi; $REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; } if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1"; $FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm...\n"; print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm...\n";
...@@ -415,6 +435,14 @@ if ($nboftargetok) { ...@@ -415,6 +435,14 @@ if ($nboftargetok) {
} }
if ($target eq 'DEB') { if ($target eq 'DEB') {
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0/gi; # dev
$newbuild =~ s/beta/1/gi; # beta
$newbuild =~ s/rc./2/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
# now newbuild is 0-0 or 0-3 for example
print "Version is $MAJOR.$MINOR.$newbuild\n";
print "Remove target $FILENAMEDEB.deb...\n"; print "Remove target $FILENAMEDEB.deb...\n";
unlink("$DESTI/$FILENAMEDEB.deb"); unlink("$DESTI/$FILENAMEDEB.deb");
...@@ -433,14 +461,6 @@ if ($nboftargetok) { ...@@ -433,14 +461,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/DEBIAN/CVS`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/DEBIAN/CVS`;
print "Remove other files\n"; print "Remove other files\n";
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/DoliWamp-*`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/DoliMamp-*`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/dolibarr-*.tar`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/dolibarr-*.tgz`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/dolibarr-*.zip`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/dolibarr-*.deb`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/doxygen/doxygen_warnings.log`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/build/html`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/dbmodel`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/dbmodel`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/fpdf`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/fpdf`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/initdata`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/dev/initdata`;
...@@ -454,10 +474,6 @@ if ($nboftargetok) { ...@@ -454,10 +474,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/doc/font`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/doc/font`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/doc/tshirt`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/doc/tshirt`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/doc/rollup`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/doc/rollup`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/conf/conf.php.mysql`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/conf/conf.php.old`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/conf/conf.php.postgres`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/conf/conf*sav*`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/test`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/test`;
# To remove once stable # To remove once stable
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/htdocs/theme/bureau2crea`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/htdocs/theme/bureau2crea`;
...@@ -466,12 +482,6 @@ if ($nboftargetok) { ...@@ -466,12 +482,6 @@ if ($nboftargetok) {
open (SPECFROM,"<$SOURCE/build/deb/control") || die "Error"; open (SPECFROM,"<$SOURCE/build/deb/control") || die "Error";
open (SPECTO,">$BUILDROOT/$PROJECT.tmp/DEBIAN/control") || die "Error"; open (SPECTO,">$BUILDROOT/$PROJECT.tmp/DEBIAN/control") || die "Error";
while (<SPECFROM>) { while (<SPECFROM>) {
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0/gi; # dev
$newbuild =~ s/beta/1/gi; # beta
$newbuild =~ s/rc./2/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
# now newbuild is 0-0 or 0-3 for example
$_ =~ s/__VERSION__/$MAJOR.$MINOR.$newbuild/; $_ =~ s/__VERSION__/$MAJOR.$MINOR.$newbuild/;
print SPECTO $_; print SPECTO $_;
} }
...@@ -489,21 +499,12 @@ if ($nboftargetok) { ...@@ -489,21 +499,12 @@ if ($nboftargetok) {
print "Copy pixmap file into $BUILDROOT/$PROJECT.tmp/usr/share/pixmaps/dolibarr.xpm\n"; print "Copy pixmap file into $BUILDROOT/$PROJECT.tmp/usr/share/pixmaps/dolibarr.xpm\n";
$ret=`cp "$SOURCE/doc/images/dolibarr.xpm" "$BUILDROOT/$PROJECT.tmp/usr/share/pixmaps/dolibarr.xpm"`; $ret=`cp "$SOURCE/doc/images/dolibarr.xpm" "$BUILDROOT/$PROJECT.tmp/usr/share/pixmaps/dolibarr.xpm"`;
#print "Create directory $BUILDROOT/$PROJECT/etc/$PROJECT\n";
#$ret=`mkdir -p "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
#print "Copy changelog file into $BUILDROOT/$PROJECT/DEBIAN\n";
#$ret=`cp "$SOURCE/ChangeLog" "$BUILDROOT/$PROJECT/DEBIAN/changelog"`;
print "Copy README file into $BUILDROOT/$PROJECT.tmp/DEBIAN\n"; print "Copy README file into $BUILDROOT/$PROJECT.tmp/DEBIAN\n";
$ret=`cp "$SOURCE/README" "$BUILDROOT/$PROJECT.tmp/DEBIAN/README"`; $ret=`cp "$SOURCE/README" "$BUILDROOT/$PROJECT.tmp/DEBIAN/README"`;
print "Copy copyright file into $BUILDROOT/$PROJECT.tmp/DEBIAN\n"; print "Copy copyright file into $BUILDROOT/$PROJECT.tmp/DEBIAN\n";
$ret=`cp "$SOURCE/COPYRIGHT" "$BUILDROOT/$PROJECT.tmp/DEBIAN/copyright"`; $ret=`cp "$SOURCE/COPYRIGHT" "$BUILDROOT/$PROJECT.tmp/DEBIAN/copyright"`;
#print "Copy apache conf file into $BUILDROOT/$PROJECT/etc/$PROJECT\n";
#$ret=`cp "$SOURCE/build/deb/apache.conf" "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
print "Create directory $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/documents\n"; print "Create directory $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/documents\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/documents"`; $ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/documents"`;
...@@ -539,6 +540,16 @@ if ($nboftargetok) { ...@@ -539,6 +540,16 @@ if ($nboftargetok) {
} }
if ($target eq 'APS') { if ($target eq 'APS') {
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0/gi; # dev
$newbuild =~ s/beta/1/gi; # beta
$newbuild =~ s/rc./2/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
# now newbuild is 0-0 or 0-3 for example
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
print "Remove target $FILENAMEAPS.zip...\n"; print "Remove target $FILENAMEAPS.zip...\n";
unlink "$DESTI/$FILENAMEAPS.zip"; unlink "$DESTI/$FILENAMEAPS.zip";
...@@ -551,63 +562,70 @@ if ($nboftargetok) { ...@@ -551,63 +562,70 @@ if ($nboftargetok) {
$ret=`$cmd`; $ret=`$cmd`;
print "Remove other files\n"; print "Remove other files\n";
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/DoliWamp-*`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev/dbmodel`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/DoliMamp-*`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev/fpdf`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/dolibarr-*.tar`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev/initdata`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/dolibarr-*.tgz`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev/iso-normes`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/dolibarr-*.zip`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev/phpcheckstyle`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/dolibarr-*.deb`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev/phpunit`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/doxygen/doxygen_warnings.log`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev/spec`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/html`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev/uml`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/dbmodel`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev/xdebug`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/fpdf`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc/flyer`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/initdata`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc/font`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/iso-normes`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc/tshirt`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/phpcheckstyle`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc/rollup`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/phpunit`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/spec`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/uml`; $APSVERSION="1.1";
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/xdebug`; print "Create APS files $BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml\n";
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/doc/flyer`; open (SPECFROM,"<$BUILDROOT/$PROJECT/build/aps/APP-META-$APSVERSION.xml") || die "Error";
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/doc/font`; open (SPECTO,">$BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml") || die "Error";
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/doc/tshirt`; while (<SPECFROM>) {
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/doc/rollup`; $newbuild = $BUILD;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/conf/conf.php.mysql`; $newbuild =~ s/(dev|alpha)/0/gi; # dev
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/conf/conf.php.old`; $newbuild =~ s/beta/1/gi; # beta
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/conf/conf.php.postgres`; $newbuild =~ s/rc./2/gi; # rc
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/conf/conf*sav*`; if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/test`; # now newbuild is 0-0 or 0-3 for example
$_ =~ s/__VERSION__/$MAJOR.$MINOR.$REL1/;
print "Create APS files\n"; $_ =~ s/__RELEASE__/$RPMSUBVERSION/;
$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/APP-META.xml\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml\""; print SPECTO $_;
$ret=`$cmd`; }
close SPECFROM;
close SPECTO;
print "Version set to $MAJOR.$MINOR.$newbuild\n";
$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure\""; $cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure\"";
$ret=`$cmd`; $ret=`$cmd`;
$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure.php\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure.php\"";
$ret=`$cmd`;
$cmd="cp -pr \"$BUILDROOT/$PROJECT/doc/images\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/images\""; $cmd="cp -pr \"$BUILDROOT/$PROJECT/doc/images\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/images\"";
$ret=`$cmd`; $ret=`$cmd`;
print "Remove other files\n";
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc`;
print "Build APP-LIST.xml files\n";
print "Compress $BUILDROOT/$PROJECT.tmp/$PROJECT into $FILENAMEAPS.zip...\n"; print "Compress $BUILDROOT/$PROJECT.tmp/$PROJECT into $FILENAMEAPS.zip...\n";
print "Go to directory $BUILDROOT/$PROJECT.tmp\n"; print "Go to directory $BUILDROOT/$PROJECT.tmp\/$PROJECT\n";
$olddir=getcwd(); $olddir=getcwd();
chdir("$BUILDROOT\/$PROJECT.tmp"); chdir("$BUILDROOT\/$PROJECT.tmp\/$PROJECT");
#$cmd= "7z a -r -tzip -xr\@\"$BUILDROOT\/$PROJECT.tmp\/$PROJECT\/build\/zip\/zip_exclude.txt\" -mx $BUILDROOT/$FILENAMEAPS.zip $BUILDROOT/$PROJECT.tmp/$PROJECT\\*"; $cmd= "zip -9 -r $BUILDROOT/$FILENAMEAPS.zip \*";
$cmd= "zip -9 -r $BUILDROOT/$FILENAMEAPS.zip $PROJECT\\*";
print $cmd."\n"; print $cmd."\n";
$ret= `$cmd`; $ret= `$cmd`;
chdir("$olddir"); chdir("$olddir");
if ($OS =~ /windows/i) if ($OS =~ /windows/i)
{ {
print "Move $FILENAMEAPS.zip to $DESTI/$FILENAMEAPS.zip\n"; print "Move $BUILDROOT/$FILENAMEAPS.zip to $DESTI/$FILENAMEAPS.zip\n";
$ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$DESTI/$FILENAMEAPS.zip"`; $ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$DESTI/$FILENAMEAPS.zip"`;
} }
else else
{ {
print "Move $FILENAMEAPS.zip to $DESTI/$FILENAMEAPS.zip\n"; print "Move $BUILDROOT/$FILENAMEAPS.zip to $DESTI/$FILENAMEAPS.zip\n";
$ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$DESTI/$FILENAMEAPS.zip"`; $ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$DESTI/$FILENAMEAPS.zip"`;
} }
next; next;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment