1 |
|
### RPM external python-ldap 2.3.5 |
2 |
+ |
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages |
3 |
+ |
|
4 |
|
Source: http://voxel.dl.sourceforge.net/sourceforge/python-ldap/python-ldap-%{realversion}.tar.gz |
5 |
|
Patch0: python-ldap-2.3.5-gcc44 |
6 |
< |
Requires: python |
5 |
< |
Requires: openssl |
6 |
< |
Requires: openldap |
6 |
> |
Requires: python openssl openldap |
7 |
|
|
8 |
|
%prep |
9 |
|
%setup -q -n %n-%{realversion} |
10 |
– |
pwd |
10 |
|
%patch0 -p1 |
11 |
|
|
12 |
|
%build |
14 |
– |
pwd |
15 |
– |
|
13 |
|
mkdir -p sasl2lib |
14 |
|
ln -s /usr/lib/libsasl2.so.2.0.19 sasl2lib/libsasl2.so |
15 |
|
|
38 |
|
export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.) |
39 |
|
perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/* |
40 |
|
|
41 |
+ |
# Dependencies environment |
42 |
+ |
rm -rf %i/etc/profile.d |
43 |
+ |
mkdir -p %i/etc/profile.d |
44 |
+ |
for x in %pkgreqs; do |
45 |
+ |
case $x in /* ) continue ;; esac |
46 |
+ |
p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/') |
47 |
+ |
echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh |
48 |
+ |
echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh |
49 |
+ |
done |
50 |
+ |
|
51 |
+ |
|
52 |
|
%post |
53 |
|
%{relocateConfig}etc/scram.d/%n |
54 |
+ |
# The relocation below is also needed for dependencies |
55 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
56 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |
57 |
+ |
|