SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "pxe-kexec"

# SliTaz package receipt.

PACKAGE="pxe-kexec"
VERSION="0.2.5"
CATEGORY="misc"
MAINTAINER="pascal.bellard@slitaz.org"
SHORT_DESC="Boots linux with kexec using pxelinux configuration."
LICENSE="GPL2"
WEB_SITE="https://web.archive.org/web/20100819083125/http://pxe-kexec.berlios.de/"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="$SF_MIRROR/$PACKAGE.berlios/$TARBALL"

DEPENDS="curl readline kexec-tools gcc-lib-base"
BUILD_DEPENDS="cmake curl-dev ncurses-dev"

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

# Rules to configure and make the package.
compile_rules()
{
    export LDFLAGS="$LDFLAGS -ltinfo"
    mkdir build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX=/usr .. &&
    make &&
    make DESTDIR=$DESTDIR install
}
    
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr
    cp -a $install/usr/sbin $fs/usr
}

# Pre and post install commands for Tazpkg.
post_install()
{
    grep -q kexec "$1/etc/init.d/rc.shutdown" &&
    cat >> "$1/etc/init.d/rc.shutdown" <<EOT
# pxe-kexec want kexec in shutdown script.
kexec -e 2>&1 > /dev/null
EOT
}

post_remove()
{
    sed -i '/kexec/d' "$1/etc/init.d/rc.shutdown"
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)