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