diff options
Diffstat (limited to 'libraries/luaunbound')
-rw-r--r-- | libraries/luaunbound/README | 5 | ||||
-rw-r--r-- | libraries/luaunbound/luaunbound.SlackBuild | 57 | ||||
-rw-r--r-- | libraries/luaunbound/slack-desc | 4 |
3 files changed, 32 insertions, 34 deletions
diff --git a/libraries/luaunbound/README b/libraries/luaunbound/README index 7685e7244f530..7fd9599627591 100644 --- a/libraries/luaunbound/README +++ b/libraries/luaunbound/README @@ -1,3 +1,6 @@ -luaunbound is a resolved library for lua. +luaunbound is a resolver library for lua. It is needed for prosody. + +Optional dependency: if lua51 is installed, the module will be built +for Lua 5.1 in addition to the standard Lua version. diff --git a/libraries/luaunbound/luaunbound.SlackBuild b/libraries/luaunbound/luaunbound.SlackBuild index 3607c4c7f5993..22bdda8ad263b 100644 --- a/libraries/luaunbound/luaunbound.SlackBuild +++ b/libraries/luaunbound/luaunbound.SlackBuild @@ -25,11 +25,18 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20241021 bkw: Modified by SlackBuilds.org, BUILD=2: +# - support both lua (5.4) and lua51. +# - use pkgconfig (LUA_PC) instead of sed and hardcoded install dirs. +# - handle alternate tarball filename, if no content-disposition, without +# using wildcards. +# - minor fixes in README, slack-desc. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=luaunbound VERSION=${VERSION:-0.0.0.20230530} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -43,9 +50,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -57,16 +61,12 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS=" -O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS=" -O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS=" -O2" - LIBDIRSUFFIX="64" + SLKCFLAGS=" -O2 -fPIC" else SLKCFLAGS=" -O2" - LIBDIRSUFFIX="" fi set -e @@ -75,30 +75,25 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$COMMIT -tar xvf $CWD/*$COMMIT.tar.gz +tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz || tar xvf $CWD/$COMMIT.tar.gz cd $PRGNAM-$COMMIT chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -sed -i 's/-$(LUA_VERSION)//g' GNUmakefile - -make - -strip --strip-unneeded lunbound.so - -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 - -mkdir -p $PKG/usr/lib64/lua/5.1/ -cp lunbound.so $PKG/usr/lib64/lua/5.1/ - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a LICENSE README.markdown $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +runmake() { + make clean + make LUA_PC=$1 MYCFLAGS="$SLKCFLAGS" + make install LUA_PC=$1 INSTALL="install -s -m0755" DESTDIR=$PKG +} + +runmake lua +pkg-config --exists lua51 && runmake lua51 + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a LICENSE README.markdown $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/libraries/luaunbound/slack-desc b/libraries/luaunbound/slack-desc index 97cb270e76e4f..c9fd8cbcbac70 100644 --- a/libraries/luaunbound/slack-desc +++ b/libraries/luaunbound/slack-desc @@ -10,8 +10,8 @@ luaunbound: luaunbound (libunbound support for the Lua language) luaunbound: luaunbound: Luaunbound is a Lua extension library. luaunbound: -luaunbound: Is is a bridge between Lua and libunbound, which is shipped with -luaunbound: the unbound dns server. +luaunbound: It is a bridge between Lua and libunbound, which is shipped with +luaunbound: the unbound DNS server. luaunbound: luaunbound: luaunbound: |