Use a custom test-config.xml file for test widget
[apps/app-templates.git] / README.md
1 # AGL CMake template
2
3 Files used to build an application, or binding, project with the
4 AGL Application Framework.
5
6 To build your AGL project using these templates, you have to install
7 them within your project and adjust compilation option in `config.cmake`.
8 For technical reasons, you also have to specify **cmake** target in
9 sub CMakeLists.txt installed. Make a global search to find source files
10 isn't recommended now to handle project build especially in a multi-users
11 project because CMake will not be aware of new or removed source files.
12
13 You'll find usage samples here:
14
15 - [helloworld-service](https://github.com/iotbzh/helloworld-service)
16 - [low-level-can-service](https://gerrit.automotivelinux.org/gerrit/apps/low-level-can-service)
17 - [high-level-viwi-service](https://github.com/iotbzh/high-level-viwi-service)
18 - [audio-binding](https://github.com/iotbzh/audio-binding)
19 - [unicens2-binding](https://github.com/iotbzh/unicens2-binding)
20
21 ## Quickstart
22
23 ### Initialization
24
25 To use these templates files on your project just install the reference files using
26 **git submodule** then use `config.cmake` file to configure your project specificities :
27
28 ```bash
29 git submodule add https://gerrit.automotivelinux.org/gerrit/p/apps/app-templates.git conf.d/app-templates
30 mkdir conf.d/cmake
31 cp conf.d/app-templates/samples.d/config.cmake.sample conf.d/cmake/config.cmake
32 ```
33
34 Edit the copied config.cmake file to fit your needs.
35
36 Now, create your top CMakeLists.txt file which include `config.cmake` file.
37
38 An example is available in **app-templates** submodule that you can copy and
39 use:
40
41 ```bash
42 cp conf.d/app-templates/samples.d/CMakeLists.txt.sample CMakeLists.txt
43 ```
44
45 ### Create your CMake targets
46
47 For each target part of your project, you need to use ***PROJECT_TARGET_ADD***
48 to include this target to your project.
49
50 Using it, make available the cmake variable ***TARGET_NAME*** until the next
51 ***PROJECT_TARGET_ADD*** is invoked with a new target name.
52
53 So, typical usage defining a target is:
54
55 ```cmake
56 PROJECT_TARGET_ADD(SuperExampleName) --> Adding target to your project
57
58 add_executable/add_library(${TARGET_NAME}.... --> defining your target sources
59
60 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES.... --> fit target properties
61 for macros usage
62 ```
63
64 ### Targets PROPERTIES
65
66 You should set properties on your targets that will be used to package your
67 apps in a widget file that could be installed on an AGL system.
68
69 Specify what is the type of your targets that you want to be included in the
70 widget package with the property **LABELS**:
71
72 Choose between:
73
74 - **BINDING**: Shared library that be loaded by the AGL Application Framework
75 - **BINDINGV2**: Shared library that be loaded by the AGL Application Framework
76  This has to be accompagnied with a JSON file named like the
77  *${OUTPUT_NAME}-apidef* of the target that describes the API with OpenAPI
78  syntax (e.g: *mybinding-apidef*).
79  Or Alternatively, you can choose the name, without the extension, using macro
80  **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES**
81  to *CXX*.
82 - **BINDINGV3**: Shared library that be loaded by the AGL Application Framework
83  This has to be accompagnied with a JSON file named like the
84  *${OUTPUT_NAME}-apidef* of the target that describes the API with OpenAPI
85  syntax (e.g: *mybinding-apidef*).
86  Or Alternatively, you can choose the name, without the extension, using macro
87  **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES**
88  to *CXX*.
89 - **PLUGIN**: Shared library are meant to be used as a binding plugin. Binding
90  would load it as a plugin to extend its functionalities. It should be named
91  with a special extension that you choose with SUFFIX cmake target property or
92  it'd be **.ctlso** by default.
93 - **HTDOCS**: Root directory of a web app. This target has to build its
94  directory and puts its files in the ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
95 - **DATA**: Resources used by your application. This target has to build its
96  directory and puts its files in the ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
97 - **EXECUTABLE**: Entry point of your application executed by the AGL
98  Application Framework
99 - **LIBRARY**: An external 3rd party library bundled with the binding for its
100  own purpose because platform doesn't provide it.
101 - **BINDING-CONFIG**: Any files used as configuration by your binding.
102
103 > **TIP** you should use the prefix _afb-_ with your **BINDING* targets which
104 > stand for **Application Framework Binding**.
105
106 ```cmake
107 SET_TARGET_PROPERTIES(${TARGET_NAME}
108         PREFIX "afb-"
109         LABELS "BINDINGV3"
110         OUTPUT_NAME "file_output_name")
111 ```
112
113 > **NOTE**: You doesn't need to specify an **INSTALL** command for these
114 > targets. This is already handle by template and will be installed in the
115 > following path : **${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}**
116
117 ## More details: Typical project architecture
118
119 A typical project architecture would be :
120
121 ```tree
122 <project-root-path>
123
124 ├── conf.d/
125 │   ├── autobuild/
126 │   │   ├── agl
127 │   │   │   └── autobuild
128 │   │   ├── linux
129 │   │   │   └── autobuild
130 │   │   └── windows
131 │   │       └── autobuild
132 │   ├── app-templates/
133 │   │   ├── README.md
134 │   │   ├── cmake/
135 │   │   │   ├── export.map
136 │   │   │   └── macros.cmake
137 │   │   ├── samples.d/
138 │   │   │   ├── CMakeLists.txt.sample
139 │   │   │   ├── config.cmake.sample
140 │   │   │   ├── config.xml.in.sample
141 │   │   │   └── xds-config.env.sample
142 │   │   ├── template.d/
143 │   │   │   ├── autobuild/
144 │   │   │   │   ├── agl
145 │   │   │   │   │   └── autobuild.in
146 │   │   │   │   ├── linux
147 │   │   │   │   │   └── autobuild.in
148 │   │   │   │   └── windows
149 │   │   │   │       └── autobuild.in
150 │   │   │   ├── config.xml.in
151 │   │   │   ├── deb-config.dsc.in
152 │   │   │   ├── deb-config.install.in
153 │   │   │   ├── debian.changelog.in
154 │   │   │   ├── debian.compat.in
155 │   │   │   ├── debian.rules.in
156 │   │   │   ├── gdb-on-target.ini.in
157 │   │   │   ├── install-wgt-on-target.sh.in
158 │   │   │   ├── start-on-target.sh.in
159 │   │   │   ├── rpm-config.spec.in
160 │   │   │   └── xds-project-target.conf.in
161 │   │   └── wgt/
162 │   │       ├── icon-default.png
163 │   │       ├── icon-html5.png
164 │   │       ├── icon-native.png
165 │   │       ├── icon-qml.png
166 │   │       └── icon-service.png
167 │   ├── packaging/
168 │   │   ├── config.spec
169 │   │   └── config.deb
170 │   ├── cmake
171 │   │   └── config.cmake
172 │   └── wgt
173 │      └── config.xml.in
174 ├── <libs>
175 ├── <target>
176 │   └── <files>
177 ├── <target>
178 │   └── <file>
179 └── <target>
180     └── <files>
181 ```
182
183 | # | Parent | Description |
184 | - | -------| ----------- |
185 | \<root-path\> | - | Path to your project. Hold master CMakeLists.txt and general files of your projects. |
186 | conf.d | \<root-path\> | Holds needed files to build, install, debug, package an AGL app project |
187 | app-templates | conf.d | Git submodule to app-templates AGL repository which provides CMake helpers macros library, and build scripts. config.cmake is a copy of config.cmake.sample configured for the projects. SHOULD NOT BE MODIFIED MANUALLY !|
188 | autobuild | conf.d | Scripts generated from app-templates to build packages the same way for various platforms.|
189 | cmake | conf.d | Contains at least config.cmake file modified from the sample provided in app-templates submodule. |
190 | wgt | conf.d | Contains at least config.xml.in template file modified from the sample provided in app-templates submodule for the needs of project (See config.xml.in.sample file for more details). |
191 | packaging | conf.d | Contains output files used to build packages. |
192 | \<libs\> | \<root-path\> | External dependencies libraries. This isn't to be used to include header file but build and link statically specifics libraries. | Library sources files. Can be a decompressed library archive file or project fork. |
193 | \<target\> | \<root-path\> | A target to build, typically library, executable, etc. |
194
195 ### Update app-templates submodule
196
197 You may have some news bug fixes or features available from app-templates
198 repository that you want. To update your submodule proceed like the following:
199
200 ```bash
201 git submodule update --remote
202 git commit -s conf.d/app-templates
203 ```
204
205 This will update the submodule to the HEAD of master branch repository.
206
207 You could just want to update at a specified repository tag or branch or commit
208 , here are the method to do so:
209
210 ```bash
211 cd conf.d/app-templates
212 # Choose one of the following depending what you want
213 git checkout <tag_name>
214 git checkout --detach <branch_name>
215 git checkout --detach <commit_id>
216 # Then commit
217 cd ../..
218 git commit -s conf.d/app-templates
219 ```
220
221 ### Build a widget
222
223 ## config.xml.in file
224
225 To build a widget you need a _config.xml_ file describing what is your apps and
226 how Application Framework would launch it. This repo provide a simple default
227 file _config.xml.in_ that should work for simple application without
228 interactions with others bindings.
229
230 It is recommended that you use the sample one which is more complete. You can
231 find it at the same location under the name _config.xml.in.sample_ (stunning
232 isn't it). Just copy the sample file to your _conf.d/wgt_ directory and name it
233 _config.xml.in_, then edit it to fit your needs.
234
235 > ***CAUTION*** : The default file is only meant to be use for a
236 > simple widget app, more complicated ones which needed to export
237 > their api, or ship several app in one widget need to use the provided
238 > _config.xml.in.sample_ which had all new Application Framework
239 > features explained and examples.
240
241 ## Using cmake template macros
242
243 To leverage all cmake templates features, you have to specify ***properties***
244 on your targets. Some macros will not works without specifying which is the
245 target type.
246
247 As the type is not always specified for some custom targets, like an ***HTML5***
248 application, macros make the difference using ***LABELS*** property.
249
250 Choose between:
251
252 - **BINDING**: Shared library that be loaded by the AGL Application Framework
253 - **BINDINGV2**: Shared library that be loaded by the AGL Application Framework
254  This has to be accompagnied with a JSON file named like the
255  *${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI
256  syntax (e.g: *mybinding-apidef*).
257  Or Alternatively, you can choose the name, without the extension, using macro
258  **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES**
259  to *CXX*.
260 - **BINDINGV3**: Shared library that be loaded by the AGL Application Framework
261  This has to be accompagnied with a JSON file named like the
262  *${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI
263  syntax (e.g: *mybinding-apidef*).
264  Or Alternatively, you can choose the name, without the extension, using macro
265  **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES**
266  to *CXX*.
267 - **PLUGIN**: Shared library are meant to be used as a binding plugin. A binding
268  would load it as a plugin to extend its functionnalities. It should be named
269  with a special extension that you choose with SUFFIX cmake target property or
270  it'd be **.ctlso** by default.
271 - **HTDOCS**: Root directory of a web app. This target has to build its
272  directory and puts its files in the ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
273 - **DATA**: Resources used by your application. This target has to build its
274  directory and puts its files in the ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
275 - **EXECUTABLE**: Entry point of your application executed by the AGL
276  Application Framework
277 - **LIBRARY**: An external 3rd party library bundled with the binding for its
278  own purpose because platform doesn't provide it.
279 - **BINDING-CONFIG**: Any files used as configuration by your binding.
280
281 Optional **LABELS** are available to define which resources type your test
282 materials are:
283
284 - **TEST-CONFIG**: JSON configuration files that will be used by the afb-test
285  binding to know how to execute tests.
286 - **TEST-DATA**: Resources used to test your binding. It is at least your test
287  plan and also could be fixtures and any files needed by your tests. These files
288  will appear in a separate test widget.
289 - **TEST-PLUGIN**: Shared library meant to be used as a binding
290  plugin. Binding would load it as a plugin to extend its functionalities. It
291  should be named with a special extension that you choose with SUFFIX cmake
292  target property or it'd be **.ctlso** by default.
293 - **TEST-HTDOCS**: Root directory of a web app. This target has to build its
294  directory and put its files in the ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}
295 - **TEST-EXECUTABLE**: Entry point of your application executed by the AGL
296  Application Framework
297 - **TEST-LIBRARY**: An external 3rd party library bundled with the binding for its
298  own use in case the platform doesn't provide it.
299
300 Here is a mapping between LABELS and directories where files will be placed in
301 the widget:
302
303 - **EXECUTABLE** : \<wgtrootdir\>/bin
304 - **BINDING-CONFIG** : \<wgtrootdir\>/etc
305 - **BINDING** | **BINDINGV2** | **BINDINGV3** | **LIBRARY** : \<wgtrootdir\>/lib
306 - **PLUGIN** : \<wgtrootdir\>/lib/plugins
307 - **HTDOCS** : \<wgtrootdir\>/htdocs
308 - **BINDING-DATA** : \<wgtrootdir\>/var
309 - **DATA** : \<wgtrootdir\>/var
310
311 And about test dedicated **LABELS**:
312
313 - **TEST-EXECUTABLE** : \<wgtrootdir\>/bin
314 - **TEST-CONFIG** : \<TESTwgtrootdir\>/etc
315 - **TEST-PLUGIN** : \<wgtrootdir\>/lib/plugins
316 - **TEST-HTDOCS** : \<wgtrootdir\>/htdocs
317 - **TEST-DATA** : \<TESTwgtrootdir\>/var
318
319 > **TIP** you should use the prefix _afb-_ with your **BINDING* targets which
320 > stand for **Application Framework Binding**.
321
322 Example:
323
324 ```cmake
325 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
326                 LABELS "HTDOCS"
327                 OUTPUT_NAME dist.prod
328         )
329 ```
330
331 > **NOTE**: You doesn't need to specify an **INSTALL** command for these
332 > targets. This is already handle by template and will be installed in the
333 > following path : **${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}**
334
335 > **NOTE**: if you want to set and use `rpath` with your target you should use
336 > and set the target property `INSTALL_RPATH`.
337
338 ## Add external 3rd party library
339
340 ### Build, link and ship external library with the project
341
342 You could need to include an external library that isn't shipped in the
343 platform. Then you have to bundle the required library in the `lib` widget
344 directory.
345
346 Templates includes some facilities to help you to do so. Classic way to do so
347 is to declare as many CMake ExternalProject as library you need.
348
349 An ExternalProject is a special CMake module that let you define how to:
350 download, update, patch, configure, build and install an external project. It
351 doesn't have to be a CMake project and custom step could be added for special
352 needs using ExternalProject step. More informations on CMake [ExternalProject
353 documentation site](https://cmake.org/cmake/help/v3.5/module/ExternalProject.html?highlight=externalproject).
354
355 Example to include `mxml` library for [unicens2-binding](https://github.com/iotbzh/unicens2-binding)
356 project:
357
358 ```cmake
359 set(MXML external-mxml)
360 set(MXML_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mxml)
361 ExternalProject_Add(${MXML}
362     GIT_REPOSITORY https://github.com/michaelrsweet/mxml.git
363     GIT_TAG release-2.10
364     SOURCE_DIR ${MXML_SOURCE_DIR}
365     CONFIGURE_COMMAND ./configure --build x86_64 --host aarch64
366     BUILD_COMMAND make libmxml.so.1.5
367     BUILD_IN_SOURCE 1
368     INSTALL_COMMAND ""
369 )
370
371 PROJECT_TARGET_ADD(mxml)
372
373 add_library(${TARGET_NAME} SHARED IMPORTED GLOBAL)
374
375 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
376     LABELS LIBRARY
377     IMPORTED_LOCATION ${MXML_SOURCE_DIR}/libmxml.so.1
378     INTERFACE_INCLUDE_DIRECTORIES ${MXML_SOURCE_DIR}
379 )
380
381 add_dependencies(${TARGET_NAME} ${MXML})
382 ```
383
384 Here we define an external project that drive the build of the library then we
385 define new CMake target of type **IMPORTED**. Meaning that this target hasn't
386 been built using CMake but is available at the location defined in the target
387 property *IMPORTED_LOCATION*.
388
389 You could want to build the library as *SHARED* or *STATIC* depending on your needs
390 and goals. Then you only have to modify the external project configure step and change
391 filename used by **IMPORTED** library target defined after external project.
392
393 Then target *LABELS* property is set to **LIBRARY** to ship it in the widget.
394
395 Unicens project also need some header from this library, so we use the target
396 property *INTERFACE_INCLUDE_DIRECTORIES*. Setting that when another target link
397 to that imported target, it can access to the include directories.
398
399 We bound the target to the external project using a CMake dependency at last.
400
401 Then this target could be use like any other CMake target and be linked etc.
402
403 ### Only link and ship external library with the project
404
405 If you already have a binary version of the library that you want to use and you
406 can't or don't want to build the library then you only have to add an **IMPORTED**
407 library target.
408
409 So, taking the above example, `mxml` library inclusion would be:
410
411 ```cmake
412 PROJECT_TARGET_ADD(mxml)
413
414 add_library(${TARGET_NAME} SHARED IMPORTED GLOBAL)
415
416 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
417     LABELS LIBRARY
418     IMPORTED_LOCATION /path/to/library/libmxml.so.1
419     INTERFACE_INCLUDE_DIRECTORIES /path/to/mxml/include/dir
420 )
421 ```
422
423 Finally, you can link any other lib or executable target with this imported
424 library like any other target.
425
426 ## Macro reference
427
428 ### PROJECT_TARGET_ADD
429
430 Typical usage would be to add the target to your project using macro
431 `PROJECT_TARGET_ADD` with the name of your target as parameter.
432
433 Example:
434
435 ```cmake
436 PROJECT_TARGET_ADD(low-can-demo)
437 ```
438
439 > ***NOTE***: This will make available the variable `${TARGET_NAME}`
440 > set with the specificied name. This variable will change at the next call
441 > to this macros.
442
443 ### project_subdirs_add
444
445 This macro will search in all subfolder any `CMakeLists.txt` file. If found then
446 it will be added to your project. This could be use in an hybrid application by
447 example where the binding lay in a sub directory.
448
449 Usage :
450
451 ```cmake
452 project_subdirs_add()
453 ```
454
455 You also can specify a globbing pattern as argument to filter which folders
456 will be looked for.
457
458 To filter all directories that begin with a number followed by a dash the
459 anything:
460
461 ```cmake
462 project_subdirs_add("[0-9]-*")
463 ```
464
465 ### set_openapi_filename
466
467 Used with a target labelized **BINDINGV2** to define the file name, and
468 possibly a relative path with the current *CMakeLists.txt*.
469
470 If you don't use that macro to specify the name of your definition file
471 then the default one will be used, *${OUTPUT_NAME}-apidef* with
472 **OUTPUT_NAME** as the [target property].
473
474 > **CAUTION** you must only specify the name **WITHOUT** the extension.
475
476 ```cmake
477 set_openapi_filename('binding/mybinding_definition')
478 ```
479
480 [target property]: https://cmake.org/cmake/help/v3.6/prop_tgt/OUTPUT_NAME.html "OUTPUT_NAME property documentation"
481
482 ### add_input_files
483
484 Create custom target dedicated for HTML5 and data resource files. This macro
485 provides syntax and schema verification for different languages which are
486 about now: LUA, JSON and XML.
487
488 You could change the tools used to check files with the following variables:
489
490 - XML_CHECKER: set to use **xmllint** provided with major linux distribution.
491 - LUA_CHECKER: set to use **luac** provided with major linux distribution.
492 - JSON_CHECKER: no tools found at the moment.
493
494 ```cmake
495 add_input_file("${MY_FILES_LIST}")
496 ```
497
498 > **NOTE**: an issue at the check step on a file will stop at the build step.
499
500 ## Advanced build customization
501
502 ### Including additional cmake files
503
504 #### Machine and system custom cmake files
505
506 Advanced tuning is possible using additional cmake files that are included
507 automatically from some specifics locations. They are included in that order:
508
509 - Project CMake files normally located in _<project-root-path>/conf.d/app-templates/cmake/cmake.d_
510 - Home CMake files located in _$HOME/.config/app-templates/cmake.d_
511 - System CMake files located in _/etc/app-templates/cmake.d_
512
513 CMake files has to be named using the following convention: `XX-common*.cmake`
514 or `XX-${PROJECT_NAME}*.cmake`, where `XX` are numbers, `*` file name
515 (ie. `99-common-my_customs.cmake`).
516
517 > **NOTE** You need to specify after numbers that indicate include order, to
518 which project that file applies, if it applies to all project then use keyword
519 `common`.
520
521 So, saying that you should be aware that every normal cmake variables used at
522 project level could be overwritten by home or system located cmake files if
523 variables got the same name. Exceptions are cached variables set using
524 **CACHE** keyword:
525
526 Example:
527
528 ```cmake
529 set(VARIABLE_NAME 'value string random' CACHE STRING 'docstring')
530 ```
531
532 #### OS custom cmake files
533
534 This is meant to personalize the project depending on the OS your are using.
535 At the end of config.cmake, common.cmake will include lot of cmake file to
536 customize project build depending on your platform. It will detect your OS
537 deducing it from file _/etc/os-release_ now as default in almost all Linux
538 distribution.
539
540 So you can use the value of field **ID_LIKE** or **ID** if the
541 first one doesn't exists and add a cmake file for that distribution in your
542 _conf.d/cmake/_ directory or relatively to your _app-templates_ submodule path
543 _app-templates/../cmake/_
544
545 Those files has to be named use the following scheme _XX-${OSRELEASE}*.cmake_
546 where _XX_ are numbers, ${OSRELEASE} the **ID_LIKE** or **ID** field from
547 _/etc/os-release_ file. You can also define default OS configuration file
548 to use as fallback is none specific OS configuration is available using the
549 scheme _XX-default*.cmake_. Then is you need by example a module that isn't
550 named the same in one distro only, you only has to define a specific file to
551 handle that case then for all the other case put the configuration in the
552 default file.
553
554 ### Include customs templated scripts
555
556 As well as for additional cmake files you can include your own templated
557 scripts that will be passed to cmake command `configure_file`.
558
559 Just create your own script to the following directories:
560
561 - Home location in _$HOME/.config/app-templates/scripts_
562 - System location in _/etc/app-templates/scripts_
563
564 Scripts only needs to use the extension `.in` to be parsed and configured by
565 CMake command.
566
567 ## Autobuild script usage
568
569 ### Generation
570
571 To be integrated in the Yocto build workflow you have to generate `autobuild`
572 scripts using _autobuild_ target.
573
574 To generate those scripts proceeds:
575
576 ```bash
577 mkdir -p build
578 cd build
579 cmake .. && make autobuild
580 ```
581
582 You should see _conf.d/autobuild/agl/autobuild_ file now.
583
584 ### Available targets
585
586 Here are the available targets available from _autobuild_ scripts:
587
588 - **clean** : clean build directory from object file and targets results.
589 - **distclean** : delete build directory
590 - **configure** : generate project Makefile from CMakeLists.txt files.
591 - **build** : compile all project targets.
592 - **package** : build and output a wgt package.
593
594 You can specify variables that modify the behavior of compilation using
595 the following variables:
596
597 - **CONFIGURE_ARGS** : Variable used at **configure** time.
598 - **BUILD_ARGS** : Variable used at **build** time.
599 - **DEST** : Directory where to output ***wgt*** file.
600
601 Variable as to be in CMake format. (ie: BUILD_ARGS="-DC_FLAGS='-g -O2'")
602
603 Usage example:
604
605 ```bash
606 ./conf.d/autobuild/wgt/autobuild package DEST=/tmp
607 ```