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