summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorArn0 <yth@ythogtha.org>2019-11-07 23:22:07 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-11-09 09:39:15 +0700
commitce47a444a93a2495d3052805503ee6fa9ba81780 (patch)
tree2a28fd42e11998fd3294c9a553100d900c6e2d6e /network
parenta5ab89a4d961d5e6bcb00b8928c03c1fd7b36b66 (diff)
downloadslackbuilds-ce47a444a93a2495d3052805503ee6fa9ba81780.tar.gz
network/glewlwyd: updated for version 2.0.0
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/glewlwyd/README7
-rw-r--r--network/glewlwyd/glewlwyd.SlackBuild20
-rw-r--r--network/glewlwyd/glewlwyd.info6
-rw-r--r--network/glewlwyd/slack-desc2
4 files changed, 26 insertions, 9 deletions
diff --git a/network/glewlwyd/README b/network/glewlwyd/README
index 87abbc3f2e..9d6776a0e4 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 b264620754..c4a2d3d9e3 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 <<EOF
+if [ ! -f /var/cache/glewlwyd/glewlwyd.db ];then
+ sqlite3 /var/cache/glewlwyd/glewlwyd.db < /usr/share/glewlwyd/docs/database/init.sqlite3.sql
+fi
+EOF
+fi
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/glewlwyd/glewlwyd.info b/network/glewlwyd/glewlwyd.info
index c8df81c90c..2f35fc58af 100644
--- a/network/glewlwyd/glewlwyd.info
+++ b/network/glewlwyd/glewlwyd.info
@@ -1,8 +1,8 @@
PRGNAM="glewlwyd"
-VERSION="2.0.0_rc2"
+VERSION="2.0.0"
HOMEPAGE="https://github.com/babelouest/glewlwyd"
-DOWNLOAD="https://github.com/babelouest/glewlwyd/archive/v2.0.0-rc2/glewlwyd-2.0.0-rc2.tar.gz"
-MD5SUM="dd3ccb87b9d54e13f7aa0ba302ba1619"
+DOWNLOAD="https://github.com/babelouest/glewlwyd/archive/v2.0.0/glewlwyd-2.0.0.tar.gz"
+MD5SUM="5f27b3ef16efdf0d9f509848622a034a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libconfig libjwt oath-toolkit libcbor hoel"
diff --git a/network/glewlwyd/slack-desc b/network/glewlwyd/slack-desc
index 9b13c25bf0..2b2ecd83af 100644
--- a/network/glewlwyd/slack-desc
+++ b/network/glewlwyd/slack-desc
@@ -10,7 +10,7 @@ glewlwyd: glewlwyd (Oauth 2 authentication server)
glewlwyd:
glewlwyd: Oauth 2 Server providing JSON Web Tokens for identification.
glewlwyd: Lightweight, fast and easy to install on small systems.
-glewlwyd: Requires a MySql or SQLite3 database.
+glewlwyd: Requires a MySql, PostgreSQL or SQLite3 database.
glewlwyd: Handles LDAP or database for users backend.
glewlwyd:
glewlwyd: The API backend is fully written in language C.