development/Fennel: Updated for version 0.4.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
ee42ee5cac
commit
cd6c044147
|
@ -22,13 +22,13 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=Fennel
|
PRGNAM=Fennel
|
||||||
VERSION=${VERSION:-0.3.2}
|
VERSION=${VERSION:-0.4.0}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
if [ -z "$ARCH" ]; then
|
||||||
case "$( uname -m )" in
|
case "$( uname -m )" in
|
||||||
i?86) ARCH=i486 ;;
|
i?86) ARCH=i586 ;;
|
||||||
arm*) ARCH=arm ;;
|
arm*) ARCH=arm ;;
|
||||||
*) ARCH=$( uname -m ) ;;
|
*) ARCH=$( uname -m ) ;;
|
||||||
esac
|
esac
|
||||||
|
@ -39,8 +39,8 @@ TMP=${TMP:-/tmp/SBo}
|
||||||
PKG=$TMP/package-$PRGNAM
|
PKG=$TMP/package-$PRGNAM
|
||||||
OUTPUT=${OUTPUT:-/tmp}
|
OUTPUT=${OUTPUT:-/tmp}
|
||||||
|
|
||||||
if [ "$ARCH" = "i486" ]; then
|
if [ "$ARCH" = "i586" ]; then
|
||||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||||
LIBDIRSUFFIX=""
|
LIBDIRSUFFIX=""
|
||||||
elif [ "$ARCH" = "i686" ]; then
|
elif [ "$ARCH" = "i686" ]; then
|
||||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
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 \) \
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||||
-exec chmod 644 {} \;
|
-exec chmod 644 {} \;
|
||||||
|
|
||||||
install -D -m 0755 -t $PKG/usr/bin/ fennel fennel-watch.sh
|
make fennel
|
||||||
|
install -D -m 0755 fennel-watch.sh $PKG/usr/bin/fennel-watch.sh
|
||||||
|
|
||||||
install -D -m 0644 -t $PKG/usr/share/lua/5.1 fennel.lua fennelview.fnl generate.fnl
|
LUAVER=${LUAVER:-"5.1 5.2 5.3 jit"}
|
||||||
install -D -m 0644 fennelview.fnl.lua $PKG/usr/share/lua/5.1/fennelview.lua
|
for i in $LUAVER
|
||||||
|
do
|
||||||
# lua 5.2 support.
|
if [ $i == 5.1 ] || [ $i == 5.2 ] || [ $i == 5.3 ] || [ $i == jit ]
|
||||||
if $(lua5.2 -v &> /dev/null); then
|
then
|
||||||
sed -i '1s|lua.*|lua5.2|' fennel
|
if [ $i != 5.1 ]; then ver=$i; fi
|
||||||
|
if $(lua$ver -v &> /dev/null)
|
||||||
install -D -m 0755 fennel $PKG/usr/bin/fennel5.2
|
then
|
||||||
|
sed -i "1s|lua.*|lua$ver|" fennel
|
||||||
install -D -m 0644 -t $PKG/usr/share/lua/5.2 fennel.lua fennelview.fnl generate.fnl
|
install -D -m 0755 fennel $PKG/usr/bin/fennel$ver
|
||||||
install -D -m 0644 fennelview.fnl.lua $PKG/usr/share/lua/5.2/fennelview.lua
|
if [ $i != jit ]
|
||||||
fi
|
then
|
||||||
|
install -D -m 0644 -t $PKG/usr/share/lua/$i fennel.lua fennelfriend.fnl \
|
||||||
# lua 5.3 support.
|
fennelfriend.lua fennelview.fnl fennelview.lua generate.fnl
|
||||||
if $(lua5.3 -v &> /dev/null); then
|
fi
|
||||||
sed -i '1s|lua.*|lua5.3|' fennel
|
fi
|
||||||
|
else
|
||||||
install -D -m 0755 fennel $PKG/usr/bin/fennel5.3
|
echo -e 'LUAVER must be one or more of "5.1 5.2 5.3 jit" separated with space'
|
||||||
|
exit 1
|
||||||
install -D -m 0644 -t $PKG/usr/share/lua/5.3 fennel.lua fennelview.fnl generate.fnl
|
fi
|
||||||
install -D -m 0644 fennelview.fnl.lua $PKG/usr/share/lua/5.3/fennelview.lua
|
done
|
||||||
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
|
|
||||||
|
|
||||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
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
|
| 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
|
cp fennel.1.gz $PKG/usr/man/man1
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
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
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
PRGNAM="Fennel"
|
PRGNAM="Fennel"
|
||||||
VERSION="0.3.2"
|
VERSION="0.4.0"
|
||||||
HOMEPAGE="https://fennel-lang.org/"
|
HOMEPAGE="https://fennel-lang.org/"
|
||||||
DOWNLOAD="https://github.com/bakpakin/Fennel/archive/0.3.2/Fennel-0.3.2.tar.gz"
|
DOWNLOAD="https://github.com/bakpakin/Fennel/archive/0.4.0/Fennel-0.4.0.tar.gz"
|
||||||
MD5SUM="db324e9f6a1312c08de736b6d7cb42d3"
|
MD5SUM="e8e3ad235c60ad7cfb4e539c21360278"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
REQUIRES="lua"
|
REQUIRES="lua"
|
||||||
|
|
|
@ -9,11 +9,14 @@ and reach of Lua with the flexibility of a lisp syntax and macro system.
|
||||||
|
|
||||||
Anywhere you can run Lua code, you can run Fennel code.
|
Anywhere you can run Lua code, you can run Fennel code.
|
||||||
|
|
||||||
Optional Dependency:
|
This require one version of Lua installed (lua, lua52, lua53, luajit):
|
||||||
* lua52, lua53, luajit
|
|
||||||
Default support for all versions of Lua installed before build.
|
Default support for all versions of Lua installed before build.
|
||||||
After installation there is "fennel5.2", "fennel5.3" and "fenneljit" executable files for the
|
To specify which Lua versions:
|
||||||
equivalent versions of Lua installed.
|
LUAVER="vers"
|
||||||
|
"vers" must be one or more of "5.1 5.2 5.3 jit" separated with space
|
||||||
|
After installation there are one or more fennel executable files for the
|
||||||
|
equivalent versions of Lua.
|
||||||
|
|
||||||
|
Optional dependency:
|
||||||
* lua-readline
|
* lua-readline
|
||||||
For history completion
|
For history completion
|
||||||
|
|
Loading…
Reference in New Issue