Profile syntax ideas, comments?

atark at thepipeline.net atark at thepipeline.net
Fri Jun 29 16:33:27 PDT 2001


One thing we should add to the profile syntax is certain "global" variables.  
These should be utilized by the backend as default values.  For example:

(yes I know this may not be quite valid XML syntax but it gets the idea 
across)

Currnet ed profile:

<!ENTITY LFS "/mnt/lfs">
<!ENTITY packages_dir "/lfs-sources">
<!ENTITY builddir "/usr/src">

---SNIP---

<package name="ed" version="0.2">
        <preconfigure>
                <unpack>archive="&packages_dir;/ed-0.2.tar.bz2">
                    &builddir;
                </unpack>
        </preconfigure>
        <configure>
                <config dir="&builddir;/ed-0.2" param1="--prefix=/usr" />
        </configure>
        <build>
                <make dir="&builddir;/ed-0.2" />
        </build>
        <install>
                <make_install dir="&builddir;/ed-0.2" />
        </install>
        <postinstall>
                <move dir="/usr/bin/" source="ed">/bin</move>
                <move dir="/usr/bin/" source="red">/bin</move>
                <remove>&builddir;/ed-0.2</remove>
        </postinstall>
</package>

Proposed ed profile:

<!ENTITY LFS "/mnt/lfs">
<!ENTITY packages_dir "/lfs-sources">
<!ENTITY builddir "/usr/src">
<!ENTITY archive "$name-$ver.tar.bz2">
<!ENTITY configdir "$builddir/$name-$ver">
<!ENTITY defconfigoptions "--prefix=/usr">

--SNIP---

<package name="ed" version="0.2">
    <build>
        <unpack />
        <configure />
        <make />
    </build>
    <install>
        <make target="install" />
        <move src="/usr/bin" dest="/bin" files="ed red" />
    </install>
    <cleanup />
</package>

In the above $name and $ver for example would be defined as the value of 
those variable while in the package tag, or something like that.

What do you think.  This is just a rough idea of what I am talking about.  I 
would (and do) absolutely hate to have to type the same stuff over and over 
and over again.  Something similar to the abouve would be nice to have built 
into the profile syntax.  It make profile maintenence MUCH easier.

Ideas, comments, flames...

--Andy 
atark at thepipeline.net
-- 
Unsubscribe: send email to alfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the alfs-discuss mailing list