The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)
Packaging/rpm
In Mer we have tool package called spectacle that has collection of tools that are helping in some basics of packaging. In this guide the binary called specify is used to ease the start of the rpm packaging.
In this guide the package name is 'example-pkg and one should replace that with proper name when doing the own package.
Creating the initial version
specify --new=example-pkg
This outputs the following lines
Info: New spectacle yaml file created: example-pkg.yaml Q: Continue to edit the new file?(Y/n)
After answering Y or pressing enter the default editor (vim) is started and template is shown. This template needs to be modified for your package needs.
Name: ^^^ Summary: ^^^ Description: ^^^ Version: ^^^ Group: ^^^
Usually set to GPLv2, MIT or similar
License: ^^^
Sources:
List of source files one has in packaging. NOTE: patches have separate section.
- ^^^ Requires:
Packages that are required by this package, should be noted that dynamic library dependencies are automatically found by rpm and one doesn't need to list those here
- ^^^ PkgBR:
Package build requirements, these will appear as "BuildRequires: value" to .spec
- ^^^
Package pkgconfig build requirements, these will appear as "BuildRequires: pkgconfig(value)" to .spec
PkgConfigBR: - ^^^ # Please replace all "^^^" with valid values, or remove the unused keys. # And cleanup these comments lines for the best.
In addition to the lines mentioned above following lines are often also used
Patches: - ^^^ NoSetup: True Configure: none Builder: none
After saving and exiting the editor file called example-pkg.yaml is created to the current working directory.
From the .yaml file a .spec file is created with
specify example-pkg.yaml
This command returns some warning and/or errors depending on your .yaml file syntax validity.
After a successful run one should see following files in working directory
example-pkg.spec example-pkg.yaml
# # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version 0.25 # Name: example-pkg # >> macros # << macros Summary: Example summary Version: 0.1 Release: 1 Group: Example Group License: GPLv2 Source100: example-pkg.yaml %description %{summary}. %prep # >> setup # << setup %build # >> build pre # << build pre # >> build post # << build post %install rm -rf %{buildroot} # >> install pre # << install pre # >> install post # << install post %files %defattr(-,root,root,-) # >> files # << files