SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "python-simplejson"

# SliTaz package receipt.

PACKAGE="python-simplejson"
VERSION="3.17.6"
CATEGORY="development"
SHORT_DESC="Simple, fast, extensible JSON encoder and decoder for python."
MAINTAINER="claudinei@slitaz.org"
LICENSE="MIT"
WEB_SITE="https://pypi.org/project/simplejson/"
REPOLOGY="python:simplejson"

SOURCE="simplejson"
TARBALL="$SOURCE-$VERSION.tar.gz"
WGET_URL="https://files.pythonhosted.org/packages/source/${SOURCE:0:1}/$SOURCE/$TARBALL"

DEPENDS="python"
BUILD_DEPENDS="python python-dev python-setuptools"

HOST_ARCH="i486 arm"

# What is the latest version available today?
current_version()
{
    wget -O - https://pypi.org/project/$SOURCE/ 2>/dev/null | \
    sed "/$SOURCE-/!d;/tar/!d;s|.*$SOURCE-||;s|.tar.*||;q"
}

# Rules to configure and make the package.
compile_rules()
{
    # Cross compilation hack to avoid using compiler wich build python 
    # itself.
    case "$ARCH" in
        arm*)
            mv /usr/bin/i486-slitaz-linux-gcc /tmp &&
            ln -s /cross/${ARCH}/tools/bin/arm-slitaz-linux-gnueabi-gcc \
                /usr/bin/i486-slitaz-linux-gcc ;;
    esac

    python setup.py build  &&
    python setup.py install --root=$DESTDIR

    case "$ARCH" in
        arm*)
            rm /usr/bin/i486-slitaz-linux-gcc &&
            mv /tmp/i486-slitaz-linux-gcc /usr/bin ;;
    esac
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    cook_copy_folders    lib
}

# Remove old package.
post_install()
{
    [ ! -d "$1/var/lib/tazpkg/installed/simplejson" ] ||
    rm -rf "$1/var/lib/tazpkg/installed/simplejson"
}
6047 packages and 209931 files in current database (Mon Jul 1 15:25:36 2024)