ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/openldap.spec
Revision: 1.3
Committed: Thu Aug 7 13:04:38 2008 UTC (16 years, 8 months ago) by ratnik
Branch: MAIN
CVS Tags: nr080812_forCRAB
Changes since 1.2: +17 -0 lines
Log Message:
Added scram tool descriptin file for openldap, with LIBDIR defined (this will add symlinks to the openldap lib in the release lindir) so that python-ldap can resolve openldap libraries via LD_LIBRARY_PATH. Note, that both python-ldap and openldap need to  be  added as external tools to CMSSW.

File Contents

# Content
1 ### RPM external openldap 2.3.39
2 ## INITENV +PATH LD_LIBRARY_PATH %i/lib
3 Source: ftp://ftp.openldap.org/pub/OpenLDAP/openldap-stable/openldap-stable-20071118.tgz
4 Requires: openssl db4
5 #cyrus-sasl
6 Provides: libsasl2.so.2
7
8 #http://www.openssl.org/source/%n-%realversion.tar.gz
9
10 %prep
11 %setup -q -n %n-%{realversion}
12 pwd
13 %build
14
15 pwd
16
17 # Fix missing sasl2 library link on 64-bit SLC4:
18
19 mkdir -p sasl2lib
20 ln -s /usr/lib/libsasl2.so.2.0.19 sasl2lib/libsasl2.so
21
22 # CC C compiler command
23 # CFLAGS C compiler flags
24 # LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
25 # nonstandard directory <lib dir>
26 # CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
27 # headers in a nonstandard directory <include dir>
28 # CPP C preprocessor
29
30 export CPPFLAGS="-I$OPENSSL_ROOT/include -I$DB4_ROOT/include -I$CYRUS_SASL_ROOT/include"
31 export LDFLAGS="-L$OPENSSL_ROOT/lib -L$DB4_ROOT/lib -L$CYRUS_SASL_ROOT/lib -L%{_builddir}/%n-%{realversion}/sasl2lib"
32 echo $CPPFLAGS
33 which cc
34 which gcc
35
36 ./configure --prefix=%i --with-cyrus-sasl --with-tls
37 make depend
38 make
39 %install
40 make install
41
42 # SCRAM ToolBox toolfile
43 mkdir -p %i/etc/scram.d
44 cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
45 <doc type=BuildSystem::ToolDoc version=1.0>
46 <Tool name=%n version=%v>
47 <Client>
48 <Environment name=OPENLDAP_BASE default="%i"></Environment>
49 <Environment name=LIBDIR default="$OPENLDAP_BASE/lib"></Environment>
50 </Client>
51 </Tool>
52 EOF_TOOLFILE
53
54 %post
55 %{relocateConfig}etc/scram.d/%n
56