SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "nnn"

# SliTaz package receipt.

PACKAGE="nnn"
VERSION="4.5"
CATEGORY="system-tools"
SHORT_DESC="The missing terminal file manager for X."
MAINTAINER="maintainer@slitaz.org"
LICENSE="BSD-2"
WEB_SITE="https://github.com/jarun/nnn/"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="${WEB_SITE}archive/v$VERSION.tar.gz"

DEPENDS="libtinfo ncursesw readline"
BUILD_DEPENDS="gcc83 libtinfo ncursesw-dev readline-dev"

current_version()
{
    wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
    # pkg-config does not work properly
    sed -i 's|\$(LDLIBS_CURSES)|-lncursesw -ltinfo -lrt|' Makefile

    # -std=c11 invalid
    sed -i 's|-std=c11|-std=c1x|' Makefile

    # <fts.h> cannot be used with -D_FILE_OFFSET_BITS==64
    sed -i 's|FILE_OFFSET_BITS 64|FILE_OFFSET_BITS 32|' \
        src/nnn.c

    export    LDFLAGS="$LDFLAGS -lrt"

    make                \
        CC=gcc-83        \
        CFLAGS_OPTIMIZATION=-O2    \
        PREFIX=/usr &&
    make    install        \
        PREFIX=/usr
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    cook_copy_folders    bin
}
6047 packages and 209931 files in current database (Mon Jul 1 15:25:36 2024)