SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "erlang"

# SliTaz package receipt.

PACKAGE="erlang"
VERSION="24.2.1"
CATEGORY="development"
SHORT_DESC="Erlang programming language."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="Erlang Public Licence"
WEB_SITE="https://www.erlang.org/"

SOURCE="OTP"
TARBALL="${SOURCE}-$VERSION.tar.gz"
WGET_URL="https://github.com/$PACKAGE/otp/archive/$TARBALL"

DEPENDS="libunixODBC ncurses openssl"
BUILD_DEPENDS="autoconf gcc+gcj icedtea6-jdk libxslt ncurses-dev 
    openssl-dev perl unixODBC-dev wxWidgets-dev"

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

# Rules to configure and make the package.
compile_rules()
{
    export LDFLAGS="$LDFLAGS -ltinfo"
    export LANG=C
    
    sed '/ lib\/jinterface/s,for,[ ! -d lib/jinterface/priv ] || &,' -i Makefile*
    
    ./otp_build autoconf &&
    ./configure                \
        --prefix=/usr            \
        --sysconfdir=/etc        \
        --mandir=/usr/share/man        \
        --infodir=/usr/share/info    \
        $CONFIGURE_ARGS &&
    make &&
    make INSTALL_PREFIX=$DESTDIR install || return 1

    for i in    $DESTDIR/usr/lib/erlang/*/bin/erl \
            $DESTDIR/usr/lib/erlang/bin/erl \
            $DESTDIR/usr/lib/erlang/*/bin/start \
            $DESTDIR/usr/lib/erlang/bin/start
      do
        sed -i 's|^ROOTDIR=.*$|ROOTDIR=/usr/lib/erlang|' $i
      done

    for file in $(ls $DESTDIR/usr/bin)
      do
        ln -sf /usr/lib/erlang/bin/$file $DESTDIR/usr/bin/$file || return 1
      done
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    cp -a $install/usr    $fs
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)