From 803977f4a705031c38ddafab88b23d7f5c5552ac Mon Sep 17 00:00:00 2001 From: Lockywolf Date: Sun, 3 Dec 2023 17:47:50 +0900 Subject: development/python3-hyrule: Added (utility library for Hy). Signed-off-by: Andrew Clemons Signed-off-by: Willy Sudiarto Raharjo --- development/python3-hyrule/README | 7 ++ .../python3-hyrule/python3-hyrule.SlackBuild | 113 +++++++++++++++++++++ development/python3-hyrule/python3-hyrule.info | 10 ++ development/python3-hyrule/slack-desc | 19 ++++ 4 files changed, 149 insertions(+) create mode 100644 development/python3-hyrule/README create mode 100644 development/python3-hyrule/python3-hyrule.SlackBuild create mode 100644 development/python3-hyrule/python3-hyrule.info create mode 100644 development/python3-hyrule/slack-desc (limited to 'development/python3-hyrule') diff --git a/development/python3-hyrule/README b/development/python3-hyrule/README new file mode 100644 index 0000000000..fcf23c8183 --- /dev/null +++ b/development/python3-hyrule/README @@ -0,0 +1,7 @@ +Hyrule is a utility library for the Hy programming language. + +It can be thought of as the Hy equivalent, or addition, to Python's +standard library. While intended primarily for Hy programs, its +functions and classes can be used in Python as with any other Python +library; just import hyrule. Hyrule's macros, on the other hand, are +only really usable in Hy. diff --git a/development/python3-hyrule/python3-hyrule.SlackBuild b/development/python3-hyrule/python3-hyrule.SlackBuild new file mode 100644 index 0000000000..8fb6cb0c6f --- /dev/null +++ b/development/python3-hyrule/python3-hyrule.SlackBuild @@ -0,0 +1,113 @@ +#!/bin/bash + +# Slackware build script for python3-hyrule + +# Copyright 2023, Lockywolf +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=python3-hyrule +TARNAM=hyrule +VERSION=${VERSION:-0.4.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP + +rm -rf $TARNAM-$VERSION +tar xvf $CWD/$TARNAM-$VERSION.tar.gz +cd $TARNAM-$VERSION + +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +python3 setup.py install --root=$PKG + +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/sequences.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/misc.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/macrotools.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/iterables.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/hypprint.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/hy_init.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/destructure.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/control.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/collections.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/argmove.cpython-39.pyc +rm $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/hyrule/__pycache__/anaphoric.cpython-39.pyc + + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS LICENSE README.rst \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/development/python3-hyrule/python3-hyrule.info b/development/python3-hyrule/python3-hyrule.info new file mode 100644 index 0000000000..9158f6e5ec --- /dev/null +++ b/development/python3-hyrule/python3-hyrule.info @@ -0,0 +1,10 @@ +PRGNAM="python3-hyrule" +VERSION="0.4.0" +HOMEPAGE="https://pypi.org/project/hyrule/" +DOWNLOAD="https://files.pythonhosted.org/packages/d5/55/ba6317a724677a26763c72f6da4a301e7d2313fbb9039625f2f7f05d7813/hyrule-0.4.0.tar.gz" +MD5SUM="fada8773182cd8cbcb31ea0a880b5ea0" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python3-hylang" +MAINTAINER="Lockywolf" +EMAIL="for_sbo.python3-hyrule_2023-12-01@lockywolf.net" diff --git a/development/python3-hyrule/slack-desc b/development/python3-hyrule/slack-desc new file mode 100644 index 0000000000..ed36a8a4ff --- /dev/null +++ b/development/python3-hyrule/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +python3-hyrule: python3-hyrule (A utility library for the Hy programming language) +python3-hyrule: +python3-hyrule: Hyrule is a utility library for the Hy programming language. It can +python3-hyrule: be thought of as the Hy equivalent, or addition, to Python's standard +python3-hyrule: library. While intended primarily for Hy programs, its functions and +python3-hyrule: classes can be used in Python as with any other Python library; just +python3-hyrule: import hyrule. Hyrule's macros, on the other hand, are only really +python3-hyrule: usable in Hy. +python3-hyrule: +python3-hyrule: +python3-hyrule: -- cgit v1.2.3