1 |
< |
### RPM external python-ldap 2.3.5 |
2 |
< |
Source: http://voxel.dl.sourceforge.net/sourceforge/python-ldap/python-ldap-%{realversion}.tar.gz |
3 |
< |
Requires: python |
4 |
< |
Requires: openssl |
5 |
< |
Requires: openldap |
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 |
|
%prep |
8 |
|
%setup -q -n %n-%{realversion} |
9 |
– |
pwd |
10 |
– |
%build |
11 |
– |
pwd |
9 |
|
|
10 |
< |
mkdir -p sasl2lib |
11 |
< |
ln -s /usr/lib/libsasl2.so.2.0.19 sasl2lib/libsasl2.so |
12 |
< |
|
13 |
< |
perl -p -i -e 's|/usr/local/openldap-2.3/|$ENV{OPENLDAP_ROOT}/|; s|(library_dirs = .*)|$1 /usr/lib/sasl2 %{_builddir}/%n-%{realversion}/sasl2lib $ENV{OPENSSL_ROOT}/lib|;' setup.cfg |
10 |
> |
%build |
11 |
> |
sed -i'' "s:\(library_dirs =\)\(.*\):\1 ${OPENSSL_ROOT}\/lib ${PYTHON_ROOT}\/lib ${OPENLDAP_ROOT}\/lib:g" setup.cfg |
12 |
> |
sed -i'' "s:\(include_dirs =\)\(.*\):\1 ${OPENSSL_ROOT}\/include ${PYTHON_ROOT}\/include ${OPENLDAP_ROOT}\/include:g" setup.cfg |
13 |
> |
sed -i'' "s:\(defines = \)\(.*\):\1 HAVE_TLS HAVE_LIBLDAP_R:g" setup.cfg |
14 |
|
python setup.py build |
18 |
– |
%install |
19 |
– |
python setup.py install --prefix=%i |
20 |
– |
|
21 |
– |
# SCRAM ToolBox toolfile |
22 |
– |
mkdir -p %i/etc/scram.d |
23 |
– |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
24 |
– |
<doc type=BuildSystem::ToolDoc version=1.0> |
25 |
– |
<Tool name=%n version=%v> |
26 |
– |
<info url="http://python-ldap.sourceforge.net/"></info> |
27 |
– |
<Client> |
28 |
– |
<Environment name=PYTHON_LDAP_BASE default="%i"></Environment> |
29 |
– |
<Environment name=PYTHON_LDAP_PYPATH default="$PYTHON_LDAP_BASE/lib/python2.4/site-packages"></Environment> |
30 |
– |
</Client> |
31 |
– |
<use name=openssl> |
32 |
– |
<use name=openldap> |
33 |
– |
<use name=python> |
34 |
– |
<Runtime name=PYTHONPATH value="$PYTHON_LDAP_PYPATH" type=path> |
35 |
– |
</Tool> |
36 |
– |
EOF_TOOLFILE |
15 |
|
|
16 |
< |
%post |
17 |
< |
%{relocateConfig}etc/scram.d/%n |
16 |
> |
%install |
17 |
> |
python setup.py install --prefix=%i |
18 |
> |
find %i -name '*.egg-info' -exec rm {} \; |