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.10 by davidlt, Sun Apr 1 07:51:57 2012 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
7 < Requires: openldap
5 > Patch0: python-ldap-2.3.5-gcc44
6 > Requires: python openssl openldap
7 >
8 > %define isslc6 %(case %cmsplatf in (slc6*) echo true ;; (*) echo false ;; esac)
9 >
10 > %if "%isslc6" == "true"
11 > # On SLC6 we build missing Cyrus SASL.
12 > Requires: cyrus-sasl
13 > %endif
14  
15   %prep
16   %setup -q -n %n-%{realversion}
17 < pwd
17 > %patch0 -p1
18 >
19   %build
11 pwd
20  
21 < mkdir -p sasl2lib
22 < ln -s /usr/lib/libsasl2.so.2.0.19 sasl2lib/libsasl2.so
21 > # XXX:
22 > # Paths in library_dirs (setup.cfg) are hardcoded into RPATH dynamic section
23 > # attribute of the binary. Shared libraries are first searched in RPATH paths
24 > # before LD_LIBRARY_PATH paths. More information in 'distutils' Python package
25 > # source code.
26 >
27 > # Modify setup.cfg with proper include/libs dirs
28 > # ROOT_CYRUS_SASL should be included only on SLC6.
29 > # SLC5 has the library by default
30 >
31 > CYRUS_SASL_ROOT=${CYRUS_SASL_ROOT:-"/usr"}
32 > sed -i'' "s:\(library_dirs =\)\(.*\):\1 ${CYRUS_SASL_ROOT}\/lib ${OPENSSL_ROOT}\/lib ${PYTHON_ROOT}\/lib ${OPENLDAP_ROOT}\/lib:g" setup.cfg
33 > sed -i'' "s:\(include_dirs = \)\(.*\):\1 ${CYRUS_SASL_ROOT}\/include\/sasl ${OPENSSL_ROOT}\/include ${PYTHON_ROOT}\/include ${OPENLDAP_ROOT}\/include:g" setup.cfg
34  
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
35   python setup.py build
36   %install
37   python setup.py install --prefix=%i
38  
39 < # SCRAM ToolBox toolfile
40 < mkdir -p %i/etc/scram.d
41 < cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
42 < <doc type=BuildSystem::ToolDoc version=1.0>
43 < <Tool name=%n version=%v>
44 < <info url="http://python-ldap.sourceforge.net/"></info>
45 < <Client>
46 < <Environment name=PYTHON_LDAP_BASE default="%i"></Environment>
47 < <Environment name=PYTHON_LDAP_PYPATH default="$PYTHON_LDAP_BASE/lib/python2.4/site-packages"></Environment>
48 < </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
39 > # Dependencies environment
40 > rm -rf %i/etc/profile.d
41 > mkdir -p %i/etc/profile.d
42 > for x in %pkgreqs; do
43 >  case $x in /* ) continue ;; esac
44 >  p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/')
45 >  echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
46 >  echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
47 > done
48 >
49  
50   %post
51 < %{relocateConfig}etc/scram.d/%n
51 > %{relocateConfig}etc/profile.d/dependencies-setup.sh
52 > %{relocateConfig}etc/profile.d/dependencies-setup.csh
53 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines