diff options
Diffstat (limited to 'development/Fennel/Fennel.SlackBuild')
-rw-r--r-- | development/Fennel/Fennel.SlackBuild | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/development/Fennel/Fennel.SlackBuild b/development/Fennel/Fennel.SlackBuild index 658500a8ae..56a2b71d88 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 |