Add missing EPREFIX-es to fix the previously-broken noweb installation.
[wtk-prefix-overlay.git] / net-nds / openldap / files / openldap-2.4.17-contrib-smbk5pwd.patch
1 diff -Nuar --exclude 'openldap-2.4*' --exclude p -I '$OpenLDAP' openldap-2.4.17.orig/contrib/slapd-modules/smbk5pwd/Makefile openldap-2.4.17/contrib/slapd-modules/smbk5pwd/Makefile
2 --- openldap-2.4.17.orig/contrib/slapd-modules/smbk5pwd/Makefile        2009-04-27 16:36:57.000000000 -0700
3 +++ openldap-2.4.17/contrib/slapd-modules/smbk5pwd/Makefile     2009-07-27 15:00:37.097428029 -0700
4 @@ -9,37 +9,43 @@
5  # top-level directory of the distribution or, alternatively, at
6  # <http://www.OpenLDAP.org/license.html>.
7  
8 +#libexecdir=/usr/lib/openldap
9 +moduledir=$(libexecdir)
10  LIBTOOL=../../../libtool
11 -OPT=-g -O2
12 +#OPT=
13  CC=gcc
14  
15  # Omit DO_KRB5 or DO_SAMBA if you don't want to support it.
16 -DEFS=-DDO_KRB5 -DDO_SAMBA
17 +#DEFS=
18  
19 -HEIMDAL_INC=-I/usr/heimdal/include
20 +#KRB5_INC=
21  SSL_INC=
22  LDAP_INC=-I../../../include -I../../../servers/slapd
23 -INCS=$(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC)
24 +INCS=$(LDAP_INC) $(SSL_INC) $(KRB5_INC)
25  
26 -HEIMDAL_LIB=-L/usr/heimdal/lib -lkrb5 -lkadm5srv
27 +KRB5_LIB=-lkrb5 -lkadm5srv
28  SSL_LIB=-lcrypto
29 -LDAP_LIB=-lldap_r -llber
30 -LIBS=$(LDAP_LIB) $(HEIMDAL_LIB) $(SSL_LIB)
31 -
32 +LDAP_LIB=-L../../../libraries/libldap_r -lldap_r -llber
33 +ifneq (DDO_KRB5,$(findstring DDO_KRB5,$(DEFS)))
34 +       LIBS=$(LDAP_LIB) $(SSL_LIB)
35 +else
36 +       LIBS=$(LDAP_LIB) $(KRB5_LIB) $(SSL_LIB)
37 +endif
38 +       
39  all:   smbk5pwd.la
40  
41  
42  smbk5pwd.lo:   smbk5pwd.c
43 -       $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
44 +       $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(DEFS) $(INCS) -c $?
45  
46  smbk5pwd.la:   smbk5pwd.lo
47 -       $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
48 -       -rpath $(PREFIX)/lib -module -o $@ $? $(LIBS)
49 +       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -version-info 0:0:0 \
50 +       -rpath $(moduledir) -module -o $@ $? $(LIBS)
51  
52  clean:
53         rm -f smbk5pwd.lo smbk5pwd.la
54  
55  install: smbk5pwd.la
56 -       mkdir -p $(PREFIX)/lib/openldap
57 -       $(LIBTOOL) --mode=install cp smbk5pwd.la $(PREFIX)/lib/openldap
58 -       $(LIBTOOL) --finish $(PREFIX)/lib
59 +       mkdir -p $(DESTDIR)$(moduledir)
60 +       $(LIBTOOL) --mode=install cp smbk5pwd.la $(DESTDIR)$(moduledir)
61 +       $(LIBTOOL) --finish $(DESTDIR)$(libexecdir)