]> git.pld-linux.org Git - packages/python-psycopg2.git/blob - python-psycopg2.spec
220c12d51cfedb4099b617a08700516e4025ca7e
[packages/python-psycopg2.git] / python-psycopg2.spec
1
2 %include        /usr/lib/rpm/macros.python
3 %define         module psycopg
4
5 Summary:        psycopg is a PostgreSQL database adapter for Python
6 Summary(pl):    psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
7 Name:           python-%{module}
8 Version:        1.1.10
9 Release:        2
10 License:        GPL
11 Group:          Libraries/Python
12 Source0:        http://initd.org/pub/software/%{module}/%{module}-%{version}.tar.gz
13 # Source0-md5:  2279a6aaddf8a8fbec44f782e5cdaa02
14 Patch0:         %{name}-dumb-ac-fix.patch
15 URL:            http://www.initd.org/software/psycopg/
16 BuildRequires:  autoconf
17 BuildRequires:  postgresql-backend-devel
18 BuildRequires:  python-devel
19 BuildRequires:  python-mx-DateTime-devel
20 Requires:       postgresql-libs
21 %pyrequires_eq  python-modules
22 Requires:       python-mx-DateTime
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define zope_subname ZPsycopgDA
26
27 %description
28 psycopg is a PostgreSQL database adapter for the Python programming
29 language (just like pygresql and popy.) It was written from scratch
30 with the aim of being very small and fast, and stable as a rock. The
31 main advantages of psycopg are that it supports the full Python
32 DBAPI-2.0 and being thread safe at level 2.
33
34 %description -l pl
35 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
36 PostgreSQL (tak jak pygresql i popy). Zosta³ zakodowany od pocz±tku
37 z za³o¿eniem ¿e ma byæ bardzo ma³y, szybki i stabilny. G³ówna zalet±
38 psycopg jest, ¿e w jest pe³ni zgodny z standardem DBAPI-2.0 i jest
39 'thread safe' na poziomie 2.
40
41 %package -n Zope-%{zope_subname}
42 Summary:        Zope PostgreSQL database adapter
43 Summary(pl):    Interfejs bazy danych PostgreSQL do Zope
44 Group:          Development/Languages/Python
45 Requires:       Zope
46 Requires:       %{name} = %{version}
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description -n Zope-%{zope_subname}
50 Zope PostgreSQL database adapter.
51
52 %description -n Zope-%{zope_subname} -l pl
53 Interfejs bazy danych PostgreSQL do Zope.
54
55 %prep
56 %setup -q -n %{module}-%{version}
57 %patch0 -p1
58
59 %build
60 %{__autoconf}
61
62 %configure \
63         --with-python=%{_bindir}/python \
64         --with-mxdatetime-includes=%{py_incdir}/mx \
65         --with-postgres-includes=%{_includedir}/postgresql/server
66 %{__make}
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT{%{py_sitedir},%{_datadir}/Zope-%{zope_subname}}
71
72 install psycopgmodule.so $RPM_BUILD_ROOT%{py_sitedir}
73
74 cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
75 %py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
76 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
77 rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %post -n Zope-%{zope_subname}
83 /usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname}
84 if [ -f /var/lock/subsys/zope ]; then
85         /etc/rc.d/init.d/zope restart >&2
86 fi
87
88 %postun -n Zope-%{zope_subname}
89 if [ "$1" = "0" ]; then
90         /usr/sbin/installzopeproduct -d %{zope_subname} 
91         if [ -f /var/lock/subsys/zope ]; then
92                 /etc/rc.d/init.d/zope restart >&2
93         fi
94 fi
95
96 %files
97 %defattr(644,root,root,755)
98 %doc AUTHORS CREDITS FAQ NEWS README RELEASE-1.0 SUCCESS TODO doc
99 %attr(755,root,root) %{py_sitedir}/*.so
100
101 %files -n Zope-%{zope_subname}
102 %defattr(644,root,root,755)
103 %{_datadir}/Zope-%{zope_subname}
This page took 0.027118 seconds and 2 git commands to generate.