This file is indexed.

/usr/share/doc/spectacle/README.html is in spectacle 0.25-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
<h1>Spectacle Tutorial</h1>

<h2>Introduction</h2>

<p>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.</p>

<p>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.</p>

<p>Three separated tools will be installed:</p>

<ul>
<li>specify: the tool to generate or to update spec file, based on YAML</li>
<li>ini2spectacle: the tool to convert spec-builder .ini to YAML and new spec file</li>
<li>spec2spectacle: the tool to convert original spec to YAML and new spec file</li>
</ul>

<h2>Installation</h2>

<h3>Instruction</h3>

<p>Several methods available for spectacle installation:</p>

<ul>
<li><p>rpm/deb packages for several supported Linux distributions</p>

<p>From <a href="http://repo.meego.com/tools/repo/">MeeGo Repos</a>, repo urls can be found for:</p>

<ul>
<li>MeeGo</li>
<li>Fedora 10,11,12</li>
<li>openSUSE(s)</li>
<li>xUbuntu 8.10/9.04/9.10</li>
<li>Debian 5.0</li>
</ul></li>
<li><p>Download the latest source package, and install it by <code>make install</code></p>

<p>(Only running <code>setup.py install</code> is not enough!)</p>

<p>The latest code in git tree can be accessed at:
<a href="git://gitorious.org/meego-developer-tools/spectacle.git">git tree</a></p></li>
</ul>

<h3>Requirements</h3>

<ul>
<li>python 2.x, above 2.5</li>
<li>PyYAML, the python module for YAML parsing</li>
<li>cheetah, one popular templating system for python
<ul>
<li>In many linux distributions, the package may be named as python-cheetah.</li>
</ul></li>
</ul>

<h2>Usage</h2>

<h3>specify</h3>

<pre><code>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
</code></pre>

<h3>ini2spectacle</h3>

<pre><code>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
</code></pre>

<h3>spec2spectacle</h3>

<pre><code>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
</code></pre>

<h2>Syntax of spectacle YAML</h2>

<p>The syntax of YAML can be refered here: <a href="http://www.yaml.org/spec/">http://www.yaml.org/spec/</a></p>

<p>Two example spectacle YAML files are placed to examples/ directory in source
code:</p>

<ul>
<li>xfce4-session.yaml, a real world sample with most of the elements</li>
<li>general.yaml, a fake spectacle contains all the available elements,
with comments</li>
</ul>

<p>All available directives for spectacle are listed as the following:</p>

<ul>
<li><p>Name: <strong>string</strong></p></li>
<li><p>Summary: <strong>string</strong></p></li>
<li><p>Version: <strong>string</strong>, version string</p></li>
<li><p>Release: <strong>string</strong></p></li>
<li><p>Epoch: <strong>string</strong></p></li>
<li><p>Group: <strong>string</strong></p></li>
<li><p>License: <strong>string</strong></p></li>
<li><p>URL: <strong>string</strong></p></li>
<li><p>SCM: <strong>string</strong>, URL to git tree</p></li>
<li><p>Archive: <strong>string</strong>, format for output of SCM tarball, e.g., gzip, bzip2, xz</p></li>
<li><p>BuildArch: <strong>string</strong></p></li>
<li><p>ExclusiveArch: <strong>string</strong></p></li>
<li><p>Prefix: <strong>string</strong></p></li>
<li><p>LocaleName: <strong>string</strong></p></li>
<li><p>LocaleOptions: <strong>string</strong></p></li>
<li><p>Description: <strong>text</strong></p></li>
<li><p>Sources: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>SourcePrefix: <strong>string</strong>, specify the prefix path in source package</p></li>
<li><p>ExtraSources: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>SetupOptions: <strong>string</strong>, the options string for %setup</p></li>
<li><p>Patches: <strong>list</strong> of <strong>string</strong>, all patches need to be in 'p1' level</p></li>
<li><p>Requires: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>RequiresPre: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>RequiresPreUn: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>RequiresPost: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>RequiresPostUn: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>PkgBR: <strong>list</strong> of <strong>string</strong>, packages required in building, or BuildRequires</p></li>
<li><p>PkgConfigBR: <strong>list</strong> of <strong>string</strong>, pkg-config requires in building</p></li>
<li><p>Provides: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>Conflicts: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>Obsoletes: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>BuildConflicts: <strong>list</strong> of <strong>string</strong></p></li>
<li><p>Macros: <strong>list* of **string</strong></p></li>
<li><p>Macros2: <strong>list* of **string</strong></p></li>
<li><p>Configure: <strong>string</strong>, valid values: <strong>autogen</strong>, <strong>configure</strong>,
<strong>reconfigure</strong>, <strong>none</strong>
<strong>If not specified, the default value "configure" will be used</strong></p></li>
<li><p>ConfigOptions: <strong>list</strong>, extra options for <code>Configure</code></p></li>
<li><p>Builder: <strong>string</strong>, valid values: <strong>make</strong>, <strong>single-make</strong>,
<strong>python</strong>, <strong>perl</strong>, <strong>qmake</strong>, <strong>none</strong>
<strong>If not specified, the deault value "make" will be used. If do not want a
automatic builder, please use "none".</strong></p></li>
<li><p>QMakeOptions: <strong>list</strong>, extra options for <strong>qmake</strong> <code>Builder</code></p></li>
<li><p>Files: <strong>list</strong> of <strong>string</strong>, content of <code>%files</code> for small packages</p></li>
<li><p>FilesInput: <strong>string</strong>, extra input source for %files</p></li>
<li><p>NoFiles: <strong>boolean</strong>, if to be set as True, means no %files section for this package and it cause no rpm generated</p></li>
<li><p>RunFdupes: <strong>string</strong>, path under %buildroot to run <code>%fdupes</code> macro in %install</p></li>
<li><p>RpmLintIgnore: <strong>list</strong>, list of skip items for <code>rpmlint</code></p></li>
<li><p>Check: <strong>boolean</strong>, whether need <code>%check</code> section in spec</p></li>
<li><p>SupportOtherDistros: <strong>boolean</strong>, whether need to check for other distros (besides MeeGo)</p></li>
<li><p>UseAsNeeded: <strong>boolean</strong>, whether export LD_AS_NEEDED=1 environ variable before building</p></li>
<li><p>NoAutoReq: <strong>boolean</strong>, whether add 'AutoReq: 0' to spec</p></li>
<li><p>NoAutoProv: <strong>boolean</strong>, whether add 'AutoProv: 0' to spec</p></li>
<li><p>NoSetup: <strong>boolean</strong>, whether to skip using <code>%setup</code> in <code>%prep</code></p></li>
<li><p>NoAutoLocale: <strong>boolean</strong>, whether to use <code>%find_lang</code> to search locale data when found 'intltool' in PkgBR</p></li>
<li><p>NoDesktop: <strong>boolean</strong>, whether to install the desktop files in package</p></li>
<li><p>UpdateDesktopDB: <strong>boolean</strong>, whether to run 'update-desktop-database' to flush cache when package (un)installation</p></li>
<li><p>NoIconCache: <strong>boolean</strong>, whether to run 'gtk-update-icon-cache' if icon files found in package</p></li>
<li><p>AutoDepend: <strong>boolean</strong>, for subpackages only, whether to add Require to main package automatically</p></li>
<li><p>AsWholeName: <strong>boolean</strong>, for subpackages only, whether to use <strong>Name</strong> as the whole package name</p></li>
<li><p>AutoSubPackages: <strong>list</strong> of <strong>string</strong>, mainly for '-devel'</p></li>
<li><p>SubPackages: <strong>list</strong> of <strong>dict</strong>, the <strong>dict</strong> item is the lower level
directives for sub packages:</p>

<ul>
<li>Name</li>
<li>Summary</li>
<li>Description</li>
<li>Group</li>
<li>etc.</li>
</ul></li>
</ul>

<p><strong>CAUTION</strong>: The following cases of value string have special meaning in YAML syntax:</p>

<ul>
<li>string with leading <strong><code>%</code></strong> charactor</li>
<li>string with leading <strong><code>*</code></strong> charactor</li>
<li>string contains <strong><code>:</code></strong> charactor and one or more spaces/tabs after <strong><code>:</code></strong></li>
<li>string end with <strong><code>:</code></strong> charactor</li>
</ul>

<p><strong>Then these string values need to be quoted by <code>'</code>(single-quote) or <code>"</code>
(double-quote), and the choice of quote char should not conflict with the value
string self.</strong></p>

<h2>Mandatory and valid keywords for all packages</h2>

<h3>Mandatory keywords</h3>

<p>The following keywords are mandatory for main package:</p>

<ul>
<li>Name</li>
<li>Summary</li>
<li>Description</li>
<li>Version</li>
<li>Group</li>
<li>License</li>
</ul>

<p>The following keywords are mandatory for sub-package:</p>

<ul>
<li>Name</li>
<li>Summary</li>
<li>Description</li>
<li>Group</li>
</ul>

<h3>Valid keywords for sub-packages</h3>

<p>For sub-packages, only a subset of keywords can be specified:</p>

<ul>
<li>Name</li>
<li>Summary</li>
<li>Description</li>
<li>Group</li>
<li>License</li>
<li>Version</li>
<li>Release</li>
<li>Epoch</li>
<li>URL</li>
<li>BuildArch</li>
<li>Files</li>
<li>Prefix</li>
<li>Requires</li>
<li>RequiresPre</li>
<li>RequiresPreUn</li>
<li>RequiresPost</li>
<li>RequiresPostUn</li>
<li>Provides</li>
<li>Conflicts</li>
<li>Obsoletes</li>
<li>NoAutoReq</li>
<li>NoAutoProv</li>
<li>NoAutoReqProv</li>
<li>NoIconCache</li>
<li>FilesInput</li>
</ul>

<h3>Keywords only for sub-packages</h3>

<p>The following keywords are only valid for sub-packages:</p>

<ul>
<li>AsWholeName</li>
<li>AutoDepend</li>
</ul>

<h2>Namespace support for multi-architecture in several keywords</h2>

<p>For the following spectacle YAML keywords:</p>

<ul>
<li>Requires</li>
<li>PkgBR</li>
<li>PkgConfigBR</li>
<li>Patches</li>
<li>ConfigOptions</li>
<li>QMakeOptions</li>
</ul>

<p>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:</p>

<ul>
<li><code>ix86:</code> -   x86 platform</li>
<li><code>arm:</code>  -   generic arm platform</li>
<li><code>armv5:</code>  -   armv5 platform, will expand to "armv5el armv5tel armv5tejl"</li>
<li><code>armv7:</code>  -   armv7 platform, will expand to "armv7el armv7tel armv7l armv7hl armv7nhl"</li>
</ul>

<p>Here's some samples:</p>

<pre><code>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
</code></pre>

<h2>Customizations in spec</h2>

<p>Generated spec files by specify will have many placeholders for customizations,
such as:</p>

<pre><code># &gt;&gt; build pre
# &lt;&lt; build pre
</code></pre>

<p>You can add any custom code between the markers, next time when you run
<code>specify</code>, 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.</p>

<p>The following placeholders in spec can be customized:</p>

<ul>
<li><p>Private Macros, used in this package's spec</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; macros
# &lt;&lt; macros
</code></pre></li>
<li><p>Private Macros2, used in this package's spec</p>

<pre><code># &gt;&gt; macros2
# &lt;&lt; macros2
</code></pre></li>
</ul>

<p><strong>NOTE</strong>: The placeholder lines will NOT generated in spec by default. If
you need customized macros2, it need be added manually before %pre section
of the .spec file, and only once.</p>

<ul>
<li><p>Extra setup scripts in the last of <code>%prep</code></p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; setup
# &lt;&lt; setup
</code></pre></li>
<li><p>Pre-Build, scripts before package building</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; build pre
# &lt;&lt; build pre
</code></pre></li>
<li><p>Post-Build, scripts after package building</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; build post
# &lt;&lt; build post
</code></pre></li>
<li><p>Pre-Install, scripts before package installation</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; install pre
# &lt;&lt; install pre
</code></pre></li>
<li><p>Post-Install, scripts after package installation</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; install post
# &lt;&lt; install post
</code></pre></li>
<li><p>Files, files list in packaged rpm</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; files [[-p] sub-package]
# &lt;&lt; files [[-p] sub-package]
</code></pre>

<p><strong>NOTE</strong>: "sub-packge" stands for the name of sub-package, and it is optional.
If no sub-package name specified, it means the files of <strong>main</strong> package.
<strong>NOTE</strong>: If the file list is simple enough, you can use YAML <em>Files</em> keyword
instead to record it.</p></li>
<li><p>Scripts for %check section</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; check
# &lt;&lt; check
</code></pre>

<p><strong>NOTE</strong>: Only if YAML boolean <em>Check</em> is specifed as <code>yes</code>, %check with
placeholder lines will be generated in .spec.</p></li>
<li><p>Scriptlets for %pre section</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; pre
# &lt;&lt; pre
</code></pre>

<p><strong>NOTE</strong>: The placeholder lines will NOT generated in spec by default. If
you need customized %pre scripts, it need be added manually, and only once.</p></li>
<li><p>Scriptlets for %preun section</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; preun
# &lt;&lt; preun
</code></pre>

<p><strong>NOTE</strong>: The placeholder lines will NOT generated in spec by default. If
you need customized %preun scripts, it need be added manually, and only once.</p></li>
<li><p>Scriptlets for %post section</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; post
# &lt;&lt; post
</code></pre>

<p><strong>NOTE</strong>: The placeholder lines will NOT generated in spec by default. If
you need customized %post scripts, it need be added manually, and only once.</p></li>
<li><p>Scriptlets for %postun section</p>

<p>With placeholder:</p>

<pre><code># &gt;&gt; postun
# &lt;&lt; postun
</code></pre>

<p><strong>NOTE</strong>: The placeholder lines will NOT generated in spec by default. If
you need customized %postun scripts, it need be added manually, and only once.</p></li>
</ul>

<h2>Internal Implementation</h2>

<p>Spectacle uses cheetah templates to generate the spec file, based the metadata
from YAML file. But the end users need not tackle it.</p>

<h2>Tips</h2>

<ul>
<li><p>If to upgrade the pkg to a newer version, you can just edit the
version string in spectacle YAML file, and when you run <code>specify</code>, it
will download the needed files for you automatically.</p></li>
<li><p>For packages with locale data, <em>LocaleName</em> is needed. If package
maintainers cannot confirm whether there are locale files, they can just
do not use <em>LocaleName</em> at first, and whenever "unpackaged files" rpm
packaging errors encountered, it means <em>LocaleName</em> should be added. And
please do not use it for packages without locale data to keep them clean,
though it will not block the building and packaging.</p></li>
<li><p>When using spec2spectacle/ini2spectacle to generate spectacle, the following
problems should be checked:</p>

<ul>
<li>Remove duplicate Requires(include pre/post/preun/postun) which were
added automatically based on the analysis of file list.</li>
<li>Review and clean up the reserved scripts in "build|install pre|post"
sections in new generated spec file.</li>
</ul></li>
<li><p>User can use "series.conf" file to specify multiple patches under package directory.
The "series.conf" can be used by <code>quilt</code> and the content can be updated to spec
automatically when running <code>specify</code>.</p></li>
</ul>