aboutsummaryrefslogtreecommitdiff
path: root/development/Fennel/Fennel.SlackBuild
diff options
context:
space:
mode:
authorabooksigun <abooksigun09@gmail.com>2020-06-12 23:36:47 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-06-14 17:45:41 +0700
commitaf5b4fa823e0f1c45af03475a0a7bdd522e80cc7 (patch)
tree71315b4dfce21e2914aa16ee2d9aa15dde80f520 /development/Fennel/Fennel.SlackBuild
parent243e395b40a0b0db30773c69f367c2cce9cdadab (diff)
development/Fennel: Updated for version 0.4.1.
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.SlackBuild41
1 files changed, 26 insertions, 15 deletions
diff --git a/development/Fennel/Fennel.SlackBuild b/development/Fennel/Fennel.SlackBuild
index 658500a8ae49a..56a2b71d8817e 100644
--- a/development/Fennel/Fennel.SlackBuild
+++ b/development/Fennel/Fennel.SlackBuild
@@ -22,7 +22,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=Fennel
-VERSION=${VERSION:-0.4.0}
+VERSION=${VERSION:-0.4.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -69,24 +69,35 @@ find -L . \
-exec chmod 644 {} \;
make fennel
-install -D -m 0755 fennel-watch.sh $PKG/usr/bin/fennel-watch.sh
LUAVER=${LUAVER:-"5.1 5.2 5.3 jit"}
+BINARY=${BINARY:-no}
for i in $LUAVER
do
if [ $i == 5.1 ] || [ $i == 5.2 ] || [ $i == 5.3 ] || [ $i == jit ]
then
- if [ $i != 5.1 ]; then ver=$i; fi
- if $(lua$ver -v &> /dev/null)
- then
- sed -i "1s|lua.*|lua$ver|" fennel
- install -D -m 0755 fennel $PKG/usr/bin/fennel$ver
- if [ $i != jit ]
- then
- install -D -m 0644 -t $PKG/usr/share/lua/$i fennel.lua fennelfriend.fnl \
- fennelfriend.lua fennelview.fnl fennelview.lua generate.fnl
- fi
- fi
+ if [ $i != 5.1 ]; then ver=$i libver=$i include=lua$i; fi
+ if $(lua$ver -v &> /dev/null)
+ then
+ sed -i "1s|lua.*|lua$ver|" fennel
+ if [ "$BINARY" == "yes" ]
+ 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 fennelfriend.fnl \
+ fennelfriend.lua fennelview.fnl fennelview.lua fennelbinary.fnl
+ fi
+ fi
else
echo -e 'LUAVER must be one or more of "5.1 5.2 5.3 jit" separated with space'
exit 1
@@ -102,8 +113,8 @@ cp fennel.1.gz $PKG/usr/man/man1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -t $PKG/usr/doc/$PRGNAM-$VERSION \
- api.md changelog.md CODE-OF-CONDUCT.md CONTRIBUTING.md LICENSE lua-primer.md \
- README.md reference.md release-checklist.md setup.md tutorial.md
+ api.md changelog.md CODE-OF-CONDUCT.md CONTRIBUTING.md LICENSE lua-primer.md \
+ README.md reference.md release-checklist.md setup.md tutorial.md
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild