1 |
ratnik |
1.1 |
### RPM external python-ldap 2.3.5
|
2 |
diego |
1.6 |
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
|
3 |
|
|
|
4 |
ratnik |
1.1 |
Source: http://voxel.dl.sourceforge.net/sourceforge/python-ldap/python-ldap-%{realversion}.tar.gz
|
5 |
elmer |
1.4 |
Patch0: python-ldap-2.3.5-gcc44
|
6 |
diego |
1.6 |
Requires: python openssl openldap
|
7 |
ratnik |
1.1 |
|
8 |
|
|
%prep
|
9 |
|
|
%setup -q -n %n-%{realversion}
|
10 |
elmer |
1.4 |
%patch0 -p1
|
11 |
|
|
|
12 |
ratnik |
1.1 |
%build
|
13 |
ratnik |
1.2 |
mkdir -p sasl2lib
|
14 |
|
|
ln -s /usr/lib/libsasl2.so.2.0.19 sasl2lib/libsasl2.so
|
15 |
|
|
|
16 |
|
|
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
|
17 |
ratnik |
1.1 |
python setup.py build
|
18 |
|
|
%install
|
19 |
|
|
python setup.py install --prefix=%i
|
20 |
|
|
|
21 |
diego |
1.6 |
# Dependencies environment
|
22 |
|
|
rm -rf %i/etc/profile.d
|
23 |
|
|
mkdir -p %i/etc/profile.d
|
24 |
|
|
for x in %pkgreqs; do
|
25 |
|
|
case $x in /* ) continue ;; esac
|
26 |
|
|
p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/')
|
27 |
|
|
echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
|
28 |
|
|
echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
|
29 |
|
|
done
|
30 |
|
|
|
31 |
|
|
|
32 |
ratnik |
1.1 |
%post
|
33 |
diego |
1.6 |
%{relocateConfig}etc/profile.d/dependencies-setup.sh
|
34 |
|
|
%{relocateConfig}etc/profile.d/dependencies-setup.csh
|
35 |
|
|
|