From 27e830f81775951a12569bb9ca7aa6d2d643b335 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Mon, 5 Mar 2001 17:44:52 +0000 Subject: [PATCH] - bcond_off_ldap - don't use -s on %%{debug} Changed files: sendmail-config.m4 -> 1.4 sendmail.spec -> 1.44 --- sendmail-config.m4 | 3 --- sendmail.spec | 14 +++++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/sendmail-config.m4 b/sendmail-config.m4 index c7699a1..4f0672c 100644 --- a/sendmail-config.m4 +++ b/sendmail-config.m4 @@ -1,7 +1,6 @@ define(`confMAPDEF', `-DNEWDB -DNIS') define(`confENVDEF', `$(RPM_OPT_FLAGS) -DXDEBUG=0') define(`confLIBS', `-lnsl') -define(`confLDOPTS', `-s') define(`confMANOWN', `root') define(`confMANGRP', `root') define(`confMANMODE', `644') @@ -10,5 +9,3 @@ define(`confMAN5SRC', `5') define(`confMAN8SRC', `8') APPENDDEF(`confENVDEF', -DSASL) APPENDDEF(`conf_sendmail_LIBS', -lsasl) -APPENDDEF(`confMAPDEF', `-DLDAPMAP') -APPENDDEF(`confLIBS', `-lldap -llber') diff --git a/sendmail.spec b/sendmail.spec index 2c38318..6f210cf 100644 --- a/sendmail.spec +++ b/sendmail.spec @@ -1,3 +1,7 @@ +# +# Conditional build: +# bcond_off_ldap - without LDAP +# Summary: A widely used Mail Transport Agent (MTA) Summary(de): sendmail-Mail-Übertragungsagent Summary(fr): Agent de transport de courrier sendmail @@ -37,7 +41,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) BuildRequires: cyrus-sasl-devel BuildRequires: db3-devel BuildRequires: gdbm-devel -BuildRequires: openldap-devel +%{!?bcond_off_ldap:BuildRequires: openldap-devel} BuildRequires: pam-devel Requires: m4 Prereq: /sbin/chkconfig @@ -113,6 +117,14 @@ install %{SOURCE7} config.m4 %build +%if %{?debug:0}%{!?debug:1} +echo "define(\`confLDOPTS\', \`-s\')" >> config.m4 +%endif +%if %{?bcond_off_ldap:0}%{!?bcond_off_ldap:1} +echo "APPENDDEF(\`confMAPDEF\', \`-DLDAPMAP\')" >> config.m4 +echo "APPENDDEF(\`confLIBS\', \`-lldap -llber\')" >> config.m4 +%endif + RPM_OPT_FLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS} \ -DUSE_VENDOR_CF_PATH=1 -DNETINET6 -D_FFR_TESTMODE_DROP_PRIVS" export RPM_OPT_FLAGS -- 2.43.0