openldap/check-password-makefile.patch
Simon Pichugin 004e302f0d Update to new major release OpenLDAP 2.6.1
- rediff all patches and remove patches now upstream
- use upstream source location for check password module
  and rediff patch due to this
- add patch to fix build issue in 2.5.4 (from upstream)
- clean and sort buildreqs
- remove various refs to bdb
- remove now default -DLDAP_USE_NON_BLOCKING_TLS
- add new modules and enable load balancer as module
- disable wiredtired backend due to missing build deps
- don't remove files that don't exist
- let check-config work on *.mdb over legacy files
- remove refs to old-style config
- new soname names
- remove libldap_r link as the library was merged with libldap
- refactor openldap-compat package to support the transition from 2.4
- add UPGRADE_INSTRUCTIONS for openldap-server upgrade

The original patch was submitted by Fedora user - terjeros
https://src.fedoraproject.org/rpms/openldap/pull-request/6

Resolves: #1955293
2022-01-31 14:59:38 -08:00

59 lines
1.5 KiB
Diff

diff --git a/Makefile b/Makefile
index 4457bad..91de40b 100644
--- a/Makefile
+++ b/Makefile
@@ -13,17 +13,10 @@ CRACKLIB=/usr/share/cracklib/pw_dict
#
CONFIG=/etc/openldap/check_password.conf
-
-# Where to find the OpenLDAP headers.
-#
-LDAP_INC=-I/usr/include/openldap/include \
- -I/usr/include/openldap/servers/slapd
-
-# Where to find the CrackLib headers.
-#
-CRACK_INC=
-
-INCS=$(LDAP_INC) $(CRACK_INC)
+CFLAGS+=-fpic \
+ -DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\"" \
+ -DCONFIG_FILE="\"$(CONFIG)\"" \
+ -DDEBUG
LDAP_LIB=-lldap_r -llber
@@ -33,27 +26,21 @@ LDAP_LIB=-lldap_r -llber
#
CRACKLIB_LIB=-lcrack
-CC_FLAGS=-g -O2 -Wall -fpic
-CRACKLIB_OPT=-DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\""
-DEBUG_OPT=-DDEBUG
-CONFIG_OPT=-DCONFIG_FILE="\"$(CONFIG)\""
-
-OPT=$(CC_FLAGS) $(CRACKLIB_OPT) $(CONFIG_OPT) $(DEBUG_OPT)
-
LIBS=$(LDAP_LIB) $(CRACKLIB_LIB)
LIBDIR=/usr/lib/openldap/
+
all: check_password
check_password.o:
- $(CC) $(OPT) -c $(INCS) check_password.c
+ $(CC) $(CFLAGS) -c $(LDAP_INC) check_password.c
check_password: clean check_password.o
- $(CC) -shared -o check_password.so check_password.o $(CRACKLIB_LIB)
+ $(CC) $(LDFLAGS) -shared -o check_password.so check_password.o $(CRACKLIB_LIB)
install: check_password
- cp -f check_password.so $(LIBDIR)
+ cp -f check_password.so ../../../usr/lib/openldap/modules/
clean:
$(RM) check_password.o check_password.so check_password.lo