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

View File

@ -13,9 +13,11 @@ Build
Enter contrib/slapd-modules/ppm directory Enter contrib/slapd-modules/ppm directory
You can optionally customize some variables if you don't want the default ones: 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) - prefix: prefix of the path where ppm is to be installed (defaults to /usr/local)
- libdir: where the ppm library is to be deployed (default to /lib under prefix) - ldap_subdir: OpenLDAP specific subdirectory for modules and configurations (defaults to openldap )
- etcdir: where the ppm example policy is to be deployed (default to /etc/openldap under prefix) - 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 - LDAP_SRC: path to OpenLDAP source directory
- Options in OPTS variable: - Options in OPTS variable:
CONFIG_FILE: (DEPRECATED) path to a ppm configuration file (see PPM_READ_FILE in ppm.h) 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) DEFS = -DDEBUG $(CRACKDEF)
# Define if using a config file: # Define if using a config file:
# -DCONFIG_FILE="\"$(etcdir)/$(EXAMPLE)\"" # -DCONFIG_FILE="\"$(sysconfdir)/$(EXAMPLE)\""
INCS = $(LDAP_INC) INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB) LIBS = $(LDAP_LIB)
@ -52,7 +52,8 @@ libexecdir=$(exec_prefix)/libexec
moduledir = $(libexecdir)$(ldap_subdir) moduledir = $(libexecdir)$(ldap_subdir)
mandir = $(exec_prefix)/share/man mandir = $(exec_prefix)/share/man
man5dir = $(mandir)/man5 man5dir = $(mandir)/man5
etcdir = $(exec_prefix)/etc$(ldap_subdir) etcdir = $(exec_prefix)/etc
sysconfdir = $(prefix)/$(etcdir)$(ldap_subdir)
TEST=ppm_test TEST=ppm_test
EXAMPLE=ppm.example EXAMPLE=ppm.example
@ -74,7 +75,7 @@ install: ppm
for p in $(PROGRAMS); do \ for p in $(PROGRAMS); do \
$(LIBTOOL) --mode=install cp $$p $(DESTDIR)/$(moduledir) ; \ $(LIBTOOL) --mode=install cp $$p $(DESTDIR)/$(moduledir) ; \
done done
$(INSTALL) -m 644 $(EXAMPLE) $(DESTDIR)$(etcdir)/ $(INSTALL) -m 644 $(EXAMPLE) $(DESTDIR)$(sysconfdir)/
# $(INSTALL) -m 755 $(TEST) $(libdir) # $(INSTALL) -m 755 $(TEST) $(libdir)
.PHONY: clean .PHONY: clean