Changes

Jump to navigation Jump to search
no edit summary
Line 14: Line 14:  
* if you added additional sections to ''service.info'', run ''0sugar dist_bin <section-name>'' in every environment, ''services.info'' has additional sections for
 
* if you added additional sections to ''service.info'', run ''0sugar dist_bin <section-name>'' in every environment, ''services.info'' has additional sections for
 
* ''0sugar push stable'' to rsync changed files from ''dist/'' to the server<br>see [[#Release workflows]] for other release scenarios
 
* ''0sugar push stable'' to rsync changed files from ''dist/'' to the server<br>see [[#Release workflows]] for other release scenarios
 +
 +
== 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)
 +
** if ''[Library]'' section exists in service.info file, macro will
 +
*** check if ''SERVICE_VERSION'' is a plain number
 +
*** export ''SERVICE_AGE'', age from ''[Library]'' section
 +
*** export ''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] service.

Navigation menu