[Kolab-devel] zpush Milestone 2

Gunnar Wrobel wrobel at pardus.de
Tue May 4 23:08:19 CEST 2010


Quoting Thomas Arendsen Hein <thomas at intevation.de>:

[snip]
>
>> > 3) to handle annotation  we will  have a shared library
>> >     this library kolabActivesyncData.php will be used by the  backend ,
>> > by the  command line  utilities
>> >     and shoud be used by the GUI
>> >    * where to put in ( Pear ? , include directory of zpush ,  
>> other place ?)
>> >    * if PEAR what i need to do to package correctly the lib ?
>>
>> Good question.
>>
>> Thomas? Sascha? Christoph? This really is a packaging question, it seems.
>
> Gunnar Wrobel can decide this as he handles all of the php packaging.

Yes, PEAR please. It is the standard PHP packaging format.

What you need to do:

  - Get a PEAR installation (this is provided with the Kolab Server so  
it should be no problem)
  - Create a package.xml file in Kolab_Zpush. Refer to  
http://git.horde.org/co.php/framework/Kolab_Filter/package.xml?r=1.42  
to get some ideas on how the file should look like - ensure that you  
switch to the CVS repository there before using the link. The Horde  
CVS viewer currently has a problem with such external links.
  - Ensure the binary scripts have the snippet '<replace  
from="@php_bin@" to="php_bin" type="pear-config"/>' so that they get  
the correct binary path (do not hardcode to /kolab/bin/php as people  
can install in other locations than "/kolab")
  - Prepare a package by running "pear package package.xml" in the  
Kolab_Zpush directory. This should then be installable on another  
machine with "pear install Kolab_Zpush-0.4.0.tgz"

The kolabActivesyncData.php "library" belongs into /kolab/lib/php  
which is in the default include path. PEAR does select that one  
automatically for the default php files of a package.

If possible you could look into splitting the large single file into  
its separate parts. Look at the structure Horde packages have for  
example. All larger PHP projects nowadays follow the "1 class / 1  
file" policy. This makes it easier to read the code and if you follow  
the convention that the class Kolab_Zpush_Param_Global is in  
Kolab_Zpush/lib/Kolab/Zpush/Param/Global.php you will even make the  
common PHP autoloaders happy.

This is not necessary to make PEAR happy though so you can also leave  
it for later. You should however split at least the FastJSON class  
into a separate file as you copied this code from somewhere else,  
removed the original copyright notice and placed it under the  
copyright of the Free Software Foundation. Probably just a quick hack  
but these things have a tendency to live much longer than desired and  
might lead to confusion later.

Don't hesitate to ask for further details concerning the PEAR  
packaging in case you need them.

Cheers,

Gunnar

>
> Regards,
> Thomas
>
> --
> thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key:  
> 0x5816791A
> Intevation GmbH, Neuer Graben 17, 49074 Osnabrueck - AG Osnabrueck,  
> HR B 18998
> Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
>



-- 
____ http://www.pardus.de _________________ http://gunnarwrobel.de _

E-mail : p at rdus.de                                 Dr. Gunnar Wrobel
Tel.   : +49 700 6245 0000                         Bundesstrasse 29
Fax    : +49 721 1513 52322                        D-20146 Hamburg
--------------------------------------------------------------------
    >> Mail at ease - Rent a kolab groupware server at p at rdus <<
--------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.kolab.org/pipermail/devel/attachments/20100504/b7388090/attachment.sig>


More information about the devel mailing list