SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "etherboot"

# SliTaz package receipt.

PACKAGE="etherboot"
VERSION="5.4.3"
CATEGORY="system-tools"
SHORT_DESC="Ethernet bootloader for PXE and NBI images."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://etherboot.org/wiki/"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

BUILD_DEPENDS="perl"

# What is the latest version available today?
current_version()
{
    wget -O - https://sourceforge.net/projects/etherboot/files/etherboot/ 2>/dev/null | \
    sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
    sed '/scope="row/!d;s|.*/etherboot/||;s|/.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
    cd $src/src
    sed -i 's|uname -m|echo i486|' Makefile
    while read file; do
        [ -f done.$file ] && continue
        patch -p2 < $stuff/$file
        touch done.$file
    done <<EOT
etherboot-net.u
etherboot-prefix.u
EOT
    make EXTRA_CFLAGS="-Wno-error=unused-but-set-variable" bin/etherboot-net.bzImage
}


# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/share/boot
    cp $src/src/bin/etherboot-net.bzImage $fs/usr/share/boot/etherboot
}

# Pre and post install commands for Tazpkg.
post_install()
{
    [ -s $1/boot/isolinux/isolinux.cfg ] &&
    ! grep -qs 'Web Boot' $1/boot/isolinux/isolinux.cfg &&
    sed -i 's|i18n.cfg|&\n\
LABEL web zeb\
    MENU LABEL Web Boot\
    KERNEL /boot/etherboot|' $1/boot/isolinux/isolinux.cfg
    echo
    echo "----"
    echo "You can create pxe/nbi boot floppy with:"
    echo "# cp /usr/share/boot/etherboot /dev/fd0"
    echo "----"
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)