Permalink
Browse files

Works on APS package

  • Loading branch information...
1 parent 934e356 commit e28ed80389869b6343518a795f76a58c67254390 @eldy eldy committed Jun 24, 2011
Showing with 198 additions and 17 deletions.
  1. +119 −0 build/aps/APP-META.xml
  2. +1 −0 build/aps/configure
  3. +78 −17 build/makepack-dolibarr.pl
View
@@ -0,0 +1,119 @@
+<!-- Application namespaces and APS version (step 9) -->
+<application xmlns="http://apstandard.com/ns/1" version="1.2">
+<!-- Application common properties (step 9) -->
+<id>http://www.dolibarr.org/</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>Parallels</name>
+<homepage>http://parallels.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:
+* Simple to use (any module can be disabled to removed not required 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>
+<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/Customer Relationship Management</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="blog">
+<!-- Service presentation properties (step 7) -->
+<license must-accept="true">
+<text>
+<name>GPLv2</name>
+<file>COPYING</file>
+</text>
+</license>
+<presentation>
+<name>Dolibarr instance</name>
+<entry-points>
+<entry class="frontpage" dst="/">
+Application entry point
+</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>
View
@@ -0,0 +1 @@
+# This script will be invoked when application instance is to be setup
@@ -2,7 +2,7 @@
#----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe)
-# \version $Id$
+# \version $Id: makepack-dolibarr.pl,v 1.103 2011/06/24 23:10:52 eldy Exp $
# \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
#----------------------------------------------------------------------------
@@ -14,14 +14,14 @@
$BUILD="0-dev"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
$RPMSUBVERSION="auto"; # auto use value found into BUILD
-@LISTETARGET=("TGZ","ZIP","RPM","DEB","EXE","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
+@LISTETARGET=("TGZ","ZIP","RPM","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
%REQUIREMENTTARGET=( # Tool requirement for each package
"SNAPSHOT"=>"tar",
"TGZ"=>"tar",
"ZIP"=>"7z",
"RPM"=>"rpmbuild",
"DEB"=>"dpkg",
-"EXE"=>"makensis.exe",
+"APS"=>"zip",
"EXEDOLIWAMP"=>"iscc.exe"
);
%ALTERNATEPATH=(
@@ -35,7 +35,7 @@
$FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
$FILENAMEDEB="$PROJECT-$MAJOR.$MINOR.$BUILD";
-$FILENAMEEXE="$PROJECT-$MAJOR.$MINOR.$BUILD";
+$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
$FILENAMEEXEDOLIWAMP="$PROJECT-$MAJOR.$MINOR.$BUILD";
if (-d "/usr/src/redhat") {
# redhat
@@ -48,7 +48,7 @@
use vars qw/ $REVISION $VERSION /;
-$REVISION='$Revision$'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
+$REVISION='$Revision: 1.103 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
$VERSION="1.0 (build $REVISION)";
@@ -460,7 +460,6 @@
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/conf/conf*sav*`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/test`;
# To remove once stable
- $ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/incluces/modules/facture/doc/doc_generic_invoice_odt.modules.php`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/htdocs/theme/bureau2crea`;
print "Edit version in file $BUILDROOT/$PROJECT.tmp/DEBIAN/control\n";
@@ -539,19 +538,81 @@
next;
}
- if ($target eq 'EXE') {
- print "Remove target $FILENAMEEXE.exe...\n";
- unlink "$DESTI/$FILENAMEEXE.exe";
+ if ($target eq 'APS') {
+ print "Remove target $FILENAMEAPS.zip...\n";
+ unlink "$DESTI/$FILENAMEAPS.zip";
- print "Compress into $FILENAMEEXE.exe by $FILENAMEEXE.nsi...\n";
- $cmd="\"$REQUIREMENTTARGET{$target}\" /DMUI_VERSION_DOT=$MAJOR.$MINOR.$BUILD /X\"SetCompressor bzip2\" \"$SOURCE\\build\\exe\\$FILENAME.nsi\"";
- print "$cmd\n";
- $ret=`$cmd`;
- print "Move $FILENAMEEXE.exe to $DESTI\n";
- rename("$SOURCE\\build\\exe\\$FILENAMEEXE.exe","$DESTI/$FILENAMEEXE.exe");
- next;
+ #rmdir "$BUILDROOT/$PROJECT.tmp";
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
+ print "Create directory $BUILDROOT/$PROJECT.tmp\n";
+ $ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp"`;
+ print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
+ $cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
+ $ret=`$cmd`;
+
+ print "Remove other files\n";
+ $ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/DoliWamp-*`;
+ $ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/DoliMamp-*`;
+ $ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/dolibarr-*.tar`;
+ $ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/dolibarr-*.tgz`;
+ $ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/dolibarr-*.zip`;
+ $ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/dolibarr-*.deb`;
+ $ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/doxygen/doxygen_warnings.log`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/html`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/dbmodel`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/fpdf`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/initdata`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/iso-normes`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/phpcheckstyle`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/phpunit`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/spec`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/uml`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/dev/xdebug`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/doc/flyer`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/doc/font`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/doc/tshirt`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/doc/rollup`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/conf/conf.php.mysql`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/conf/conf.php.old`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/conf/conf.php.postgres`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/conf/conf*sav*`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/test`;
+
+ print "Create APS files\n";
+ $cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/APP-META.xml\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml\"";
+ $ret=`$cmd`;
+ $cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure\"";
+ $ret=`$cmd`;
+ $cmd="cp -pr \"$BUILDROOT/$PROJECT/doc/images\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/images\"";
+ $ret=`$cmd`;
+
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc`;
+
+ print "Compress $BUILDROOT/$PROJECT.tmp/$PROJECT into $FILENAMEAPS.zip...\n";
+
+ print "Go to directory $BUILDROOT/$PROJECT.tmp\n";
+ $olddir=getcwd();
+ chdir("$BUILDROOT\/$PROJECT.tmp");
+ #$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 $PROJECT\\*";
+ print $cmd."\n";
+ $ret= `$cmd`;
+ chdir("$olddir");
+
+ if ($OS =~ /windows/i)
+ {
+ print "Move $FILENAMEAPS.zip to $DESTI/$FILENAMEAPS.zip\n";
+ $ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$DESTI/$FILENAMEAPS.zip"`;
+ }
+ else
+ {
+ print "Move $FILENAMEAPS.zip to $DESTI/$FILENAMEAPS.zip\n";
+ $ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$DESTI/$FILENAMEAPS.zip"`;
+ }
+ next;
}
-
+
if ($target eq 'EXEDOLIWAMP')
{
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";

0 comments on commit e28ed80

Please sign in to comment.