RDEV-3625: Add generic support for os library path

This commit is contained in:
rublon-jfr 2022-11-02 10:58:32 +01:00 committed by rublon-jfr
parent 629b70d2cd
commit 80b0829414

View File

@ -1,10 +1,25 @@
make:
gcc -fPIC -fno-stack-protector -std=c99 -DOS_NAME="\"$(shell . /etc/os-release; echo $$PRETTY_NAME)\"" -I$(shell ./getPythonPath.sh) -c rublonPam.c src/pamApp.c src/coreHandler.c src/signatureWrapper.c lib/cfg_parse.c lib/cJSON.c lib/qrcodegen.c
include /etc/os-release
ifeq ($(ID), ubuntu)
SYS_LIB_DIR := /usr/lib/x86_64-linux-gnu
else ifeq ($(ID), debian)
SYS_LIB_DIR := /usr/lib/x86_64-linux-gnu
else ifeq ($(ID), centos)
SYS_LIB_DIR := /usr/lib64
endif
.PHONY: all selinux install clean
default: all
all:
gcc -fPIC -fno-stack-protector -std=c99 -DOS_NAME='$(PRETTY_NAME)' -I$(shell ./getPythonPath.sh) -c rublonPam.c src/pamApp.c src/coreHandler.c src/signatureWrapper.c lib/cfg_parse.c lib/cJSON.c lib/qrcodegen.c
ld -x --shared -o pam_rublon.so -lcurl rublonPam.o pamApp.o coreHandler.o signatureWrapper.o cfg_parse.o cJSON.o qrcodegen.o
selinux:
checkmodule -M -m -o login_rublon.mod login_rublon.te
semodule_package -o login_rublon.pp -m login_rublon.mod
#semodule -i login_rublon.pp
install:
install -m 644 rublon.config $(DESTDIR)/etc
@ -13,7 +28,8 @@ install:
install -m 755 confirmUser.py $(DESTDIR)/usr/share/rublon-ssh
install -m 644 login_rublon.pp $(DESTDIR)/usr/share/rublon-ssh
install -d $(DESTDIR)/usr/lib64/security
install -m 644 pam_rublon.so $(DESTDIR)/usr/lib64/security/
install -d $(DESTDIR)$(SYS_LIB_DIR)/security
install -m 644 pam_rublon.so $(DESTDIR)$(SYS_LIB_DIR)/security
clean:
rm pam_rublon.so rublonPam.o pamApp.o coreHandler.o signatureWrapper.o cfg_parse.o cJSON.o qrcodegen.o