5 |
|
Patch0: python-ldap-2.3.5-gcc44 |
6 |
|
Requires: python openssl openldap |
7 |
|
|
8 |
+ |
%define isslc6 %(case %cmsplatf in (slc6*) echo true ;; (*) echo false ;; esac) |
9 |
+ |
|
10 |
+ |
%if "%isslc6" == "true" |
11 |
+ |
# On SLC6 we build missing Cyrus SASL. |
12 |
+ |
Requires: cyrus-sasl |
13 |
+ |
%endif |
14 |
+ |
|
15 |
|
%prep |
16 |
|
%setup -q -n %n-%{realversion} |
17 |
|
%patch0 -p1 |
18 |
|
|
19 |
|
%build |
20 |
|
|
21 |
< |
perl -p -i -e 's|/usr/local/openldap-2.3/|$ENV{OPENLDAP_ROOT}/|; s|(library_dirs = .*)|$1 /usr/lib/sasl2 $ENV{OPENSSL_ROOT}/lib|;' setup.cfg |
21 |
> |
# XXX: |
22 |
> |
# Paths in library_dirs (setup.cfg) are hardcoded into RPATH dynamic section |
23 |
> |
# attribute of the binary. Shared libraries are first searched in RPATH paths |
24 |
> |
# before LD_LIBRARY_PATH paths. More information in 'distutils' Python package |
25 |
> |
# source code. |
26 |
> |
|
27 |
> |
# Modify setup.cfg with proper include/libs dirs |
28 |
> |
# ROOT_CYRUS_SASL should be included only on SLC6. |
29 |
> |
# SLC5 has the library by default |
30 |
> |
|
31 |
> |
CYRUS_SASL_ROOT=${CYRUS_SASL_ROOT:-"/usr"} |
32 |
> |
sed -i'' "s:\(library_dirs =\)\(.*\):\1 ${CYRUS_SASL_ROOT}\/lib ${OPENSSL_ROOT}\/lib ${PYTHON_ROOT}\/lib ${OPENLDAP_ROOT}\/lib:g" setup.cfg |
33 |
> |
sed -i'' "s:\(include_dirs = \)\(.*\):\1 ${CYRUS_SASL_ROOT}\/include\/sasl ${OPENSSL_ROOT}\/include ${PYTHON_ROOT}\/include ${OPENLDAP_ROOT}\/include:g" setup.cfg |
34 |
> |
|
35 |
|
python setup.py build |
36 |
|
%install |
37 |
|
python setup.py install --prefix=%i |