Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
dev:sahana_packaging_rpm [2008/04/28 11:56]
ravithb
dev:sahana_packaging_rpm [2009/02/26 22:07]
fran
Line 1: Line 1:
-====== Packaging the Sahana RPM======+====== Packaging the Sahana RPM ======
  
 +=== Automated Method ===
 +This works on Debian:
 +
 +  cvs -z3 -d:pserver:anonymous@sahana.cvs.sourceforge.net:/cvsroot/sahana co -P sahana-ext
 +  sahana-ext/release/redhat/redhat.sh
 +
 +=== Manual Method ===
  
 1. Create the following folder structure. 1. Create the following folder structure.
-<code> +  mkdir -p /tmp/sahana-rpm/usr/share 
-/tmp +  mkdir -p /tmp/sahana-rpm/var/www/html
-  | +
-  +-- /sahana-rpm +
-  |        | +
-  |        +-- /usr +
-  |        |    | +
-  |        |    +-- /share +
-  |        | +
-  |        +-- /var +
-  |             | +
-  |             +-- /www +
-  |                  | +
-  |                  +-- /html +
-  | +
-  +-- sahana.spec +
-</code>+
  
-2. Open the sahana.spec file with your favourite text editor and enter the following+2. Create a file /tmp/sahana.spec with your favourite text editor and enter the following
 <code> <code>
 %define name sahana %define name sahana
-%define version 6.2.2 +%define version 0.6.2.2 
-%define release RC1+%define release RC2
  
-Summary: Sahana - an opensource disaster management system.+Summary: Sahana is a Free & Open Source Disaster Management system.
 Name: %{name} Name: %{name}
 Version: %{version} Version: %{version}
Line 33: Line 25:
 Vendor: Lanka Software Foundation Vendor: Lanka Software Foundation
 URL: http://www.opensource.lk URL: http://www.opensource.lk
-License: GPL+License: LGPL
 Group: Software/Disaster Management Group: Software/Disaster Management
 Prefix: %{_prefix} Prefix: %{_prefix}
 BuildRoot: /tmp/sahana-rpm BuildRoot: /tmp/sahana-rpm
-requires: httpd >= 2.0, mysql-server >= 5.0, mysql >= 5.0, php-mysql >= 5.0, php >= 5.0, php-gd >= 5.0, php5-gettext >= 5.0+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 %description
-Sahana is an opensource software for management of disasters.+Sahana is a Free & Open Source software for management of disasters.
  
 %prep %prep
Line 57: Line 49:
  
 %post %post
 +if [ -x /usr/bin/firefox ]; then
 +        echo "Opening firefox...."
 +        url="http://localhost/sahana"
 +        firefox -remote openurl\($url,new-tab\) || firefox $url & 2>&1 1>/dev/null
 +fi
  
 </code> </code>
Line 66: Line 63:
  
 </code> </code>
-4. Download the sahana source tar ball and extract it to /tmp/sahana-rpm/usr/share/sahana \+4. Download the sahana source tar ball and extract it to /tmp/sahana-rpm/usr/share/sahana 
 The folder /tmp/sahana-rpm/usr/share/sahana should contain all the sahana folders. eg: 3rd, lib, conf, www, mod, etc.... The folder /tmp/sahana-rpm/usr/share/sahana should contain all the sahana folders. eg: 3rd, lib, conf, www, mod, etc....
  
Line 77: Line 75:
 </code> </code>
  
-6. Execute the following command to create the rpm.+6. Create a file named '.rpmmacros' in your home directory with the following contents.
 <code> <code>
-cd /tmp/sahana-rpm+%packager      Your name <Your email address> 
 +%vendor     Sahana 
 + 
 +%_topdir       /tmp/sahana-rpm 
 + 
 +</code> 
 + 
 +7. Execute the following command to create the rpm. 
 +<code> 
 +cd /tmp
 rpmbuild -bb sahana.spec rpmbuild -bb sahana.spec
  
 </code> </code>
  
-7. The rpm file will be created under /tmp/sahana-rpm/RPMS/<arch>/+8. The rpm file will be created under /tmp/sahana-rpm/RPMS/<arch>/
  
-6.  
  

Navigation
QR Code
QR Code dev:sahana_packaging_rpm (generated for current page)