SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "open-iscsi"

# SliTaz package receipt.

PACKAGE="open-iscsi"
VERSION="2.0.873"
CATEGORY="network"
SHORT_DESC="Implementation of RFC3720 userland utilities."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://www.open-iscsi.com/"
WGET_URL="https://github.com/open-iscsi/open-iscsi/archive/refs/tags/$VERSION.tar.gz"

DEPENDS="linux-scsi"
BUILD_DEPENDS="linux-module-headers"

# What is the latest version available today?
current_version()
{
    wget -O - https://github.com/open-iscsi/open-iscsi/releases 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i 's/ install_kernel / /' Makefile
    sed -i 's|dirent.h>|&\n#include <sys/types.h>\n#include <sys/stat.h>|' \
        usr/iscsi_sysfs.c
    make KSRC=/usr/src/linux KARCH=i686 user
    make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    cp -a $install/etc $fs
    cp -a $install/sbin $fs
}

post_install()
{
    if  [ ! -f "$1/etc/iscsi/initiatorname.iscsi" ]; then
        echo "InitiatorName=$($1/sbin/iscsi-iname)" > "$1/etc/iscsi/initiatorname.iscsi"
    fi
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)