ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/py2-memcached.spec
Revision: 1.4
Committed: Wed Apr 1 16:25:04 2009 UTC (16 years, 1 month ago) by valya
Branch: MAIN
CVS Tags: builder_2010-10-13_13-04-14_dbs-apps, builder_2010-10-13_12-53-04_dbs-web, DD_20101007_slc5_amd64_gcc434, HG1009c, builder_2010-09-15_18-10-44_dbs-apps, HG1009b, HG1009a, dg-base-rev21, dg-base-rev20, dg-base-rev19, dg-base-rev18, DD_20100824_slc5_amd64_gcc434_v1, DD_20100824_slc5_amd64_gcc434, dg-base-rev17, FRONTEND_CONF_3_30_20100724, FRONTEND_CONF_3_29_20100723, dg-base-rev16, ge20100722-rpm-osx-64-bit, builder2010_07_09_1278688493-dbs-web, dg-base-rev15, ge20100621-bootstrap-rpm-4-8-macosx, dg20100617-dbs, dg20100617-dd, DD_20100615_slc5_amd64_gcc434, ge20100611-apt-rpm-4-8-gcc-4-5-0, MotT0_1_0_15, dg20100609-dd, MotT0_1_0_14, DD_20100609_slc5_amd64_gcc434, dg20100608-dd, dg20100608-dbs, MotT0_1_0_13, DD_20100607_slc5_amd64_gcc434, MotT0_1_0_12, MotT0_1_0_11, MotT0_1_0_10, MotT0_1_0_9, dg-base-rev14, MotT0_1_0_8, MotT0_1_0_6, MotT0_1_0_5, MotT0_1_0_4, MotT0_1_0_3, MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, dg20100526-dd, dg-base-rev13, DD_20100525_slc5_amd64_gcc434, ge20100521b-new-rpm, dg20100521-dbs, ge20100521-new-rpm, DBS_20100520_slc5_amd64_gcc434, ge20100519-new-apt, T0Mon_100518_1, dg20100504-dd, dg20100504-dbs, DD_20100503_slc5_amd64_gcc434, DBS_20100503_slc5_amd64_gcc434, T0Mon_100503_1, ge20100427-rpm-on-linux, dg-base-rev12, ge20100422-rpm-4-8-0, dg20100416-dbs, dg-base-rev11, dg-base-rev10, dg-base-rev9, dg20100401-dbs, dg-base-rev8, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, DAS_20100302_slc5_amd64_gcc434, dg-base-rev7, dg20100226-dbs, dg-base-rev6, DBS_20100226_slc5_amd64_gcc434, DBS_20100217_slc5_amd64_gcc434, FILEMOVER_20100217_slc5_amd64_gcc434, FRONTEND_CONF_3_24_20100217, DAS_20100217_slc5_amd64_gcc434, DAS_20100216b_slc5_amd64_gcc434, T0Mon_100216_1, DAS_20100216_slc5_amd64_gcc434, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_2, T0Mon_100204_1, dg20100201-dbs3, FILEMOVER_20100201_slc5_amd64_gcc434, FILEMOVER_20100128b_slc5_amd64_gcc434, dg20100129-dbs3, dg20100128-dbs3, FILEMOVER_20100128_slc5_amd64_gcc434, DAS_20100127_slc5_amd64_gcc434, T0Mon_100127_1, DAS_20100126_slc5_amd64_gcc434, FILEMOVER_20100122_slc5_amd64_gcc434, DAS_20100119_slc5_amd64_gcc434, DAS_20100115_slc5_amd64_gcc434, dg20100115-security, DBS_20100115_slc5_amd64_gcc434, dg20100112-security, DBS_20100112_slc5_amd64_gcc434, DBS_20100111_slc5_amd64_gcc434, dg20100111-security, dg20100107b-wmcore, dg20100107-wmcore, DAS_20100105_slc5_amd64_gcc434, DAS_20091221_slc5_amd64_gcc434, DAS_20091214_slc5_amd64_gcc434, dg20091211-couchdb, dg20091210-phedex, dg20091203c-comp-base, DD_20091208_slc5_amd64_gcc434, DAS_20091208_slc5_amd64_gcc434, FILEMOVER_20091208_slc5_amd64_gcc434, DBS_20091208_slc5_amd64_gcc434, dg20091203b-comp-base, dg20091203-comp-base, DAS_20091202, DQMCATTEST_0_0_1, pe20091117a-fromDAS_20090709, DAS_20091117, pe20091116b-fromDAS_20090709, pe20091116a-fromDAS_20090709, T0Mon_091111_1, BUILDBOT_01, CERNOIDv02, DAS_20091104, CouchDB_0_10_0, DAS_20091016, CERNOIDv01, DAS_20091014, WMCORE-before-refactor, PerfSuiteDB_20090930, PerfSuiteDB_20090916, pe20090910-fromDAS_20090709, PerfSuiteDB_20090904_almost_stable, PerfSuiteDB_20090904, PerfSuiteDB_20090901, forHEARTBEATr04, RPMVERIFY_0_2, forHEARTBEATr01, DAS_20090709, DAS_20090607, DAS_20090604, DAS_20090603, ap20090520-osx105, ap20090519-osx105, DAS_20090514_3, DAS_20090514_2, DAS_20090514_1, DAS_20090514, DAS_20090408, DAS_20090330
Changes since 1.3: +26 -1 lines
Log Message:
 Added dependency creation part

File Contents

# User Rev Content
1 valya 1.1 ### RPM external py2-memcached 1.43
2     %define pythonv %(echo $PYTHON_VERSION | cut -f1,2 -d.)
3     ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
4    
5 valya 1.3 # The first line above define location of our RPM in CMS RPM repositoy (external), the RPM name
6     # (py2-memcached) and RPM version of the package (1.43). The we define local variable
7     # pythonv and use CMS macro INITENV to define initial path and python path.
8     # Below we define set of instruction for RPM build system to build our package.
9    
10     # define location of the memcached code. Here realversion defines version of the package we will
11     # retrieve from specified location (can be http/ftp/cvs).
12     # The realversion is defined by first line in this file, py2-memcached 1.43, first it's a new
13     # name for our RPM and 1.43 is RPM package version (realversion).
14 valya 1.1 Source: ftp://ftp.tummy.com/pub/python-memcached/old-releases/python-memcached-%realversion.tar.gz
15 valya 1.3
16     # define dependencies for memcached
17 valya 1.4 Requires: python py2-setuptools memcached
18 valya 1.3
19     # pre-build step, put your instruction here, e.g. define environment
20     # here we use %setup instruction to setup package directory where package will be located.
21     # the name, python-memcached-1.43 is what we get when untar the tarball, so we put here
22     # python-memcached-%realversion
23     %prep
24 valya 1.1 %setup -n python-memcached-%realversion
25 valya 1.3
26     # put here build instruction, e.g. make build, since python code doesn't require
27     # any special instruction we leave this section blank
28 valya 1.1 %build
29 valya 1.3
30     # install instructions, e.g. make install, in our case we can use just
31     # python setup.py build to build and package and move build code into install area
32     # Here %i refers to install area where our package will be installed
33 valya 1.1 %install
34     mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
35     python setup.py build
36     mv build/lib/* %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
37    
38    
39 valya 1.4 # This will generate the correct dependencies-setup.sh/dependencies-setup.csh
40     # using the information found in the Requires statements of the different
41     # specs and their dependencies.
42     mkdir -p %i/etc/profile.d
43     echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
44     echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
45     echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
46     for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
47     do
48     case X$tool in
49     Xdistcc|Xccache )
50     ;;
51     * )
52     toolcap=`echo $tool | tr a-z- A-Z_`
53     eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
54     eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
55     ;;
56     esac
57     done
58     perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
59     perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
60    
61     %post
62     %{relocateConfig}etc/profile.d/dependencies-setup.sh
63     %{relocateConfig}etc/profile.d/dependencies-setup.csh