[SOGo] Building RPMS

Wolfgang Sourdeau sogo@opengroupware.org
Mon, 15 Oct 2007 09:26:04 -0400


On 2007-10-15 05:18:29 -0500 Chris Picton <chrisp@tangent.co.za> wrote:

> On Thu, 2007-09-20 at 11:18 +0200, Chris Picton wrote:
>> Hi
>> 
>> Can someone please point me to the script which is used to build 
>> RPMS.
>> 
>> I want to try patching a few things (courier IMAP support), but want
>> to keep using RPMS for my testing.
> 
> 
> Any links to the spec files?

If you download the SRPMS and install them using "rpm -i 
file.src.rpm", the spec file will automatically be placed in 
/usr/src/redhat/SPECS/.

The command-line to use them is however a bit complex, with many 
constant definition. In order, here they are:


for SOPE:
rpmbuild -ba sope.spec -D'sope_source sope.tar.gz' 
-D'sope_major_version 4' -D'sope_minor_version 7' -D'sope_version 
gnustep' -D'sope_release inverse1512' -D'sope_buildcount 1' 
-D'dist_suffix gnustep.rhel5' -D'sope_prefix /usr/GNUstep/System' 
-D'sope_makeflags all' -D'sope_version 4.7'

for modngobjweb:
rpmbuild -ba mod_ngobjweb_rhel5.spec  -D'mod_ngobjweb_source 
mod_ngobjweb.tar.gz' -D'mod_ngobjweb_version 2.2.3' -D'mod_ngobjweb 
r1511' -D'mod_ngobjweb_buildcount 0' -D'dist_suffix rhel5' 
-D'mod_ngobjweb_release inverse1511'

For SOGo and sope-cards:
rpmbuild  -D'sogo_source sogo.tar.gz' -D'sogo_major_version 0' 
-D'sogo_minor_version 9' -D'sogo_version 0.9' -D'sogo_release 
inverse20070718' -D'dist_suffix rhel5' -D'sogo_prefix 
/usr/GNUstep/System' -D'sope_major_version 4' -D'sope_minor_version 7' 
  -D'sope_version 4.7' -D'sope_release 20070718' -ba sogo.spec

rpmbuild  -D'sogo_source sogo.tar.gz' -D'sogo_major_version 0' 
-D'sogo_minor_version 9' -D'sogo_version 0.9' -D'sogo_release 
inverse20070718' -D'dist_suffix rhel5' -D'sogo_prefix 
/usr/GNUstep/System' -D'sope_major_version 4' -D'sope_minor_version 7' 
  -D'sope_version 4.7' -D'sope_release inverse20070718' -ba 
sope-cards.spec

As you can see, the only variable constants really are sope_release, 
sogo_release and maybe sope_buildcount.

The process is supposed to be simplified one day...


Wolfgang