Differences
This shows you the differences between two versions of the page.
dev:sahana_packaging_rpm [2009/02/26 21:43] fran Automated Method |
dev:sahana_packaging_rpm [2009/07/06 20:36] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Packaging the Sahana RPM ====== | ||
- | |||
- | === Automated Method === | ||
- | This works on Debian: | ||
- | |||
- | cvs -z3 -d: | ||
- | sahana-ext/ | ||
- | |||
- | === Manual Method === | ||
- | |||
- | 1. Create the following folder structure. | ||
- | < | ||
- | /tmp | ||
- | | | ||
- | +-- /sahana-rpm | ||
- | | | | ||
- | | +-- /usr | ||
- | | | | | ||
- | | | +-- /share | ||
- | | | | ||
- | | +-- /var | ||
- | | | | ||
- | | +-- /www | ||
- | | | | ||
- | | +-- /html | ||
- | | | ||
- | +-- sahana.spec | ||
- | </ | ||
- | |||
- | 2. Open the sahana.spec file with your favourite text editor and enter the following | ||
- | < | ||
- | %define name sahana | ||
- | %define version 0.6.2.2 | ||
- | %define release RC2 | ||
- | |||
- | Summary: Sahana is a Free & Open Source Disaster Management system. | ||
- | Name: %{name} | ||
- | Version: %{version} | ||
- | Release: %{release} | ||
- | Vendor: Lanka Software Foundation | ||
- | URL: http:// | ||
- | License: LGPL | ||
- | Group: Software/ | ||
- | Prefix: %{_prefix} | ||
- | BuildRoot: / | ||
- | requires: httpd >= 2.0, mysql-server >= 5.0, mysql >= 5.0, php-mysql >= 5.0, php >= 5.0, php-gd >= 5.0, php5-common >= 5.0 | ||
- | |||
- | %description | ||
- | Sahana is a Free & Open Source software for management of disasters. | ||
- | |||
- | %prep | ||
- | |||
- | %build | ||
- | |||
- | |||
- | %install | ||
- | |||
- | |||
- | %files | ||
- | / | ||
- | / | ||
- | |||
- | %clean | ||
- | |||
- | %post | ||
- | if [ -x / | ||
- | echo " | ||
- | url=" | ||
- | firefox -remote openurl\($url, | ||
- | fi | ||
- | |||
- | </ | ||
- | |||
- | 3. Execute the following commands | ||
- | < | ||
- | cd / | ||
- | mkdir BUILD RPMS SRPMS SOURCES SPECS | ||
- | |||
- | </ | ||
- | 4. Download the sahana source tar ball and extract it to / | ||
- | The folder / | ||
- | |||
- | 5. Execute the following command | ||
- | < | ||
- | cd / | ||
- | chmod a+w conf www/tmp | ||
- | cd / | ||
- | ln -s ../ | ||
- | </ | ||
- | |||
- | 6. Create a file named ' | ||
- | < | ||
- | %packager | ||
- | %vendor | ||
- | |||
- | %_topdir | ||
- | |||
- | </ | ||
- | |||
- | 7. Execute the following command to create the rpm. | ||
- | < | ||
- | cd /tmp | ||
- | rpmbuild -bb sahana.spec | ||
- | |||
- | </ | ||
- | |||
- | 8. The rpm file will be created under / | ||
- | |||