Hello,

This is a question to people who have some experience in building Postfix RPMs.

I am trying to build Postfix RPMs for RHEL/CentOS 5 x86_64. These RPMs should have standard options (those that are included in the standard CentOS Postfix RPM).

The idea is to use http://ftp.wl0.org/official/2.9/SRPMS/postfix-2.9.1-1.src.rpm and create a spec file as follows:

    cd `rpm --eval '%{_sourcedir}'`

    export POSTFIX_LDAP=1
    export POSTFIX_PCRE=1
    export POSTFIX_SASL=2
    export POSTFIX_TLS=1

    # this creates %{_specdir}/postfix.spec
    sh `rpm --eval '%{_sourcedir}'`/make-postfix.spec

Since CentOS OpenLDAP RPMs are very old, we use third-party openldap v2.4.x RPMs (e.g. Symas, LTB or Buchan Milne's). We need to specify in the building process (the spec file, I guess) that Postfix RPM should be built using the libraries/header files from that LDAP package.

The question is: How can we accomplish this?

One change that seems to be needed is to change in postfix.spec.in the lines (that's from your Postfix v2.9.1 file, lines 202-205):

   %if %{with_ldap}
   Requires: openldap >= 1.2.9
   BuildRequires: openldap-devel >= 1.2.9
   %endif

and specify something like (for LTB RPMs; it would be similar for other RPMs):

   %if %{with_ldap}
   Requires: openldap-ltb- >= 2.4.22
   BuildRequires: openldap-ltb-debuginfo >= 2.4.22
   %endif

Now, how can we specify custom paths to LDAP libraries, header files, etc. in the spec file ?

I've seen that there is support for POSTFIX_MYSQL_PATHS but it doesn't seem that there is support for POSTFIX_LDAP_PATHS.

Thanks for any help,
Nick

Reply via email to