ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/python-ldap.spec
(Generate patch)

Comparing COMP/CMSDIST/python-ldap.spec (file contents):
Revision 1.3 by ratnik, Tue Aug 12 17:47:08 2008 UTC vs.
Revision 1.6 by diego, Fri Mar 5 13:37:28 2010 UTC

# Line 1 | Line 1
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 < Requires: python
6 < Requires: openssl
5 < Requires: openldap
5 > Patch0: python-ldap-2.3.5-gcc44
6 > Requires: python openssl openldap
7  
8   %prep
9   %setup -q -n %n-%{realversion}
10 < pwd
10 < %build
11 < pwd
10 > %patch0 -p1
11  
12 + %build
13   mkdir -p sasl2lib
14   ln -s /usr/lib/libsasl2.so.2.0.19 sasl2lib/libsasl2.so
15  
# Line 26 | Line 26 | cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
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>
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>
# Line 35 | Line 35 | cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
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 +
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 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines