1 | %define _zope2_pythonlibs %{_var}/lib/Zope2/lib/python |
---|
2 | %define _zope2_installdir %{_var}/lib/Zope2/Products |
---|
3 | %define _product ZPsycopgDA |
---|
4 | Summary: psycopg2 is a PostgreSQL database adapter for Python |
---|
5 | Summary(ja): psycopg2 は Python の PostgreSQL 用データベースアダプタです |
---|
6 | Name: python-psycopg2 |
---|
7 | Group: Applications/Databases |
---|
8 | Version: 2.4 |
---|
9 | Release: 2%{?_dist_release} |
---|
10 | License: LGPL or ZPL |
---|
11 | Source: http://initd.org/pub/software/psycopg/psycopg2-%{version}.tar.gz |
---|
12 | Patch0: psycopg2-2.2.2-DA.patch |
---|
13 | BuildRequires: python-devel |
---|
14 | BuildRequires: postgresql-devel |
---|
15 | BuildRequires: python-egenix-mx-base |
---|
16 | Requires: python |
---|
17 | Requires: postgresql-libs |
---|
18 | BuildRoot: %{_tmppath}/psycopg-%{version}-root |
---|
19 | Distribution: Vine Linux |
---|
20 | Vendor: Project Vine |
---|
21 | Packager: owa |
---|
22 | |
---|
23 | %description |
---|
24 | psycopg is a PostgreSQL database adapter for the Python programming |
---|
25 | language. This is version 2, a complete rewrite of the original code to |
---|
26 | provide new-style classes for connection and cursor objects and other |
---|
27 | sweet candies. Like the original, psycopg 2 was written with the aim of |
---|
28 | being very small and fast, and stable as a rock. |
---|
29 | |
---|
30 | %package doc |
---|
31 | Summary: Documentation for psycopg python PostgreSQL database adapter |
---|
32 | Group: Applications/Databases |
---|
33 | %description doc |
---|
34 | Documenation and example files for the psycopg python PostgreSQL |
---|
35 | database adapter. |
---|
36 | |
---|
37 | %package %{_product} |
---|
38 | Summary: ZPsycopgDA is a PostgreSQL database adapter product for Zope |
---|
39 | Group: Development/Web Applications |
---|
40 | Requires: %{name} == %{version} |
---|
41 | Requires: Zope2-zserver >= 2.12 |
---|
42 | Provides: %{_product} |
---|
43 | |
---|
44 | %description %{_product} |
---|
45 | ZPsycopgDA is a PostgreSQL database adapter product for Zope. |
---|
46 | |
---|
47 | |
---|
48 | %prep |
---|
49 | %setup -q -n psycopg2-%{version} |
---|
50 | %patch0 -p1 -b .DA |
---|
51 | |
---|
52 | |
---|
53 | %build |
---|
54 | python setup.py build |
---|
55 | |
---|
56 | |
---|
57 | %install |
---|
58 | rm -rf $RPM_BUILD_ROOT |
---|
59 | python setup.py install \ |
---|
60 | --root $RPM_BUILD_ROOT \ |
---|
61 | --install-lib %{python_sitearch} \ |
---|
62 | ; |
---|
63 | mkdir -p $RPM_BUILD_ROOT%{_zope2_pythonlibs} |
---|
64 | ln -sf %{python_sitearch}/psycopg2 $RPM_BUILD_ROOT%{_zope2_pythonlibs} |
---|
65 | ln -sf %{python_sitearch}/psycopg2-%{version}-py%{pyver}.egg-info $RPM_BUILD_ROOT%{_zope2_pythonlibs} |
---|
66 | |
---|
67 | find %{_product} -name CVS | xargs rm -fr |
---|
68 | mkdir -p $RPM_BUILD_ROOT%{_zope2_installdir} |
---|
69 | cp -pR %{_product} $RPM_BUILD_ROOT%{_zope2_installdir} |
---|
70 | |
---|
71 | |
---|
72 | %clean |
---|
73 | rm -rf $RPM_BUILD_ROOT |
---|
74 | |
---|
75 | |
---|
76 | %preun %{_product} |
---|
77 | if [ $1 = 0 ]; then |
---|
78 | rm -rf %{_zope2_installdir}/%{_product}/*.pyc |
---|
79 | fi |
---|
80 | |
---|
81 | |
---|
82 | %files |
---|
83 | %defattr(-,root,root) |
---|
84 | %{python_sitearch}/psycopg2 |
---|
85 | %{python_sitearch}/psycopg2-%{version}-py*.egg-info |
---|
86 | |
---|
87 | %files doc |
---|
88 | %defattr(-,root,root) |
---|
89 | %doc AUTHORS INSTALL README doc |
---|
90 | |
---|
91 | %files %{_product} |
---|
92 | %defattr(-,Zope2,Zope2) |
---|
93 | %{_zope2_pythonlibs}/psycopg2 |
---|
94 | %{_zope2_pythonlibs}/psycopg2-%{version}-py*.egg-info |
---|
95 | %{_zope2_installdir}/%{_product} |
---|
96 | |
---|
97 | |
---|
98 | %changelog |
---|
99 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4-2 |
---|
100 | - rebuild with python-2.7.2 |
---|
101 | |
---|
102 | * Tue Apr 12 2011 Shu KONNO <owa@bg.wakwak.com> 2.4-1 |
---|
103 | - updated psycopg2 to 2.4 |
---|
104 | |
---|
105 | * Wed Dec 15 2010 Shu KONNO <owa@bg.wakwak.com> 2.2.2-1 |
---|
106 | - updated psycopg2 to 2.2.2 |
---|
107 | - added psycopg2-2.2.2-DA.patch |
---|
108 | |
---|
109 | * Wed Feb 17 2010 Shu KONNO <owa@bg.wakwak.com> 2.0.13-1 |
---|
110 | - updated psycopg2 to 2.0.13 |
---|
111 | |
---|
112 | * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 2.0.11-2 |
---|
113 | - rebuild with python-2.6 |
---|
114 | |
---|
115 | * Wed Jul 08 2009 Shu KONNO <owa@bg.wakwak.com> 2.0.11-1 |
---|
116 | - updated psycopg2 to 2.0.11 |
---|
117 | - built with postgresql-8.4.0 |
---|
118 | |
---|
119 | * Mon May 04 2009 Shu KONNO <owa@bg.wakwak.com> python-psycopg2-2.0.10-1vl5 |
---|
120 | - updated psycopg2 to 2.0.10 |
---|
121 | |
---|
122 | * Wed Dec 31 2008 Shu KONNO <owa@bg.wakwak.com> python-psycopg2-2.0.8-1vl5 |
---|
123 | - updated psycopg2 to 2.0.8 |
---|
124 | |
---|
125 | * Thu Jul 17 2008 Shu KONNO <owa@bg.wakwak.com> python-psycopg2-2.0.7-1vl5 |
---|
126 | - packaged new |
---|
127 | |
---|