10 |
|
%patch0 -p1 |
11 |
|
|
12 |
|
%build |
13 |
– |
mkdir -p sasl2lib |
14 |
– |
ln -s /usr/lib/libsasl2.so.2.0.19 sasl2lib/libsasl2.so |
13 |
|
|
14 |
< |
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 |
14 |
> |
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 |
15 |
|
python setup.py build |
16 |
|
%install |
17 |
|
python setup.py install --prefix=%i |
18 |
|
|
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/python@PYTHONV@/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 |
37 |
– |
|
38 |
– |
export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) |
39 |
– |
perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/* |
40 |
– |
|
19 |
|
# Dependencies environment |
20 |
|
rm -rf %i/etc/profile.d |
21 |
|
mkdir -p %i/etc/profile.d |
28 |
|
|
29 |
|
|
30 |
|
%post |
53 |
– |
%{relocateConfig}etc/scram.d/%n |
54 |
– |
# The relocation below is also needed for dependencies |
31 |
|
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
32 |
|
%{relocateConfig}etc/profile.d/dependencies-setup.csh |
33 |
|
|