This file is intended to help building rpm files from  ec source tarball
=========================================================================

The "SOURCE_DIR" expression  describe the top directory resulting
from uncompressing the "ec.VERSION.tar.gz" file to "ec.VERSION/"  

It is a better choice to build a rpm on a machine running the target distribution:
----------------------------------------------------------------------------------
For exemple you might have compatibility problemes if you  build a rpm for the 
fedora distribution on a mandriva distribution.


What files are used in this package to build the package:
---------------------------------------------------------

They are copies of ~/rpmrc and ~/rpmmacros for each rpm distribution
and those files are copied from  SOURCE_DIR/rpm  to the home
top directory before each building process.

The  .spec files ( for exemple ec.mdv2009.spec ) stays  in the
rpm/SPECS directory that is included in the source-directory.


How to build a rpm :
-------------------
First build the package with:
    ./configure && make
next rebuild the tarball:
    make dist
and next build the rpm:
    cd rpm && make rpm
        
If your distribution isn't known by the makefile  a rpm based on
SPECS/nodist.spec will  normally be used.
The nodist.spec doesn't make a desktop installation.(you have to start
a terminall emulator and type ec).
Normally the best processor-architecture is automatically chosen for your
computer but you can choose a special one. For exemple to choose a processor
architecture  like i386 do :

cd rpm  && make rpm BUILDOPT="--target=i386" 

Severall files are normally generated :
SOURCE_DIR/rpm/RPMS/ARCHI(i386, i586 ect..)/ec-VERSION-DISTRIBUTION.RELEASE.ARCHI.rpm
SOURCE_DIR/rpm/RPMS/ARCHI(i386, i586 ect..)/ec-debug-VERSION-DISTRIBUTION.RELEASE.ARCHI.rpm
SOURCE_DIR/rpm/SRPMS/ARCHI(i386, i586 ect..)/ec-VERSION-DISTRIBUTION.RELEASE.src.rpm


How to create a new distribtution-specific rpm? :
-------------------------------------------------
Perhaps by choosing the nearest distribution type allready 
configured in the ec source package.

in the SOURCE_DIR/rpm directory copy and mofify the files: 

.rpmrc.DISTRIBUTION 		
.rpmmacros.DISTRIBUTION
SPECS/ec.DISTRIBUTION.spec

then build the rpm using make DISTRIBUTION

if you want your distribution to be automatically recognized by the
make file   you have to mofify the Makefile.am. and regenerate the 
autotool files with:
make distclean && ./configure && make  

The distribution is found from the first file found in the liste:
[/etc/release, /etc/system-release] by testing the string in it.
For exemple the Mandriva  /etc/release contains this string:
"Mandriva Linux release 2009.0 (Official) for i586"
 
The target "rpm:" in SOURCE_DIR/rpm/Makefile.am gives an exemple on how to 
handle the string.  

For building automatically severall processor-architecture specific rpm,
you  migth create  a script  like this in the SOURCE_DIR/rpm
directory:

#! /bin/sh
make DISTRIBUTION  BUILDOPT="--target=i386     
make DISTRIBUTION  BUILDOPT="--target=i586     
......
ect   
    
   
