Element: <requires>

Syntax


<!ELEMENT requires          (name, version*)>

This element occurs in the element packageinfo

See also : name and version

Description

The element requires denotes a dependency between two packages : the package containg the requires element depends on the package whose name is contained in the name sub-element.

The actual name is put into a name element because we might want to add a version in a future version.

Examples


    <package name="librep" version="0.16.1">
        <packageinfo>
                <requires><name>gmp</name></requires>
                <requires><name>gdbm</name></requires>
        </packageinfo>

        <stage name="Unpacking a package.">
                <unpack>
                        <archive>librep-0.16.1/librep-0.16.1.tar.gz</archive>
                        <destination>/usr/src</destination>
                </unpack>
        </stage>

        ....

    </package>

The equivalent bash script is :


#-----------------------------------------
# processing package librep 0.16.1

echo Generating package librep 0.16.1

[[ ! -f ${NALFS_STAMP_DIR:-/var/log/nALFS}/gmp]] && echo Stamp of package gmp missing && exit 3
[[ ! -f ${NALFS_STAMP_DIR:-/var/log/nALFS}/gdbm]] && echo Stamp of package gdbm missing && exit 3

#-----------------------------------------
echo Stage "Unpacking a package."

echo Unpacking librep-0.16.1/librep-0.16.1.tar.gz into /usr/src
cd /usr/src
tar xzvf librep-0.16.1/librep-0.16.1.tar.gz

echo Exiting stage "Unpacking a package."

....

echo End of generating package librep 0.16.1