1 |
### RPM external python-ldap 2.4.10
|
2 |
## INITENV +PATH PYTHONPATH %{i}/${PYTHON_LIB_SITE_PACKAGES}
|
3 |
|
4 |
Source: http://pypi.python.org/packages/source/p/%{n}/%{n}-%{realversion}.tar.gz
|
5 |
Requires: python openssl openldap
|
6 |
|
7 |
%define isfc %(case %{cmsplatf} in (fc*) echo 1 ;; (*) echo 0 ;; esac)
|
8 |
|
9 |
%prep
|
10 |
%setup -q -n %{n}-%{realversion}
|
11 |
|
12 |
%build
|
13 |
sed -i'' "s:\(library_dirs =\)\(.*\):\1 ${OPENSSL_ROOT}\/lib ${PYTHON_ROOT}\/lib ${OPENLDAP_ROOT}\/lib:g" setup.cfg
|
14 |
sed -i'' "s:\(include_dirs =\)\(.*\):\1 ${OPENSSL_ROOT}\/include ${PYTHON_ROOT}\/include ${OPENLDAP_ROOT}\/include:g" setup.cfg
|
15 |
sed -i'' "s:\(defines = \)\(.*\):\1 HAVE_TLS HAVE_LIBLDAP_R:g" setup.cfg
|
16 |
|
17 |
python setup.py build
|
18 |
|
19 |
%install
|
20 |
|
21 |
%if %isfc
|
22 |
mkdir -p %{i}/${PYTHON_LIB_SITE_PACKAGES}
|
23 |
export PYTHONPATH=%{i}/${PYTHON_LIB_SITE_PACKAGES}:${PYTHONPATH}
|
24 |
%endif
|
25 |
|
26 |
python setup.py install --skip-build --prefix=%{i}
|