ITS#7832 - Correctly configure sysconfdir so that etcdir can be overridden.

This commit is contained in:
Quanah Gibson-Mount 2021-06-09 20:23:36 +00:00
parent 362fbedc51
commit 7eaad9d812
2 changed files with 9 additions and 6 deletions
contrib/slapd-modules/ppm

View File

@ -13,9 +13,11 @@ Build
Enter contrib/slapd-modules/ppm directory
You can optionally customize some variables if you don't want the default ones:
- prefix: prefix of the path where ppm is to be installed (default to /usr/local)
- libdir: where the ppm library is to be deployed (default to /lib under prefix)
- etcdir: where the ppm example policy is to be deployed (default to /etc/openldap under prefix)
- prefix: prefix of the path where ppm is to be installed (defaults to /usr/local)
- ldap_subdir: OpenLDAP specific subdirectory for modules and configurations (defaults to openldap )
- moduledir: where the ppm module is to be deployed (defaults to $prefix/$libexecdir/$ldap_subdir)
- etcdir: used to compose default sysconfdir location (defaults to $prefix/etc)
- sysconfdir: where the ppm example policy is to be deployed (defaults to $prefix/$etcdir/$ldap_subdir)
- LDAP_SRC: path to OpenLDAP source directory
- Options in OPTS variable:
CONFIG_FILE: (DEPRECATED) path to a ppm configuration file (see PPM_READ_FILE in ppm.h)

View File

@ -33,7 +33,7 @@ CRACKLIB=$(CRACKLIB_$(CRACK))
DEFS = -DDEBUG $(CRACKDEF)
# Define if using a config file:
# -DCONFIG_FILE="\"$(etcdir)/$(EXAMPLE)\""
# -DCONFIG_FILE="\"$(sysconfdir)/$(EXAMPLE)\""
INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB)
@ -52,7 +52,8 @@ libexecdir=$(exec_prefix)/libexec
moduledir = $(libexecdir)$(ldap_subdir)
mandir = $(exec_prefix)/share/man
man5dir = $(mandir)/man5
etcdir = $(exec_prefix)/etc$(ldap_subdir)
etcdir = $(exec_prefix)/etc
sysconfdir = $(prefix)/$(etcdir)$(ldap_subdir)
TEST=ppm_test
EXAMPLE=ppm.example
@ -74,7 +75,7 @@ install: ppm
for p in $(PROGRAMS); do \
$(LIBTOOL) --mode=install cp $$p $(DESTDIR)/$(moduledir) ; \
done
$(INSTALL) -m 644 $(EXAMPLE) $(DESTDIR)$(etcdir)/
$(INSTALL) -m 644 $(EXAMPLE) $(DESTDIR)$(sysconfdir)/
# $(INSTALL) -m 755 $(TEST) $(libdir)
.PHONY: clean