From d640e1e7f363f7391558b124e299ffbe9f3a452c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sat, 24 Jun 2017 20:48:45 +0200 Subject: [PATCH] RPM: fix LDAP related packages FTBFS on newer distributions --- .../applications/kcmldap/kcmldap-14.0.0.spec | 19 +++++++++++---- .../kcmldapcontroller-14.0.0.spec | 19 +++++++++++---- .../kcmldapmanager/kcmldapmanager-14.0.0.spec | 19 +++++++++++---- .../kerberostray/kerberostray-14.0.0.spec | 19 +++++++++++---- .../libtdeldap/libtdeldap-14.0.0.spec | 23 ++++++++++++------- 5 files changed, 75 insertions(+), 24 deletions(-) diff --git a/redhat/applications/kcmldap/kcmldap-14.0.0.spec b/redhat/applications/kcmldap/kcmldap-14.0.0.spec index 48b9724f4..24ccd2b46 100644 --- a/redhat/applications/kcmldap/kcmldap-14.0.0.spec +++ b/redhat/applications/kcmldap/kcmldap-14.0.0.spec @@ -177,6 +177,19 @@ This is a small daemon which keeps the LDAP root certificate up to date with the unset QTDIR QTINC QTLIB export PATH="%{tde_bindir}:${PATH}" +extra_includes="%{_includedir}" +extra_libs="%{_libdir}" + +if [ -d "%{_includedir}/openldap24" ]; then + extra_includes="%{_includedir}/openldap24:${extra_includes}" + extra_libs="%{_libdir}/openldap24:${extra_libs}" +fi + +if [ -d "%{_includedir}/heimdal" ]; then + extra_includes="%{_includedir}/heimdal:${extra_includes}" + extra_libs="%{_libdir}/heimdal:${extra_libs}" +fi + %configure \ --prefix=%{tde_prefix} \ --exec-prefix=%{tde_prefix} \ @@ -194,10 +207,8 @@ export PATH="%{tde_bindir}:${PATH}" --enable-rpath \ --disable-gcc-hidden-visibility \ \ -%if 0%{?rhel} == 5 - --with-extra-includes=/usr/include/openldap24 \ - --with-extra-libs=%{_libdir}/openldap24 \ -%endif + --with-extra-includes=${extra_includes} \ + --with-extra-libs=${extra_libs} \ %__make %{?_smp_mflags} diff --git a/redhat/applications/kcmldapcontroller/kcmldapcontroller-14.0.0.spec b/redhat/applications/kcmldapcontroller/kcmldapcontroller-14.0.0.spec index 9191e9b5a..f3f58611f 100644 --- a/redhat/applications/kcmldapcontroller/kcmldapcontroller-14.0.0.spec +++ b/redhat/applications/kcmldapcontroller/kcmldapcontroller-14.0.0.spec @@ -161,6 +161,19 @@ This is a TDE control center module to manage users, groups, and machines in Ker unset QTDIR QTINC QTLIB export PATH="%{tde_bindir}:${PATH}" +extra_includes="%{_includedir}" +extra_libs="%{_libdir}" + +if [ -d "%{_includedir}/openldap24" ]; then + extra_includes="%{_includedir}/openldap24:${extra_includes}" + extra_libs="%{_libdir}/openldap24:${extra_libs}" +fi + +if [ -d "%{_includedir}/heimdal" ]; then + extra_includes="%{_includedir}/heimdal:${extra_includes}" + extra_libs="%{_libdir}/heimdal:${extra_libs}" +fi + %configure \ --prefix=%{tde_prefix} \ --exec-prefix=%{tde_prefix} \ @@ -178,10 +191,8 @@ export PATH="%{tde_bindir}:${PATH}" --enable-rpath \ --disable-gcc-hidden-visibility \ \ -%if 0%{?rhel} == 5 - --with-extra-includes=/usr/include/openldap24 \ - --with-extra-libs=%{_libdir}/openldap24 \ -%endif + --with-extra-includes=${extra_includes} \ + --with-extra-libs=${extra_libs} \ %__make %{?_smp_mflags} diff --git a/redhat/applications/kcmldapmanager/kcmldapmanager-14.0.0.spec b/redhat/applications/kcmldapmanager/kcmldapmanager-14.0.0.spec index f9fb3359c..008da620d 100644 --- a/redhat/applications/kcmldapmanager/kcmldapmanager-14.0.0.spec +++ b/redhat/applications/kcmldapmanager/kcmldapmanager-14.0.0.spec @@ -155,6 +155,19 @@ This is a TDE control center module to manage users, groups, and machines in Ker unset QTDIR QTINC QTLIB export PATH="%{tde_bindir}:${PATH}" +extra_includes="%{_includedir}" +extra_libs="%{_libdir}" + +if [ -d "%{_includedir}/openldap24" ]; then + extra_includes="%{_includedir}/openldap24:${extra_includes}" + extra_libs="%{_libdir}/openldap24:${extra_libs}" +fi + +if [ -d "%{_includedir}/heimdal" ]; then + extra_includes="%{_includedir}/heimdal:${extra_includes}" + extra_libs="%{_libdir}/heimdal:${extra_libs}" +fi + %configure \ --prefix=%{tde_prefix} \ --exec-prefix=%{tde_prefix} \ @@ -172,10 +185,8 @@ export PATH="%{tde_bindir}:${PATH}" --enable-rpath \ --disable-gcc-hidden-visibility \ \ -%if 0%{?rhel} == 5 - --with-extra-includes=/usr/include/openldap24 \ - --with-extra-libs=%{_libdir}/openldap24 \ -%endif + --with-extra-includes=${extra_includes} \ + --with-extra-libs=${extra_libs} \ %__make %{?_smp_mflags} diff --git a/redhat/applications/kerberostray/kerberostray-14.0.0.spec b/redhat/applications/kerberostray/kerberostray-14.0.0.spec index 7b3af241f..de55e48e7 100644 --- a/redhat/applications/kerberostray/kerberostray-14.0.0.spec +++ b/redhat/applications/kerberostray/kerberostray-14.0.0.spec @@ -134,6 +134,19 @@ Kerberos ticket manager which sits in the system tray and allows viewing/control unset QTDIR QTINC QTLIB export PATH="%{tde_bindir}:${PATH}" +extra_includes="%{_includedir}" +extra_libs="%{_libdir}" + +if [ -d "%{_includedir}/openldap24" ]; then + extra_includes="%{_includedir}/openldap24:${extra_includes}" + extra_libs="%{_libdir}/openldap24:${extra_libs}" +fi + +if [ -d "%{_includedir}/heimdal" ]; then + extra_includes="%{_includedir}/heimdal:${extra_includes}" + extra_libs="%{_libdir}/heimdal:${extra_libs}" +fi + %configure \ --prefix=%{tde_prefix} \ --exec-prefix=%{tde_prefix} \ @@ -151,10 +164,8 @@ export PATH="%{tde_bindir}:${PATH}" --enable-rpath \ --disable-gcc-hidden-visibility \ \ -%if 0%{?rhel} == 5 - --with-extra-includes=/usr/include/openldap24 \ - --with-extra-libs=%{_libdir}/openldap24 \ -%endif + --with-extra-includes=${extra_includes} \ + --with-extra-libs=${extra_libs} \ %__make %{?_smp_mflags} diff --git a/redhat/libraries/libtdeldap/libtdeldap-14.0.0.spec b/redhat/libraries/libtdeldap/libtdeldap-14.0.0.spec index 458cf9646..c13dbe2ae 100644 --- a/redhat/libraries/libtdeldap/libtdeldap-14.0.0.spec +++ b/redhat/libraries/libtdeldap/libtdeldap-14.0.0.spec @@ -163,6 +163,19 @@ libtdeldap-trinity-dev contains development files and documentation. unset QTDIR QTINC QTLIB export PATH="%{tde_bindir}:${PATH}" +extra_includes="%{_includedir}" +extra_libs="%{_libdir}" + +if [ -d "%{_includedir}/openldap24" ]; then + extra_includes="%{_includedir}/openldap24:${extra_includes}" + extra_libs="%{_libdir}/openldap24:${extra_libs}" +fi + +if [ -d "%{_includedir}/heimdal" ]; then + extra_includes="%{_includedir}/heimdal:${extra_includes}" + extra_libs="%{_libdir}/heimdal:${extra_libs}" +fi + %configure \ --prefix=%{tde_prefix} \ --exec-prefix=%{tde_prefix} \ @@ -179,14 +192,8 @@ export PATH="%{tde_bindir}:${PATH}" --enable-rpath \ --disable-gcc-hidden-visibility \ \ -%if 0%{?rhel} == 5 - --with-extra-includes=%{_includedir}/openldap24 \ - --with-extra-libs=%{_libdir}/openldap24 \ -%endif -%if 0%{?rhel} >= 6 - --with-extra-includes=%{_includedir}/heimdal \ - --with-extra-libs=%{_libdir}/heimdal \ -%endif + --with-extra-includes=${extra_includes} \ + --with-extra-libs=${extra_libs} \ %__make %{?_smp_mflags}