summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-22 18:36:19 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-22 18:36:19 +0200
commitf641d36d2acf8c0754c3bf70acedf537cae10d09 (patch)
tree1d15e9fd43b976c101fba0c83899cb9e1bfc1a00 /Makefile
parente5f3d4c4d895ab7f40acd697c56a7c351b889bd3 (diff)
downloadlibpam-radius-auth-f641d36d2acf8c0754c3bf70acedf537cae10d09.tar.gz
libpam-radius-auth-f641d36d2acf8c0754c3bf70acedf537cae10d09.zip
T3641: Debian Bullseye expects PAM security modules in multiarch lib dir
e.g. for amd64 hosts: /lib/x86_64-linux-gnu/security
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3da24a4..c7c6a1b 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,9 @@ src/radius_shell.o: src/radius_shell.c
#pam_radius_auth.so: pam_radius_auth.o md5.o
# ld -shared pam_radius_auth.o md5.o -L/usr/freeware/lib32 -lpam -lc -o pam_radius_auth.so
+# set to x86_64-linux-gnu, arm-linux-gnueabi, etc. by packaging tools
+# If not set, just install directly to /lib
+LIBDIR=/lib/${DEB_TARGET_GNU_TYPE}
######################################################################
#
@@ -72,7 +75,8 @@ src/radius_shell.o: src/radius_shell.c
#
# gcc -shared pam_radius_auth.o md5.o -lpam -lc -o pam_radius_auth.so
#
-pam_radius_auth.so: src/pam_radius_auth.o src/support.o src/md5.o
+PAM_MODULE=pam_radius_auth.so
+$(PAM_MODULE): src/pam_radius_auth.o src/support.o src/md5.o
$(CC) $(LDFLAGS) $(LDSHFLAGS) $^ $(LDLIBS) $(LIBLIBS) -o $@
radius_shell: src/radius_shell.o
@@ -95,3 +99,9 @@ dist:
.PHONY: clean
clean:
@rm -f *~ *.so *.o src/*.o src/*~ radius_shell
+
+install: all
+ install -m 0755 -d $(DESTDIR)$(LIBDIR)/security $(DESTDIR)/etc
+ install -m 0644 $(PAM_MODULE) $(DESTDIR)$(LIBDIR)/security
+ install -m 0600 pam_radius_auth.conf $(DESTDIR)/etc
+