adjust for go auth plugin
This commit is contained in:
@ -5,7 +5,7 @@ stages:
|
||||
variables:
|
||||
IMAGE_NAME: registry.gitlab.com/wolutator/mosquitto-with-auth
|
||||
HUB_IMAGE_NAME: wollud1969/mosquitto-with-auth
|
||||
|
||||
GO_BINARIES: go1.12.6.linux-amd64.tar.gz
|
||||
build:
|
||||
stage: build
|
||||
image: registry.gitlab.com/wolutator/base-build-env:latest
|
||||
@ -25,6 +25,11 @@ build:
|
||||
script:
|
||||
- apt update
|
||||
- apt install -y gcc g++ libssl-dev uuid-dev xsltproc docbook docbook-xsl libmariadbclient-dev libwebsockets-dev
|
||||
- wget https://dl.google.com/go/$GO_BINARIES
|
||||
- tar -xzf $GO_BINARIES
|
||||
- mv go /usr/local
|
||||
- GOROOT=/usr/local/go
|
||||
- PATH=$PATH:$GOROOT/bin
|
||||
- MOSQ_SRC=`pwd`/parts/mosquitto
|
||||
- BUILD_DIR=`pwd`
|
||||
- pushd parts/mosquitto
|
||||
@ -33,12 +38,12 @@ build:
|
||||
- env DESTDIR=$BUILD_DIR make
|
||||
- env DESTDIR=$BUILD_DIR make install
|
||||
- popd
|
||||
- pushd parts/mosquitto-auth-plug
|
||||
- cat config.mk.in | sed 's,^MOSQUITTO_SRC =,MOSQUITTO_SRC = '"$BUILD_DIR"'/opt,' > config.mk
|
||||
- sed -i 's,CFLAGS += -I$(MOSQUITTO_SRC)/src/,CFLAGS += -I$(MOSQUITTO_SRC)/include/,' Makefile
|
||||
- pushd parts/mosquitto-go-auth
|
||||
- CGO_CFLAGS="-I$BUILD_DIR/opt -fPIC"
|
||||
- CGO_LDFLAGS="-shared"
|
||||
- make
|
||||
- cp auth-plug.so $BUILD_DIR/opt/lib
|
||||
- cp np $BUILD_DIR/opt/bin
|
||||
- cp go-auth.so $BUILD_DIR/opt/lib
|
||||
- cp pw $BUILD_DIR/opt/bin
|
||||
- popd
|
||||
- VERSION=`cat VERSION`
|
||||
- REFCNT=`git rev-list --all --count`
|
||||
|
Reference in New Issue
Block a user