File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed
Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1818
1919 - name : get dependencies
2020 run : |
21- sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl lua5.1 liblua5.1-0- dev libxmlsec1 -dev
21+ sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev libxml2- dev libxslt -dev perl
2222
2323 # openresty
2424 wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
3030 sudo cpanm --notest Test::Nginx > build.log 2>&1 || (cat build.log && exit 1)
3131
3232 # luarocks
33- curl -fsSL https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh | sudo sh
33+ curl -fsSL https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh | bash
3434
3535 - name : script
3636 run : |
Original file line number Diff line number Diff line change 22* .so
33t /servroot
44deps
5+ xmlsec1-1.2.28 *
Original file line number Diff line number Diff line change @@ -6,25 +6,33 @@ INSTALL ?= install
66LUA_INCDIR =/usr/local/openresty/luajit/include/luajit-2.1/
77LUAJIT_DIR =/usr/local/openresty/luajit
88
9+ XMLSEC_VER =1.2.28
10+
911CC =gcc
1012CFLAGS =-g -fPIC -O2
11- XMLSEC1_CFLAGS =$( shell xmlsec1-config --cflags --crypto=openssl)
13+ XMLSEC1_CFLAGS=-D__XMLSEC_FUNCTION__ =__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -Ixmlsec1- $( XMLSEC_VER ) /include/ -I/usr/include/libxml2 -DXMLSEC_CRYPTO_OPENSSL=1
1214CFLAGS_ALL =$(CFLAGS ) -Wall -Werror -std=c99 $(XMLSEC1_CFLAGS )
1315LIBFLAG =-shared
1416LDFLAGS =-g -O2
15- XMLSEC1_LDFLAGS =$(shell xmlsec1-config --libs --crypto=openssl)
17+ XMLSEC1_STATIC_LIBS =xmlsec1-$(XMLSEC_VER ) /./src/openssl/.libs/libxmlsec1-openssl.a xmlsec1-$(XMLSEC_VER ) /./src/.libs/libxmlsec1.a
18+ XMLSEC1_LDFLAGS =-lxml2 -lssl -lcrypto -ldl -Wl,--whole-archive $(XMLSEC1_STATIC_LIBS ) -Wl,--no-whole-archive -lxslt
1619LDFLAGS_ALL =$(LIBFLAG ) $(LDFLAGS ) $(XMLSEC1_LDFLAGS )
1720
1821.PHONY : build
19- build : saml.so
22+ build : $(XMLSEC1_STATIC_LIBS ) saml.so
23+
24+ $(XMLSEC1_STATIC_LIBS ) :
25+ wget --no-check-certificate https://www.aleksey.com/xmlsec/download/older-releases/xmlsec1-$(XMLSEC_VER ) .tar.gz
26+ tar zxf xmlsec1-$(XMLSEC_VER ) .tar.gz
27+ cd xmlsec1-$(XMLSEC_VER ) ; CFLAGS=" -std=c99" ./configure --with-openssl --with-pic --disable-crypto-dl --disable-apps-crypto-dl; make
2028
2129.PHONY : test
22- test : build deps
30+ test : build deps/
2331 prove -r t/
2432
2533.PHONY : clean
2634clean :
27- rm -f * .so * .o
35+ rm -rf * .so * .o xmlsec1- $( XMLSEC_VER ) *
2836
2937saml.o : src/* .c
3038 $(CC ) -c $(CFLAGS_ALL ) -o saml.o src/saml.c
@@ -45,6 +53,5 @@ install:
4553 $(INSTALL ) xsd/* $(INST_LUADIR ) /resty/saml/xsd/
4654 $(INSTALL ) t/lib/keycloak.lua $(INST_LUADIR ) /resty/saml/
4755
48- .PHONY : deps
49- deps :
56+ deps/ :
5057 luarocks install --lua-dir=$(LUAJIT_DIR ) rockspec/lua-resty-saml-main-0-0.rockspec --tree=deps --only-deps --local
You can’t perform that action at this time.
0 commit comments