SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "textadept"

# SliTaz package receipt.

PACKAGE="textadept"
VERSION="12.8"
CATEGORY="development"
TAGS="editor"
SHORT_DESC="Text editor for programmers."
MAINTAINER="HGT@slitaz.org"
LICENSE="MIT"
WEB_SITE="https://github.com/orbitalquark/textadept"

TARBALL="${PACKAGE}_$VERSION.tar.gz"
WGET_URL="$WEB_SITE/archive/refs/tags/$TARBALL"

SUGGESTED="textadept-doc"
DEPENDS="gcc83-lib-base gtk+ ncursesw"
BUILD_DEPENDS="cmake gcc83 gtk+-dev ncursesw-dev"

CONFIG_FILES="/usr/share/textadept/init.lua"

# What is the latest version available today?
current_version()
{
    cv=$(wget -O - https://github.com/orbitalquark/textadept/releases 2>/dev/null | \
        sed '/linux.tgz/!d;q')
    cv=${cv% --*}
    echo    "${cv##*adept }"
}

# Rules to configure and make the package.
compile_rules()
{
    # insert missing include statements
        patch    --strip=0        \
        --directory=$src/src    \
        --input=$stuff/patches/textadept_gtk.c-$VERSION
    # https not working
        patch    --strip=0    \
        --input=$stuff/patches/CMakeLists.txt-$VERSION

    mkdir    _build &&
    cd    _build &&
    cmake    ..                \
        -D CMAKE_BUILD_TYPE=Release    \
        -D CMAKE_C_COMPILER=gcc-83    \
        -D CMAKE_CXX_COMPILER=g++-83    \
        -D CMAKE_INSTALL_PREFIX=/opt    \
        -D QT=OFF &&
    cmake    --build . &&
    cmake    --install . &&
    mkdir -p    $install/usr/bin
    mkdir -p    $install/usr/share/textadept
    ln -s    /opt/share/textadept/textadept-curses    \
        $install/usr/bin/textadept-curses
    ln -s    /opt/share/textadept/textadept-gtk    \
        $install/usr/bin/textadept-gtk
    cp    $src/src/textadept-gtk.desktop        \
        $install/usr/share/textadept/textadept-gtk.desktop

    # transfer HTML-documentation
    mkdir -p    $install/usr/share/textadept/docs
    wget -O    $install/usr/share/textadept/docs/api.html    \
        https://orbitalquark.github.io/textadept/api.html
    wget -O    $install/usr/share/textadept/docs/faq.html    \
        https://orbitalquark.github.io/textadept/faq.html
    wget -O    $install/usr/share/textadept/docs/manual.html    \
        https://orbitalquark.github.io/textadept/manual.html
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    cook_copy_folders    bin
    cook_copy_folders    core
    cook_copy_folders    icons
    cook_copy_folders    lexers
    cook_copy_folders    modules
    cook_copy_folders    themes
    cook_copy_files        init.lua
    cook_copy_files        LICENSE
    cook_copy_files        textadept-curses
    cook_copy_files        textadept-gtk

    mkdir    -p        $fs/usr/share/applications
    cp $install/opt/share/textadept/textadept-curses.desktop    \
                $fs/usr/share/applications
    cp $install/opt/share/textadept/textadept-gtk.desktop    \
                $fs/usr/share/applications
}
6017 packages and 861739 files in cooking database (Sun Sep 21 00:48:01 2025)