Contents |
Spectacle is the toolset for packaging maintenance of MeeGo, including the tool to generate spec files from metadata file in YAML format, and tools to convert spec files or spec-builder's ini files to YAML format.
For spectacle managed packages, all generic packaging information will be stored in the YAML file, and it also allows maintaining customizations in the spec file directly with special enclosure tags.
Three separated tools will be installed:
Several methods available for spectacle installation:
From MeeGo Tools Repo, repo urls and install packages can be found for: * MeeGo * Fedora 10,11,12 * openSUSE(s) * xUbuntu 8.10/9.04/9.10/10.04 * Debian 5.0
The latest code in git tree can be accessed at: [git://gitorious.org/meego-developer-tools/spectacle.git]
Note on Ubuntu installation From this Edit or create /etc/apt/sources.list.d/meego.list with sudo Add
deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/9.10/ /
run the following commands
sudo apt-get update
In many linux distributions, the needed package might be "python-cheetah".
Usage: specify [options] [yaml-path]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-o OUTFILE_PATH, --output=OUTFILE_PATH
Path of output spec file
-s, --skip-scm Skip to check upstream SCM when specified in YAML
-N, --not-download Do not try to download newer source files
-n, --non-interactive
Non interactive running, to use default answers
--new=NEWYAML Create a new yaml from template
--newsub=NEWSUB Append a new sub-package to current yaml
Usage: ini2spectacle [options] [ini-path]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-o OUTFILE_PATH, --output=OUTFILE_PATH
Path of output yaml file
-f, --include-files To store files list in YAML file
Usage: spec2spectacle [options] [spec-path]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-o OUTFILE_PATH, --output=OUTFILE_PATH
Path of output yaml file
-r, --replace-macros To replace self-defined macros in spec file
--no-builder-parsing Do NOT try to parse build/install scripts
-f, --include-files To store files list in YAML file
The syntax of YAML can be refered here: <http://www.yaml.org/spec/>
Two example spectacle YAML files are placed to examples/ directory in source code:
All available directives for spectacle are listed as the following:
* Name * Summary * Description, *optional* * Group, *optional* * Requires, *optional* * FilesInput, *optional* * etc.
CAUTION: The following cases of value string have special meaning in YAML syntax:
* string with leading **``%``** charactor * string with leading **``*``** charactor * string contains **``:``** charactor and one or more spaces/tabs after **``:``**
Then these string values need to be quoted by ``'``(single-quote) or ``"`` (double-quote), and the choice of quote char should not conflict with the value string self.**
For the following spectacle YAML keywords:
If one of the items need to be architecture specified, we can add arch prefix to it. The supported prefix and the corresponding architectures as the followings:
Here's some samples:
Requires:
- arm:pkg-need-in-arm-image
- ix86:pkg-need-in-x86-image
- normal-pkg
ConfigOptions:
- arm:--arm-specific-opt
- ix86:--ix86-specific-opt
- --common-opt
Generated spec files by specify will have many placeholders for customizations, such as:
# >> build pre # << build pre
You can add any custom code between the markers, next time when you run ``specify``, the text between the markers will be kept as is, all other sections relying on the meta data from the YAML file will be changed depending on the values in the YAML file.
The following placeholders in spec can be customized:
With placeholder:
# >> macros
# << macros
With placeholder:
# >> setup
# << setup
With placeholder:
# >> build pre
# << build pre
With placeholder:
# >> build post
# << build post
With placeholder:
# >> install pre
# << install pre
With placeholder:
# >> install post
# << install post
With placeholder:
# >> files [sub-package]
# << files [sub-package]
NOTE**: "sub-packge" stands for the name of sub-package, and it is optional. If no sub-package name specified, it means the files of **main** package. NOTE**: If the file list is simple enough, you can use YAML *Files* keyword instead to record it.
With placeholder:
# >> check
# << check
NOTE**: Only if YAML boolean *Check* is specifed as ``yes``, %check with placeholder lines will be generated in .spec.
With placeholder:
# >> pre
# << pre
NOTE**: The placeholder lines will NOT generated in spec by default. If you need customized %pre scripts, it need be added manually, and only once.
With placeholder:
# >> preun
# << preun
NOTE**: The placeholder lines will NOT generated in spec by default. If you need customized %preun scripts, it need be added manually, and only once.
With placeholder:
# >> post
# << post
NOTE**: The placeholder lines will NOT generated in spec by default. If you need customized %post scripts, it need be added manually, and only once.
With placeholder:
# >> postun
# << postun
NOTE**: The placeholder lines will NOT generated in spec by default. If you need customized %postun scripts, it need be added manually, and only once.