36 lines
1.2 KiB
Makefile
36 lines
1.2 KiB
Makefile
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
|
|
|
|
install -d $(DESTDIR)/usr/share/rublon-ssh
|
|
install -m 755 confirmMethod.py $(DESTDIR)/usr/share/rublon-ssh
|
|
install -m 755 confirmUser.py $(DESTDIR)/usr/share/rublon-ssh
|
|
install -m 644 login_rublon.pp $(DESTDIR)/usr/share/rublon-ssh
|
|
|
|
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
|