python-db/python-db.spec

changeset 687
7d33a70799f3
parent 313
fc0449ec63bb
equal deleted inserted replaced
0:a7e37aeeec0f 1:43bf15071ca2
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE. 21 ## SUCH DAMAGE.
22 ## 22 ##
23 23
24 # FIXME: rse: Oracle module was blindly packaged
25
26 # package version 24 # package version
27 %define V_python 2.5 25 %define V_python 2.7
28 %define V_pysqlite_major 2.4 26 %define V_pysqlite 2.6.3
29 %define V_pysqlite 2.4.1 27 %define V_psycopg2 2.4
30 %define V_psycopg2 2.0.14 28 %define V_psycopg_maj 2-4
31 %define V_mysql_python 1.2.3c1 29 %define V_mysql_python 1.2.3
32 %define V_cx_oracle 5.0.3 30 %define V_cx_oracle 5.1
33 %define V_sqlobject 0.12.4 31 %define V_sqlobject 0.15.1
34 32
35 # package information 33 # package information
36 Name: python-db 34 Name: python-db
37 Summary: Python DB-API 2.0 Modules 35 Summary: Python DB-API 2.0 Modules
38 URL: http://www.python.org/ 36 URL: http://www.python.org/
41 Distribution: OpenPKG Community 39 Distribution: OpenPKG Community
42 Class: EVAL 40 Class: EVAL
43 Group: Language 41 Group: Language
44 License: GPL 42 License: GPL
45 Version: %{V_python} 43 Version: %{V_python}
46 Release: 20100506 44 Release: 20110322
47 45
48 # package options 46 # package options
49 %option with_sqlite yes 47 %option with_sqlite yes
50 %option with_pgsql no 48 %option with_pgsql no
51 %option with_mysql no 49 %option with_mysql no
52 %option with_oracle no 50 %option with_oracle no
53 51
54 # list of sources 52 # list of sources
55 Source0: http://initd.org/pub/software/pysqlite/releases/%{V_pysqlite_major}/%{V_pysqlite}/pysqlite-%{V_pysqlite}.tar.gz 53 Source0: http://pysqlite.googlecode.com/files/pysqlite-%{V_pysqlite}.tar.gz
56 Source1: http://initd.org/pub/software/psycopg/psycopg2-%{V_psycopg2}.tar.gz 54 Source1: http://www.psycopg.org/psycopg/tarballs/PSYCOPG-%{V_psycopg_maj}/psycopg2-%{V_psycopg2}.tar.gz
57 Source2: http://switch.dl.sourceforge.net/mysql-python/MySQL-python-%{V_mysql_python}.tar.gz 55 Source2: http://switch.dl.sourceforge.net/mysql-python/MySQL-python-%{V_mysql_python}.tar.gz
58 Source3: http://switch.dl.sourceforge.net/cx-oracle/cx_Oracle-%{V_cx_oracle}.tar.gz 56 Source3: http://switch.dl.sourceforge.net/cx-oracle/cx_Oracle-%{V_cx_oracle}.tar.gz
59 Source4: http://pypi.python.org/packages/source/S/SQLObject/SQLObject-%{V_sqlobject}.tar.gz 57 Source4: http://pypi.python.org/packages/source/S/SQLObject/SQLObject-%{V_sqlobject}.tar.gz
60 Patch0: python-db.patch 58 Patch0: python-db.patch
61 59
62 # build information 60 # build information
63 BuildPreReq: OpenPKG, openpkg >= 20100101, python >= %{V_python} 61 Prefix: %{l_prefix}
64 PreReq: OpenPKG, openpkg >= 20100101, python >= %{V_python} 62 BuildRoot: %{l_buildroot}
63 BuildPreReq: OpenPKG, openpkg >= 20060823, python >= %{V_python}
64 PreReq: OpenPKG, openpkg >= 20060823, python >= %{V_python}
65 BuildPreReq: python-setup 65 BuildPreReq: python-setup
66 %if "%{with_sqlite}" == "yes" 66 %if "%{with_sqlite}" == "yes"
67 BuildPreReq: sqlite 67 BuildPreReq: sqlite
68 PreReq: sqlite 68 PreReq: sqlite
69 %endif 69 %endif
77 %endif 77 %endif
78 %if "%{with_oracle}" == "yes" 78 %if "%{with_oracle}" == "yes"
79 BuildPreReq: oracle 79 BuildPreReq: oracle
80 PreReq: oracle 80 PreReq: oracle
81 %endif 81 %endif
82 AutoReq: no
83 AutoReqProv: no
82 84
83 %description 85 %description
84 This packages provides Python DB-API 2.0 compliant bindings to 86 This packages provides Python DB-API 2.0 compliant bindings to
85 various RDBMS. It currently supports SQLite, PostgreSQL, MySQL and 87 various RDBMS. It currently supports SQLite, PostgreSQL, MySQL and
86 Oracle. 88 Oracle.
157 ( cd SQLObject-%{V_sqlobject} 159 ( cd SQLObject-%{V_sqlobject}
158 %{l_prefix}/bin/python setup.py build 160 %{l_prefix}/bin/python setup.py build
159 ) || exit $? 161 ) || exit $?
160 162
161 %install 163 %install
164 rm -rf $RPM_BUILD_ROOT
162 %{l_shtool} mkdir -f -p -m 755 \ 165 %{l_shtool} mkdir -f -p -m 755 \
163 $RPM_BUILD_ROOT%{l_prefix} 166 $RPM_BUILD_ROOT%{l_prefix}
164 %if "%{with_sqlite}" == "yes" 167 %if "%{with_sqlite}" == "yes"
165 ( cd pysqlite-%{V_pysqlite} 168 ( cd pysqlite-%{V_pysqlite}
166 %{l_prefix}/bin/python setup.py install \ 169 %{l_prefix}/bin/python setup.py install \
205 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} 208 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
206 209
207 %files -f files 210 %files -f files
208 211
209 %clean 212 %clean
210 213 rm -rf $RPM_BUILD_ROOT
214

mercurial