From ce47a444a93a2495d3052805503ee6fa9ba81780 Mon Sep 17 00:00:00 2001 From: Arn0 Date: Thu, 7 Nov 2019 23:22:07 +0100 Subject: network/glewlwyd: updated for version 2.0.0 Signed-off-by: Willy Sudiarto Raharjo --- network/glewlwyd/README | 7 ++++++- network/glewlwyd/glewlwyd.SlackBuild | 20 ++++++++++++++++---- network/glewlwyd/glewlwyd.info | 6 +++--- network/glewlwyd/slack-desc | 2 +- 4 files changed, 26 insertions(+), 9 deletions(-) (limited to 'network/glewlwyd') diff --git a/network/glewlwyd/README b/network/glewlwyd/README index 87abbc3f2e38a..9d6776a0e478e 100644 --- a/network/glewlwyd/README +++ b/network/glewlwyd/README @@ -3,9 +3,14 @@ Glewlwyd Oauth 2 authentication server Oauth 2 Server providing JSON Web Tokens for identification. Lightweight, fast and easy to install on small systems. -Requires a MySql or SQLite3 database. +Requires a MySql, PostgreSQL or SQLite3 database. Handles LDAP or database for users backend. The API backend is fully written in language C, it's based on Ulfius HTTP framework, Hoel database framework and Libjwt JSON Web Tokens library. + +Set GLEWLWYD_SQLITE_INIT=1 to initialize, if it doesn't exists already, a +proper SQLite /var/cache/glewlwyd/glewlwyd.db when installing the package. +The sample configuration file in /etc/glewlwyd/glewlwyd.conf.sample is +then directly usable with the pretty insecure admin/password credentials. diff --git a/network/glewlwyd/glewlwyd.SlackBuild b/network/glewlwyd/glewlwyd.SlackBuild index b264620754850..c4a2d3d9e3b4c 100644 --- a/network/glewlwyd/glewlwyd.SlackBuild +++ b/network/glewlwyd/glewlwyd.SlackBuild @@ -21,7 +21,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=glewlwyd -VERSION=${VERSION:-2.0.0_rc2} +VERSION=${VERSION:-2.0.0} SRCVER=$(tr _ - <<< ${VERSION}) BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -40,16 +40,16 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" + SLKCFLAGS="-O2 -march=i586 -mtune=i686 -Wno-error=maybe-uninitialized" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" + SLKCFLAGS="-O2 -march=i686 -mtune=i686 -Wno-error=maybe-uninitialized" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC -Wno-error=maybe-uninitialized" LIBDIRSUFFIX="64" else - SLKCFLAGS="-O2 -Wno-error=stringop-truncation" + SLKCFLAGS="-O2 -Wno-error=maybe-uninitialized" LIBDIRSUFFIX="" fi @@ -83,7 +83,12 @@ cd .. 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 +# Default directory for SQLite3 database +mkdir -p $PKG/var/cache/glewlwyd/ mv $PKG/etc/glewlwyd/glewlwyd.conf $PKG/etc/glewlwyd/glewlwyd.conf.sample +if [ ! -z "$LIBDIRSUFFIX" ]; then + sed -i 's#/usr/lib/glewlwyd/#/usr/lib${LIBDIRSUFFIX}/glewlwyd/#g' $PKG/etc/glewlwyd/glewlwyd.conf.sample +fi mkdir -p $PKG/etc/rc.d/ install -m 755 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new @@ -97,6 +102,13 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh echo "preserve_perms etc/rc.d/rc.$PRGNAM.new" >> $PKG/install/doinst.sh +if [ ! -z $GLEWLWYD_SQLITE_INIT ]; then + cat >> $PKG/install/doinst.sh <