From a580ffadbe3d320b6f794509e9382229e8964aa6 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 15 Nov 2017 20:29:01 +0100 Subject: [PATCH] refactored lua.SlackBuild --- d/lua/README | 6 ----- d/lua/lua.SlackBuild | 60 ++++++++++++++++++++++++++++++++++++++------ d/lua/lua.info | 10 -------- d/lua/lua.pc | 20 --------------- d/lua/slack-desc | 19 -------------- 5 files changed, 52 insertions(+), 63 deletions(-) delete mode 100644 d/lua/README delete mode 100644 d/lua/lua.info delete mode 100644 d/lua/lua.pc delete mode 100644 d/lua/slack-desc diff --git a/d/lua/README b/d/lua/README deleted file mode 100644 index 21e8eaf6..00000000 --- a/d/lua/README +++ /dev/null @@ -1,6 +0,0 @@ -Lua is a free software light-weight programming language designed -for extending applications. Lua is also frequently used as a -general-purpose, stand-alone scripting language. - -This package is for the version 5.1.x of lua, the one compatible -with the software that needs lua on slackbuilds.org. diff --git a/d/lua/lua.SlackBuild b/d/lua/lua.SlackBuild index 6d541f87..f7f36f35 100755 --- a/d/lua/lua.SlackBuild +++ b/d/lua/lua.SlackBuild @@ -6,6 +6,7 @@ # Modified by the SlackBuilds.org project # Modified by Aaron W. Hsu # Updated by Matteo Bernardini +# Updated by Gwenhael Le Moine, inspired by https://git.archlinux.org/svntogit/packages.git/tree/lua/trunk/PKGBUILD # This program is free software. It comes without any warranty. # Granted WTFPL, Version 2, as published by Sam Hocevar. See @@ -47,12 +48,15 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION + +[ ! -e $CWD/$PRGNAM-${VERSION}.tar.gz ] && wget -c http://www.lua.org/ftp/$PRGNAM-${VERSION}.tar.gz -O $CWD/$PRGNAM-${VERSION}.tar.gz + tar xvf $CWD/$PRGNAM-${VERSION}.tar.gz cd $PRGNAM-$VERSION chown -R root:root . +[ ! -e $CWD/liblua.so.patch ] && wget -c https://git.archlinux.org/svntogit/packages.git/plain/lua/trunk/liblua.so.patch -O $CWD/liblua.so.patch patch -p1 -i $CWD/liblua.so.patch -sed "s/%VER%/$MAJOR_VERSION/g;s/%REL%/$VERSION/g" $CWD/lua.pc > lua.pc make MYCFLAGS="$CFLAGS -fPIC -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" MYLDFLAGS="$LDFLAGS" linux @@ -62,17 +66,37 @@ make \ INSTALL_TOP="$PKG"/usr \ INSTALL_MAN="$PKG"/usr/man/man1 \ install + +cat < lua.pc +V=$MAJOR_VERSION +R=$VERSION + +prefix=/usr +INSTALL_BIN=\${prefix}/bin +INSTALL_INC=\${prefix}/include +INSTALL_LIB=\${prefix}/lib +INSTALL_MAN=\${prefix}/man/man1 +INSTALL_LMOD=\${prefix}/share/lua/\${V} +INSTALL_CMOD=\${prefix}/lib/lua/\${V} +exec_prefix=\${prefix} +libdir=\${exec_prefix}/lib +includedir=\${prefix}/include + +Name: Lua +Description: An Extensible Extension Language +Version: \${R} +Requires: +Libs: -L\${libdir} -llua -lm +Cflags: -I\${includedir} +EOF + +install -Dm644 lua.pc "$PKG"/usr/lib/pkgconfig/${PRGNAM}53.pc + ln -sf /usr/bin/lua "$PKG"/usr/bin/lua$MAJOR_VERSION ln -sf /usr/bin/luac "$PKG"/usr/bin/luac$MAJOR_VERSION ln -sf /usr/lib/liblua.so.$VERSION "$PKG"/usr/lib/liblua$MAJOR_VERSION.so - -install -Dm644 lua.pc "$PKG"/usr/lib/pkgconfig/${PRGNAM}53.pc ln -sf /usr/lib/pkgconfig/${PRGNAM}53.pc "$PKG"/usr/lib/pkgconfig/$PRGNAM.pc -#install -d "$PKG"/usr/share/doc/$PRGNAM -#install -m644 doc/*.{gif,png,css,html} "$PKG"/usr/share/doc/$PRGNAM -#install -Dm644 ../LICENSE "$PKG"/usr/share/licenses/$PRGNAM/LICENSE - find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -86,7 +110,27 @@ cp -a doc/*.html doc/logo.gif doc/lua.css $PKG/usr/doc/$PRGNAM-$VERSION/html cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +cat < $PKG/install/slack-desc +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +lua: lua (a powerful, fast, light-weight, embeddable scripting language) +lua: +lua: Lua combines simple procedural syntax with powerful data description +lua: constructs based on associative arrays and extensible semantics. +lua: Lua is dynamically typed, runs by interpreting bytecode for a +lua: register-based virtual machine, and has automatic memory management +lua: with incremental garbage collection, making it ideal for +lua: configuration, scripting, and rapid prototyping. +lua: +lua: +lua: +EOF cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/d/lua/lua.info b/d/lua/lua.info deleted file mode 100644 index 90cca404..00000000 --- a/d/lua/lua.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="lua" -VERSION="5.1.5" -HOMEPAGE="http://www.lua.org" -DOWNLOAD="http://www.lua.org/ftp/lua-5.1.5.tar.gz" -MD5SUM="2e115fe26e435e33b0d5c022e4490567" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="Matteo Bernardini" -EMAIL="ponce@slackbuilds.org" diff --git a/d/lua/lua.pc b/d/lua/lua.pc deleted file mode 100644 index bf7977bc..00000000 --- a/d/lua/lua.pc +++ /dev/null @@ -1,20 +0,0 @@ -V=%VER% -R=%REL% - -prefix=/usr -INSTALL_BIN=${prefix}/bin -INSTALL_INC=${prefix}/include -INSTALL_LIB=${prefix}/lib -INSTALL_MAN=${prefix}/man/man1 -INSTALL_LMOD=${prefix}/share/lua/${V} -INSTALL_CMOD=${prefix}/lib/lua/${V} -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: Lua -Description: An Extensible Extension Language -Version: ${R} -Requires: -Libs: -L${libdir} -llua -lm -Cflags: -I${includedir} diff --git a/d/lua/slack-desc b/d/lua/slack-desc deleted file mode 100644 index e12cce29..00000000 --- a/d/lua/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -lua: lua (a powerful, fast, light-weight, embeddable scripting language) -lua: -lua: Lua combines simple procedural syntax with powerful data description -lua: constructs based on associative arrays and extensible semantics. -lua: Lua is dynamically typed, runs by interpreting bytecode for a -lua: register-based virtual machine, and has automatic memory management -lua: with incremental garbage collection, making it ideal for -lua: configuration, scripting, and rapid prototyping. -lua: -lua: -lua: