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.1 by ratnik, Thu Jul 10 20:30:34 2008 UTC vs.
Revision 1.7 by muzaffar, Tue Apr 20 08:32:32 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: 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 > %patch0 -p1
11 >
12   %build
13 < pwd
14 < perl -p -i -e 's|/usr/local/openldap-2.3/|$ENV{OPENLDAP_ROOT}/|; s|(library_dirs = .*)|$1 /usr/lib/sasl2|;' setup.cfg
13 > 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   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=python>
32 < <Runtime name=PYTHONPATH value="$PYTHON_LDAP_PYPATH" type=path>
33 < </Tool>
23 > cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml
24 >  <tool name="%n" version="%v">
25 >    <info url="http://python-ldap.sourceforge.net/"/>
26 >    <client>
27 >      <environment name="PYTHON_LDAP_BASE" default="%i"/>
28 >      <environment name="PYTHON_LDAP_PYPATH" default="$PYTHON_LDAP_BASE/lib/python@PYTHONV@/site-packages"/>
29 >    </client>
30 >    <runtime name="PYTHONPATH" value="$PYTHON_LDAP_PYPATH" type="path"/>
31 >    <use name="openssl"/>
32 >    <use name="openldap"/>
33 >    <use name="python"/>
34 >  </tool>
35   EOF_TOOLFILE
36  
37 + export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
38 + perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*
39 +
40 + # Dependencies environment
41 + rm -rf %i/etc/profile.d
42 + mkdir -p %i/etc/profile.d
43 + for x in %pkgreqs; do
44 +  case $x in /* ) continue ;; esac
45 +  p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/')
46 +  echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
47 +  echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
48 + done
49 +
50 +
51   %post
52 < %{relocateConfig}etc/scram.d/%n
52 > %{relocateConfig}etc/scram.d/%n.xml
53 > # The relocation below is also needed for dependencies
54 > %{relocateConfig}etc/profile.d/dependencies-setup.sh
55 > %{relocateConfig}etc/profile.d/dependencies-setup.csh
56 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines