Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 116045 | Differences between
and this patch

Collapse All | Expand All

(-)openldap-2.3.21-r1.ebuild.ORIG (-17 / +105 lines)
Lines 10-16 Link Here
10
10
11
LICENSE="OPENLDAP"
11
LICENSE="OPENLDAP"
12
SLOT="0"
12
SLOT="0"
13
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
13
KEYWORDS="amd64 ~ppc ~ppc64 ~sparc ~x86"
14
IUSE="berkdb crypt debug gdbm ipv6 kerberos minimal odbc overlays perl readline samba sasl slp ssl tcpd selinux"
14
IUSE="berkdb crypt debug gdbm ipv6 kerberos minimal odbc overlays perl readline samba sasl slp ssl tcpd selinux"
15
15
16
# note that the 'samba' USE flag pulling in OpenSSL is NOT an error.  OpenLDAP
16
# note that the 'samba' USE flag pulling in OpenSSL is NOT an error.  OpenLDAP
Lines 175-180 Link Here
175
	ln -s shtool install
175
	ln -s shtool install
176
	ln -s shtool install.sh
176
	ln -s shtool install.sh
177
177
178
	# bug #116045
179
	# patch contrib modules
180
	if ! use minimal ; then
181
	    cd ${S}/contrib
182
	    epatch ${FILESDIR}/contrib-smbk5pwd-Makefile.patch
183
	fi
178
}
184
}
179
185
180
src_compile() {
186
src_compile() {
Lines 245-257 Link Here
245
	make depend || die "make depend failed"
251
	make depend || die "make depend failed"
246
	make || die "make failed"
252
	make || die "make failed"
247
253
248
	# special kerberos stuff
254
	# openldap/contrib
249
	tc-export CC
255
	tc-export CC
250
	if ! use minimal && use kerberos ; then
256
	if ! use minimal ; then
251
		cd ${S}/contrib/slapd-modules/passwd/ && \
257
		# dsaschema
252
		${CC} -shared -I../../../include ${CFLAGS} -fPIC \
258
			einfo "Building contributed dsaschema"
253
		-DHAVE_KRB5 -o pw-kerberos.so kerberos.c || \
259
			cd ${S}/contrib/slapd-modules/dsaschema
254
		die "failed to compile kerberos module"
260
			${CC} -shared -I../../../include ${CFLAGS} -fPIC \
261
			-Wall -o libdsaschema-plugin.so dsaschema.c || \
262
			die "failed to compile dsaschema module"
263
		# kerberos passwd
264
		if use kerberos ; then
265
			einfo "Building contributed pw-kerberos" 
266
			cd ${S}/contrib/slapd-modules/passwd/ && \
267
			${CC} -shared -I../../../include ${CFLAGS} -fPIC \
268
			-DHAVE_KRB5 -o pw-kerberos.so kerberos.c || \
269
			die "failed to compile kerberos password module"
270
		fi
271
		# netscape mta-md5 password
272
			einfo "Building contributed pw-netscape"
273
			cd ${S}/contrib/slapd-modules/passwd/ && \
274
			${CC} -shared -I../../../include ${CFLAGS} -fPIC \
275
			-o pw-netscape.so netscape.c || \
276
			die "failed to compile netscape password module"
277
		# smbk5pwd overlay
278
		# Note: this modules builds, but may not work with
279
		#   Gentoo's MIT-Kerberos.  It was designed for Heimdal
280
		#   Kerberos. 
281
			einfo "Building contributed smbk5pwd"
282
			local mydef
283
			local mykrb5inc
284
			use samba && mydef="-DDO_SAMBA"
285
			if use kerberos; then
286
				mydef="${mydef} -DDO_KRB5"
287
				if [ -d /usr/include/heimdal ]; then
288
					mykrb5inc="-I/usr/include/heimdal/"
289
				fi
290
			fi
291
			cd ${S}/contrib/slapd-modules/smbk5pwd && \
292
			libexecdir="/usr/$(get_libdir)/openldap" \
293
			DEFS="${mydef}" KRB5_INC="${mykrb5inc}" emake || \
294
			die "failed to compile smbk5pwd module"
295
		# addrdnvalues
296
			einfo "Building contributed addrdnvalues"
297
			cd ${S}/contrib/slapi-plugins/addrdnvalues/ && \
298
			${CC} -shared -I../../../include ${CFLAGS} -fPIC \
299
			-o libaddrdnvalues-plugin.so addrdnvalues.c || \
300
			die "failed to compile addrdnvalues plugin"
255
	fi
301
	fi
256
}
302
}
257
303
Lines 263-269 Link Here
263
}
309
}
264
310
265
src_install() {
311
src_install() {
266
	make DESTDIR=${D} install || die "make install failed"
312
	make DESTDIR="${D}" install || die "make install failed"
267
313
268
	dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE ${FILESDIR}/DB_CONFIG.fast.example
314
	dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE ${FILESDIR}/DB_CONFIG.fast.example
269
	docinto rfc ; dodoc doc/rfc/*.txt
315
	docinto rfc ; dodoc doc/rfc/*.txt
Lines 311-321 Link Here
311
		fi
357
		fi
312
		insinto /etc/conf.d
358
		insinto /etc/conf.d
313
		newins ${FILESDIR}/2.0/slapd.conf slapd
359
		newins ${FILESDIR}/2.0/slapd.conf slapd
314
		if use kerberos && [ -f ${S}/contrib/slapd-modules/passwd/pw-kerberos.so ]; then
360
		# install contributed modules
315
			insinto /usr/$(get_libdir)/openldap/openldap
361
		docinto /
316
			doins ${S}/contrib/slapd-modules/passwd/pw-kerberos.so || \
362
		if [ -e ${S}/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ];
363
		then
364
			cd ${S}/contrib/slapd-modules/dsaschema/
365
			newdoc README README.contrib.dsaschema
366
			exeinto /usr/$(get_libdir)/openldap/openldap
367
			doexe libdsaschema-plugin.so || \
368
			die "failed to install dsaschema module"
369
		fi
370
		if [ -e ${S}/contrib/slapd-modules/passwd/pw-kerberos.so ]; then
371
			cd ${S}/contrib/slapd-modules/passwd/
372
			newdoc README README.contrib.passwd
373
			exeinto /usr/$(get_libdir)/openldap/openldap
374
			doexe pw-kerberos.so || \
317
			die "failed to install kerberos passwd module"
375
			die "failed to install kerberos passwd module"
318
		fi
376
		fi
377
		if [ -e ${S}/contrib/slapd-modules/passwd/pw-netscape.so ]; then
378
			cd ${S}/contrib/slapd-modules/passwd/
379
			newdoc README README.contrib.passwd
380
			exeinto /usr/$(get_libdir)/openldap/openldap
381
			doexe ${S}/contrib/slapd-modules/passwd/pw-netscape.so || \
382
			die "failed to install Netscape MTA-MD5 passwd module"
383
		fi
384
		if [ -e ${S}/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then
385
			cd ${S}/contrib/slapd-modules/smbk5pwd
386
			newdoc README.contrib.smbk5pwd
387
			libexecdir="/usr/$(get_libdir)/openldap" \
388
			DESTDIR="${D}" make install-mod || \
389
			die "failed to install smbk5pwd overlay module"
390
		fi
391
		if [ -e ${S}/contrib/slapd-tools/statslog ]; then
392
			cd ${S}/contrib/slapd-tools
393
			exeinto /usr/bin
394
			newexe statslog ldapstatslog || \
395
			die "failed to install ldapstatslog script"
396
		fi
397
		if [ -e
398
			${S}/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ];
399
		then
400
			cd ${S}/contrib/slapi-plugins/addrdnvalues
401
			newdoc README README.contrib.addrdnvalues
402
			exeinto /usr/$(get_libdir)/openldap/openldap
403
			doexe libaddrdnvalues-plugin.so || \
404
			die "failed to install addrdnvalues plugin"
405
		fi
406
319
	fi
407
	fi
320
408
321
	# install MDK's ssl cert script
409
	# install MDK's ssl cert script
Lines 327-349 Link Here
327
415
328
	# keep old libs if any
416
	# keep old libs if any
329
	# from 2.1
417
	# from 2.1
330
	for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1*; do
418
	for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1* ; do
331
		preserve_old_lib ${each}
419
		preserve_old_lib ${each}
332
	done
420
	done
333
	for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1*; do
421
	for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1* ; do
334
		preserve_old_lib ${each}
422
		preserve_old_lib ${each}
335
	done
423
	done
336
	for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1*; do
424
	for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1* ; do
337
		preserve_old_lib ${each}
425
		preserve_old_lib ${each}
338
	done
426
	done
339
	# from 2.2
427
	# from 2.2
340
	for each in ${ROOT}usr/$(get_libdir)/liblber-2.2*; do
428
	for each in ${ROOT}usr/$(get_libdir)/liblber-2.2* ; do
341
		preserve_old_lib ${each}
429
		preserve_old_lib ${each}
342
	done
430
	done
343
	for each in ${ROOT}usr/$(get_libdir)/libldap-2.2*; do
431
	for each in ${ROOT}usr/$(get_libdir)/libldap-2.2* ; do
344
		preserve_old_lib ${each}
432
		preserve_old_lib ${each}
345
	done
433
	done
346
	for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2*; do
434
	for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2* ; do
347
		preserve_old_lib ${each}
435
		preserve_old_lib ${each}
348
	done
436
	done
349
}
437
}

Return to bug 116045