diff options
author | abooksigun <abooksigun09@gmail.com> | 2021-01-22 19:36:00 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-01-23 18:18:50 +0700 |
commit | 44fc28d1f39bf80a0154a548340aee2b03bd843d (patch) | |
tree | 30b05e59491e16f8bda61f51e296189065d3d428 /development/Fennel/Fennel.SlackBuild | |
parent | 007dad1ea095397fe2571242402fdb96036aec1a (diff) |
development/Fennel: Updated for version 0.8.0.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/Fennel/Fennel.SlackBuild')
-rw-r--r-- | development/Fennel/Fennel.SlackBuild | 47 |
1 files changed, 21 insertions, 26 deletions
diff --git a/development/Fennel/Fennel.SlackBuild b/development/Fennel/Fennel.SlackBuild index 00aa25d0c63f4..988cbf909f031 100644 --- a/development/Fennel/Fennel.SlackBuild +++ b/development/Fennel/Fennel.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh # Slackware build script for Fennel -# Copyright 2020 abooksigun <abooksigun09@gmail.com> +# Copyright 2021 abooksigun <abooksigun09@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,7 +22,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=Fennel -VERSION=${VERSION:-0.7.0} +VERSION=${VERSION:-0.8.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -68,38 +68,33 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -make fennel +make fennel fennel.lua LUAVER=${LUAVER:-"5.1 5.2 5.3 5.4 jit"} BINARY=${BINARY:-no} + for i in $LUAVER do - if [ $i == 5.1 ] || [ $i == 5.2 ] || [ $i == 5.3 ] || [ $i == 5.4 ] || [ $i == jit ] + if [ $i != 5.1 ]; then ver=$i; fi + if [ $i == "jit" ]; then libver=jit-5.1 include=luajit-2.0; else libver=$i include=lua$i; fi + if $(lua$ver -v &> /dev/null) then - if [ $i != 5.1 ]; then ver=$i libver=$i include=lua$i; fi - if $(lua$ver -v &> /dev/null) + sed -i "1s|lua.*|lua$ver|" fennel + if [ $BINARY == "yes" ] && [ $i != 5.1 ] + then + make \ + STATIC_LUA_LIB=/usr/lib$LIBDIRSUFFIX/liblua$libver.a \ + LUA_INCLUDE_DIR=/usr/include/$include \ + fennel-bin + install -D -m 0755 fennel-bin $PKG/usr/bin/fennel$ver + rm fennel-bin + else + install -D -m 0755 fennel $PKG/usr/bin/fennel$ver + fi + if [ $i != jit ] then - sed -i "1s|lua.*|lua$ver|" fennel - if [ "$BINARY" == "yes" ] && [ $i != 5.1 ] - then - if [ $i == jit ]; then libver=jit-5.1 include=luajit-2.0; fi - make \ - STATIC_LUA_LIB=/usr/lib$LIBDIRSUFFIX/liblua$libver.a \ - LUA_INCLUDE_DIR=/usr/include/$include \ - fennel-bin - install -D -m 0755 fennel-bin $PKG/usr/bin/fennel$ver - rm fennel-bin - else - install -D -m 0755 fennel $PKG/usr/bin/fennel$ver - fi - if [ $i != jit ] - then - install -D -m 0644 -t $PKG/usr/share/lua/$i fennel.lua fennelview.fnl fennelview.lua - fi + install -D -m 0644 -t $PKG/usr/share/lua/$i fennel.lua fennelview.lua fi - else - echo -e 'LUAVER must be one or more of "5.1 5.2 5.3 5.4 jit" separated with space' - exit 1 fi done |