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.6 by diego, Fri Mar 5 13:37:28 2010 UTC vs.
Revision 1.10 by davidlt, Sun Apr 1 07:51:57 2012 UTC

# Line 5 | Line 5 | Source: http://voxel.dl.sourceforge.net/
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   %patch0 -p1
18  
19   %build
13 mkdir -p sasl2lib
14 ln -s /usr/lib/libsasl2.so.2.0.19 sasl2lib/libsasl2.so
20  
21 < 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
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 >
35   python setup.py build
36   %install
37   python setup.py install --prefix=%i
38  
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/python@PYTHONV@/site-packages"></Environment>
30 </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
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
39   # Dependencies environment
40   rm -rf %i/etc/profile.d
41   mkdir -p %i/etc/profile.d
# Line 50 | Line 48 | done
48  
49  
50   %post
53 %{relocateConfig}etc/scram.d/%n
54 # The relocation below is also needed for dependencies
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