RE: Problem building pine 4.58 on Solaris 9 with LDAP

2003-10-07 Thread Dennis McRitchie
> > The problem comes in building on Solaris 9. Openldap's libldap.a calls
> > inet_aton(), which on Solaris resides in /usr/lib/libresolv.so (whereas
on
> > RedHat 9 it resides in libc). This is therefore not being automatically
> > picked up by the pine makefile, so specifying "-lresolv" as part of
> > EXTRALDFLAGS is required to complete the build successfully.
(Interestingly,
> > openldap is aware of the -lresolv requirement and uses it to test for
the
> > presence of inet_aton() as well as at build time.)
>
> I've taken over your LDAP related changes, although in a
> little bit adjusted way. Especially I had to make the -lresolv
> part dependent on the Solaris platform, of course. See
> http://cvs.openpkg.org/chngview?cn=12595 for details. Thanks for your
> contribution.

Glad to help. BTW, although I like your conditional solution better,
making -lresolv conditional on Solaris is not actually required since the
original OpenLDAP scripts unconditionally use "-lresolv" on both RedHat and
Solaris. But I agree that it is preferred.

Dennis

Dennis McRitchie
Research & Academic Applications Support (RAAS)
Academic Services Department
Office of Information Technology
Princeton University

__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   [EMAIL PROTECTED]


Re: Problem building pine 4.58 on Solaris 9 with LDAP

2003-10-06 Thread Thomas Lotterer
On Fri, Oct 03, 2003, Ralf S. Engelschall wrote:

> [...] generic solution to your problem is that you write your own dummy
> package (whatever it is named) which "Provides: MTA" and contains a
> symlink /sbin/sendmail pointing to your OS sendmail. [...]
> 
Please note the thread about the new "openpkg-import (Was: Re: Pine
dependencies)" package.

--
[EMAIL PROTECTED], Cable & Wireless
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   [EMAIL PROTECTED]


Re: Problem building pine 4.58 on Solaris 9 with LDAP

2003-10-03 Thread Ralf S. Engelschall
On Fri, Oct 03, 2003, Dennis McRitchie wrote:

> We need pine to support both ssl and ldap. So I obtained the pine version
> from the openpkg current site (pine-4.58L-20030919.src.rpm) and modified the
> spec file to conditionally (with_ldap=yes) support LDAP as shown in the
> extract at the bottom of this message.
>
> The problem comes in building on Solaris 9. Openldap's libldap.a calls
> inet_aton(), which on Solaris resides in /usr/lib/libresolv.so (whereas on
> RedHat 9 it resides in libc). This is therefore not being automatically
> picked up by the pine makefile, so specifying "-lresolv" as part of
> EXTRALDFLAGS is required to complete the build successfully. (Interestingly,
> openldap is aware of the -lresolv requirement and uses it to test for the
> presence of inet_aton() as well as at build time.)

I've taken over your LDAP related changes, although in a
little bit adjusted way. Especially I had to make the -lresolv
part dependent on the Solaris platform, of course. See
http://cvs.openpkg.org/chngview?cn=12595 for details. Thanks for your
contribution.

> I also added another build option regarding sendmail which you may or may
> not want to include. On our systems, sendmail is considered an integral part
> of the OS (be it Solaris or Linux) and is installed and configured
> appropriately for our mail server on all systems. So we don't want to build
> mail clients (such as pine) that default to their own "private" sendmail.
> Rather, we need to build pine so that it points to the OS default sendmail
> location. My option (default_sendmail=yes) does this.

Sorry, but this part I have not taken over. Mainly, because I Pine
always wants an MTA as Mutt and others do. The more politically correct
and generic solution to your problem is that you write your own dummy
package (whatever it is named) which "Provides: MTA" and contains a
symlink /sbin/sendmail pointing to your OS sendmail. This
package you then can use to fulfill the MTA dependency for other OpenPKG
packages, too.
   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com

__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   [EMAIL PROTECTED]


Problem building pine 4.58 on Solaris 9 with LDAP

2003-10-03 Thread Dennis McRitchie
We need pine to support both ssl and ldap. So I obtained the pine version
from the openpkg current site (pine-4.58L-20030919.src.rpm) and modified the
spec file to conditionally (with_ldap=yes) support LDAP as shown in the
extract at the bottom of this message.

The problem comes in building on Solaris 9. Openldap's libldap.a calls
inet_aton(), which on Solaris resides in /usr/lib/libresolv.so (whereas on
RedHat 9 it resides in libc). This is therefore not being automatically
picked up by the pine makefile, so specifying "-lresolv" as part of
EXTRALDFLAGS is required to complete the build successfully. (Interestingly,
openldap is aware of the -lresolv requirement and uses it to test for the
presence of inet_aton() as well as at build time.)

I also added another build option regarding sendmail which you may or may
not want to include. On our systems, sendmail is considered an integral part
of the OS (be it Solaris or Linux) and is installed and configured
appropriately for our mail server on all systems. So we don't want to build
mail clients (such as pine) that default to their own "private" sendmail.
Rather, we need to build pine so that it points to the OS default sendmail
location. My option (default_sendmail=yes) does this.

Note that everything defaults to the way you had it if no options are
explicitly specified with --define.

I have uploaded the new src rpm (pine-4.58L-20031003.src.rpm) built from the
changed pine.spec to the openpkg upload area for your consideration.

Dennis


#   package options
%option   with_ssl  no
%option   with_ldap  no
%option   default_sendmail  no

#   list of sources
Source0:  ftp://ftp.cac.washington.edu/pine/pine%{V_real}.tar.bz2
Source1:  pine.conf.fixed
Source2:  pine.conf

#   build information
Prefix:   %{l_prefix}
BuildRoot:%{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 1.3.1, make, gcc
PreReq:   OpenPKG, openpkg >= 1.3.1
%if "%{default_sendmail}" == "no"
BuildPreReq:  MTA
PreReq:   MTA
%endif
%if "%{with_ssl}" == "yes"
BuildPreReq:  openssl
PreReq:   openssl
%endif
%if "%{with_ldap}" == "yes"
BuildPreReq:  openldap
PreReq:   openldap
%endif
AutoReq:  no
AutoReqProv:  no

%description
Pine - a Program for Internet News & Email - is a tool for reading,
sending, and managing electronic messages. Pine was developed by
Computing & Communications at the University of Washington. Though
originally designed for inexperienced email users, Pine has evolved
to support many advanced features, and an ever-growing number of
configuration and personal-preference options.

%prep
%setup -q -n pine%{V_real}

%build
#   determine build platform
OS=""
OS_DEP_FILE=""
case "%{l_platform -t}" in
*-freebsd* ) OS="bsf"; OS_DEP_FILE="pine/osdep/os-bsf.h" ;;
*-linux*   ) OS="slx"; OS_DEP_FILE="pine/osdep/os-lnx.h" ;;
*-sunos5.* ) OS="gs5"; OS_DEP_FILE="pine/osdep/os-sol.h" ;;
*)
echo "Sorry, unsupported architecture '%{l_platform -t}'" |
%{l_rpmtool} msg -b -t error 1>&2
exit 1
;;
esac

#   adjust paths
PINE_CONF_FIXED="%{l_prefix}/etc/pine/pine.conf.fixed"
PINE_CONF="%{l_prefix}/etc/pine/pine.conf"
%if "%{default_sendmail}" == "no"
SENDMAIL="%{l_prefix}/sbin/sendmail"
%endif
%{l_shtool} subst  -e "s;^\(#define SYSTEM_PINERC_FIXED[]\).*$;\1
\"\";"  -e "s;^\(#define SYSTEM_PINERC[ ]\).*$;\1 \"\";" %if 
"%{default_sendmail}" == "no"
 -e "s;^\(#define SENDMAIL[ ]\).*$;\1 \"\";" %endif
 

#   clean up before building Pine
sh ./build clean

#   set up for LDAP if requested
%if "%{with_ldap}" == "yes"
mkdir ldap
ln -s %{l_prefix}/include ldap/include
ln -s %{l_prefix}/lib ldap/libraries
%endif

#   build Pine
sh ./build CC="%{l_cc}" EXTRACFLAGS="%{l_cflags -O}" %if 
"%{with_ldap}" == "yes"
EXTRALDFLAGS="%{l_ldflags} -lresolv" %else
EXTRALDFLAGS="%{l_ldflags}" NOLDAP %endif
%if "%{with_ssl}" == "yes"
SSLDIR="%{l_prefix}" SSLTYPE="unix" %else
NOSSL %endif

^^

Dennis McRitchie
Research & Academic Applications Support (RAAS)
Academic Services Department
Office of Information Technology
Princeton University

__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   [EMAIL PROTECTED]