security: Add lua-argon2

Lua C binding for the Argon2 password hashing algorithm
This commit is contained in:
nia 2020-07-02 14:02:36 +00:00
parent 7cb2598e5a
commit d595f17abc
6 changed files with 61 additions and 1 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.768 2020/06/16 10:30:32 nikita Exp $
# $NetBSD: Makefile,v 1.769 2020/07/02 14:02:36 nia Exp $
#
COMMENT= Security tools
@ -206,6 +206,7 @@ SUBDIR+= libyubikey
SUBDIR+= log2timeline
SUBDIR+= logcheck
SUBDIR+= lsh
SUBDIR+= lua-argon2
SUBDIR+= lua-sec
SUBDIR+= lxqt-openssh-askpass
SUBDIR+= lxqt-policykit

View file

@ -0,0 +1 @@
Lua C binding for the Argon2 password hashing algorithm

View file

@ -0,0 +1,21 @@
# $NetBSD: Makefile,v 1.1 2020/07/02 14:02:36 nia Exp $
DISTNAME= lua-argon2-3.0.1
PKGNAME= ${DISTNAME:S/lua-/${LUA_PKGPREFIX}-/1}
CATEGORIES= security lua
MASTER_SITES= ${MASTER_SITE_GITHUB:=thibaultcha/}
GITHUB_PROJECT= lua-argon2
MAINTAINER= nia@NetBSD.org
HOMEPAGE= https://thibaultcha.github.io/lua-argon2/
COMMENT= Lua C binding for the Argon2 password hashing algorithm
LICENSE= mit
INSTALLATION_DIRS+= ${LUA_CDIR}
do-install:
${INSTALL_LIB} ${WRKSRC}/argon2.so ${DESTDIR}${PREFIX}/${LUA_CDIR}
.include "../../lang/lua/module.mk"
.include "../../security/argon2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,2 @@
@comment $NetBSD: PLIST,v 1.1 2020/07/02 14:02:36 nia Exp $
${LUA_CDIR}/argon2.so

View file

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1 2020/07/02 14:02:36 nia Exp $
SHA1 (lua-argon2-3.0.1.tar.gz) = 02fa984df9fd9fc98918033b759c3653a0cf3d92
RMD160 (lua-argon2-3.0.1.tar.gz) = b558218a195cf9745b62e16e3bc9d1038c3db33d
SHA512 (lua-argon2-3.0.1.tar.gz) = baa21cefc31cd43ee1e339558479e1f262f7c4cc6a180fd684a18fa8631283e9f345b4c3ee0dac8d0c025dfa5877e19b800411b8e51caa4a46ecac9843ec48fa
Size (lua-argon2-3.0.1.tar.gz) = 13836 bytes
SHA1 (patch-Makefile) = 22933ef94bac8fcf19fcc09f4e948c4ad16db75e

View file

@ -0,0 +1,28 @@
$NetBSD: patch-Makefile,v 1.1 2020/07/02 14:02:36 nia Exp $
Honour CC/CFLAGS/LDFLAGS.
Note that -ansi does not support `long long`.
--- Makefile.orig 2018-06-11 02:10:23.000000000 +0000
+++ Makefile
@@ -1,8 +1,7 @@
LIB_NAME = argon2
-CC ?= gcc
-LDFLAGS ?= -shared
-CFLAGS ?= -O2 -fPIC -ansi -Wall -Werror -Wpedantic
+LDFLAGS += -shared
+CFLAGS += -fPIC -std=c99 -Wall -Wpedantic
PREFIX ?= /usr/local
ARGON2_INCDIR ?= $(PREFIX)/include
@@ -17,7 +16,7 @@ BUILD_LDFLAGS = -L$(ARGON2_LIBDIR) -larg
all: $(LIB_NAME).so
$(LIB_NAME).so: $(LIB_NAME).o
- $(CC) $(LDFLAGS) -o $@ $< $(BUILD_LDFLAGS)
+ $(CC) $(LDFLAGS) -o $@ $(LIB_NAME).o $(BUILD_LDFLAGS)
$(LIB_NAME).o: src/$(LIB_NAME).c
$(CC) $(CFLAGS) -c $< -o $@ $(BUILD_CFLAGS)