From Mageia wiki
Other languages English ; Francais |
This is a small list of Mageia-specific considerations for writing spec files. Sort of an FAQ:
- licensing: check licensing very carefully (on web AND on a source file) and doublecheck with the valid Mageia licenses : Fedora licensing page
- comments: read the comments in the spec file, there's a reason those are there, the author probably had something specific in mind.
- naming: if it's not in a specific policy, check how similars are named.
- %changelog: we do not put a changelog in the spec file; there is another way to keep history, except when importing new srpm.
- importing: before importing, check if it's already imported.
- filetriggers: mageia has filetriggers, don't put needless stuff in %post.
- updating: updating a package does odd things with %pre and %post.
- Source: try to have urls in sources as much as possible. if only for easier updating.
- repackaging: try to avoid repackaging upstream stuff.
- versioning: we use %mkrel for release versioning; when updating, please doublecheck how release numbers are increased.
- macros: check what macros you have (rpm --showrc lists them; rpm --eval <macro> evaluates(expands) them), there are some useful ones there (e.g.: %apply_patches ).
- %files: try not to own directories you shouldn't own (ie: delete when you uninstall ).
- %config: make sure config files aren't overwritten, don't put them in %doc .
- out-of-the-box: try to get your package to work out of the box, if upstream installs it differently, just move it after installing to the correct place.
- BuildRequire: doublecheck buildrequires by building it with the Build System.
- upstream: don't deviate too much from upstream, and push your own patches back to upstream.
- git-svn: if you work with lots of patches, you might be interested in using git-svn.
- LICENSES: last but not least: check licensing very carefully (on web AND on a source file) and doublecheck with the valid Mageia licenses.
- %description formatting see https://bugs.mageia.org/show_bug.cgi?id=27274#c15