Changes

Jump to navigation Jump to search
Line 176: Line 176:  
* users who interested in testing(enabled testing mode) will get your new development version
 
* users who interested in testing(enabled testing mode) will get your new development version
 
* you don't have to change ''compatibility-version'' and ''version'' all time for micro releases, ''0sugar'' will implicitly change revision of new pushes and user's saccharin will download last changes
 
* you don't have to change ''compatibility-version'' and ''version'' all time for micro releases, ''0sugar'' will implicitly change revision of new pushes and user's saccharin will download last changes
 +
 +
== Development tools support ==
 +
 +
Useful addons to popular development tools. These are optional features that simplify service development process.
 +
 +
=== Autotools ===
 +
 +
Add [http://git.sugarlabs.org/projects/toolkit/repos/mainline/blobs/master/m4/service.m4 service.m4] macros file to your project. It provides:
 +
 +
* ''SERVICE_INIT'' macro to initialize services support, use it after other (AC|AM)_INIT macros like in [http://git.sugarlabs.org/projects/toolkit/repos/mainline/blobs/master/configure.ac]<br>It takes optional string to define prefix value for ''DIST_'' variables,  in most cases it should be just ''sugar''<br>Macro exports follows variables:
 +
** ''SERVICE_NAME'', name of service in service.info file
 +
** ''SERVICE_VERSION'', version of service in service.info file
 +
** ''SERVICE_REVISION'', revision number from dist/revision file
 +
** ''DIST_NAME'', combines prefix macro argument with ''SERVICE_NAME'' to use it as a distribution name(see example below)
 +
** ''DIST_VERSION'', combines ''SERVICE_VERSION'' and ''SERVICE_REVISION'' to use it as a distribution version(see example below)
 +
** ''SERVICE_SUMMARY'', summary from service.info file
 +
** macro also changes ''PACKAGE'' and ''VERSION'' variables with values from proper ''DIST_'', so it rewrites ''AC_INIT'' arguments(you have to use fake values for ''AC_INIT'' macro)
 +
** ''SERVICE_AGE'', age from service.info file (make sense only for libraries)<br>If value is not empty, ''SERVICE_INIT'' adds:
 +
*** checks if ''SERVICE_VERSION'' is a plain number
 +
*** exports ''SERVICE_LIBRARY_VERSION'' which is libtool's -version-info parameter
 +
*** if ''service.pc.in'' presents in root directory, rename it to ''DIST_NAME''.pc.in
 +
 +
* ''SERVICE_ECHO'' convenient macro to print various variables
 +
 +
These macros could be used like in [http://git.sugarlabs.org/projects/toolkit/repos/mainline/trees/master Toolkit] serivce.
    
== Tips ==
 
== Tips ==

Navigation menu