freebsd-ports/security/pam_abl/files/patch-Makefile
Martin Wilke 7021596597 - Respect PREFIX
PR:		140152
Submitted by:	Petr Rehor <prehor@gmail.com> (maintainer)
2009-11-20 18:49:02 +00:00

42 lines
1.2 KiB
Text

--- Makefile.orig Wed Oct 12 21:22:25 2005
+++ Makefile Sun Dec 11 00:29:31 2005
@@ -1,11 +1,11 @@
# Makefile
# $Id: Makefile,v 1.1.1.1 2005/10/12 19:22:25 tagishandy Exp $
-CFLAGS=-Wall -fPIC
-PAMDIR=/lib/security
-CONFDIR=/etc/security
-DBDIR=/var/lib/abl
-LIBS=-ldb -lpthread
+CFLAGS=-Wall -fPIC -I%%PREFIX%%/include -I%%LOCALBASE%%/include
+PAMDIR=%%PREFIX%%/lib
+CONFDIR=%%ETCPREFIX%%/etc
+DBDIR=%%PAMABLDB%%
+LIBS=-L%%PREFIX%%/lib -L%%LOCALBASE%% -ldb -lpthread
MODULE=pam_abl.so
OBJ=pam_abl.o log.o config.o rule.o
SUBDIRS=tools
@@ -14,17 +14,17 @@
for d in $(SUBDIRS) ; do cd $$d && make $@ && cd .. ; done
$(MODULE) : $(OBJ)
- ld -x --shared $(LIBS) -o $@ $^
+ ld -x --shared $(LIBS) -o $(MODULE) $(OBJ)
clean :
rm -f $(MODULE) $(OBJ)
for d in $(SUBDIRS) ; do cd $$d && make $@ && cd .. ; done
install : $(MODULE)
- install --mode=755 --strip $(MODULE) $(PAMDIR)
- #install --mode=644 conf/pam_abl.conf $(CONFDIR)
- install -d --mode=755 $(DBDIR)
- for d in t $(SUBDIRS) ; do cd $$d && make $@ && cd .. ; done
+ install -m 755 -s $(MODULE) $(PAMDIR)
+ install -m 644 conf/pam_abl.conf $(CONFDIR)/pam_abl.conf.sample
+ install -d -m 755 $(DBDIR)
+ for d in $(SUBDIRS) ; do cd $$d && make $@ && cd .. ; done
depend :
cc -MM *.c > deps