Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Creating OpenClonk RPM package
- By AlteredARMOR [ua] Date 2010-04-25 15:21
Here is a brief instruction on how to make an OpenClonk RPM-file:

1. What do you need:


1.1 An RPM-based Linux system (I used Fedora 12).
1.2 Installed packages from the dependency list in README.linux file plus the mercurial system.
1.3 A user which will perform an rpm-building process (not root!!!).
1.4 3 files which are attached below copied to the user's home directory.
1.5 Access to the OpenClonk repository.

2. How to prepare the process:


2.1 Check out (clone) the OpenClonk source into the ~/openclonk directory (where "~" stands for user's home directory).
2.2 Run makedirs.sh from the user's home directory. This will create an ~/rpmbuild directory with several directories in it.
2.3 Move openclonk.spec to the ~/rpmbuild/SPECS/ directory. You will have to modify it a bit.

3. How to edit openclonk.spec:


3.1 In the first line there is an %define user clonk instruction. You must change clonk to the name of the user you have created on stage 1.3.
3.2 Change version in the %define version 1.0 line to the version you want to have (WARNING! this is important you remember this version very well for it will be needed furthermore).
3.3 You can also change %define release 1 line but it is not that necessary (in the end you should receive openclonk-1.0-X-i386.rpm file where X stands for revision number).
3.4 Current specification file is rather old so it does not concern the latest discussions on forum. There's been a talk about current release title, so you must also change Summary: {...} line (where {...} should be changed to the current OpenClonk title).
3.5 Change the Group: {...} line if you think I made a mistake (the Group is used by the RPM-managing software to group/categorise packages and provide faster search for the needed one).
3.6 The BuildRequires: {...} section is very important for package consistency. If there is a change in OpenClonk dependency list it MUST be listed here as well.
3.7 A good description should be written in the respective (%description) section.

4. How to finally make it:


4.1 Switch back to the user home directory (cd ~/)
4.2 Change version=1.0 line in the cto.sh file to the same version you've mentioned on stage 3.2.
4.3 Run the cto.sh script from the user's home directory/ This script should create a tarball from the source you have in ~/openclonk directory and move it to the respective folder (~/rpmbuild/SOURCES/) and then start the RPM-building process.
4.4 In the end you will have an openclonk-something.rpm file copied to the user's home directory. It can be installed with the rpm -i openclonk-something.rpm command by the user with administrative privileges. All necessary files will be copied to the /usr/local/openclonk folder and you will have /usr/local/bin/openclonk script to start the game.

Everything "should" work fine. If you have any questions/remarks/bug_reports, please, feel free to state them below.
Attachment: openclonk.spec - RPM specification file (1k)
Attachment: makedirs.sh - Script to create necessary directories (167B)
Attachment: cto.sh - The most important script to make everyone happy (343B)
Reply
Up Topic Development / Developer's Corner / Creating OpenClonk RPM package

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill