summaryrefslogtreecommitdiff
path: root/development/Fennel/Fennel.SlackBuild
diff options
context:
space:
mode:
authorabooksigun <abooksigun09@gmail.com>2020-05-30 10:14:37 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-05-30 10:14:37 +0700
commitcd6c044147505901def5cd3ebf2d236dc0d2b0fe (patch)
tree10ac5b1cff18c871689af8b10d47ecc0a8150085 /development/Fennel/Fennel.SlackBuild
parentee42ee5cacd191a0fcbd7c755965d0a9bdb71fb8 (diff)
downloadslackbuilds-cd6c044147505901def5cd3ebf2d236dc0d2b0fe.tar.gz
development/Fennel: Updated for version 0.4.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/Fennel/Fennel.SlackBuild')
-rw-r--r--development/Fennel/Fennel.SlackBuild67
1 files changed, 31 insertions, 36 deletions
diff --git a/development/Fennel/Fennel.SlackBuild b/development/Fennel/Fennel.SlackBuild
index 2054c2b8cb..658500a8ae 100644
--- a/development/Fennel/Fennel.SlackBuild
+++ b/development/Fennel/Fennel.SlackBuild
@@ -22,13 +22,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=Fennel
-VERSION=${VERSION:-0.3.2}
+VERSION=${VERSION:-0.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -39,8 +39,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -68,37 +68,30 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-install -D -m 0755 -t $PKG/usr/bin/ fennel fennel-watch.sh
-
-install -D -m 0644 -t $PKG/usr/share/lua/5.1 fennel.lua fennelview.fnl generate.fnl
-install -D -m 0644 fennelview.fnl.lua $PKG/usr/share/lua/5.1/fennelview.lua
-
-# lua 5.2 support.
-if $(lua5.2 -v &> /dev/null); then
- sed -i '1s|lua.*|lua5.2|' fennel
-
- install -D -m 0755 fennel $PKG/usr/bin/fennel5.2
-
- install -D -m 0644 -t $PKG/usr/share/lua/5.2 fennel.lua fennelview.fnl generate.fnl
- install -D -m 0644 fennelview.fnl.lua $PKG/usr/share/lua/5.2/fennelview.lua
-fi
-
-# lua 5.3 support.
-if $(lua5.3 -v &> /dev/null); then
- sed -i '1s|lua.*|lua5.3|' fennel
-
- install -D -m 0755 fennel $PKG/usr/bin/fennel5.3
-
- install -D -m 0644 -t $PKG/usr/share/lua/5.3 fennel.lua fennelview.fnl generate.fnl
- install -D -m 0644 fennelview.fnl.lua $PKG/usr/share/lua/5.3/fennelview.lua
-fi
-
-# luajit support.
-if $(luajit -v &> /dev/null); then
- sed -i '1s|lua.*|luajit|' fennel
-
- install -D -m 0755 fennel $PKG/usr/bin/fenneljit
-fi
+make fennel
+install -D -m 0755 fennel-watch.sh $PKG/usr/bin/fennel-watch.sh
+
+LUAVER=${LUAVER:-"5.1 5.2 5.3 jit"}
+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
+ else
+ echo -e 'LUAVER must be one or more of "5.1 5.2 5.3 jit" separated with space'
+ exit 1
+ fi
+done
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -108,7 +101,9 @@ gzip -9 fennel.1
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 CONTRIBUTING.md LICENSE lua-primer.md README.md reference.md tutorial.md
+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
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild