1 |
ratnik |
1.1 |
### RPM external openldap 2.3.39
|
2 |
ratnik |
1.3 |
## INITENV +PATH LD_LIBRARY_PATH %i/lib
|
3 |
ratnik |
1.1 |
Source: ftp://ftp.openldap.org/pub/OpenLDAP/openldap-stable/openldap-stable-20071118.tgz
|
4 |
ratnik |
1.2 |
Requires: openssl db4
|
5 |
|
|
#cyrus-sasl
|
6 |
ratnik |
1.1 |
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 |
ratnik |
1.2 |
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 |
ratnik |
1.1 |
# 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 |
ratnik |
1.2 |
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 |
ratnik |
1.1 |
|
36 |
ratnik |
1.2 |
./configure --prefix=%i --with-cyrus-sasl --with-tls
|
37 |
ratnik |
1.1 |
make depend
|
38 |
|
|
make
|
39 |
|
|
%install
|
40 |
|
|
make install
|
41 |
ratnik |
1.3 |
|
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 |
|
|
|