From f641d36d2acf8c0754c3bf70acedf537cae10d09 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 22 Jun 2021 18:36:19 +0200 Subject: T3641: Debian Bullseye expects PAM security modules in multiarch lib dir e.g. for amd64 hosts: /lib/x86_64-linux-gnu/security --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Makefile') 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 + -- cgit v1.2.3