]> git.pld-linux.org Git - packages/python-psycopg2.git/blobdiff - python-psycopg2.spec
- Release 3. Ac rebuild with changed Pythons ABI.
[packages/python-psycopg2.git] / python-psycopg2.spec
index db60159809d1750f917ca688ea3e8d2d3c12f3f3..a6976d7a45da9da3253c35920db80d4122557b3d 100644 (file)
@@ -5,22 +5,25 @@
 Summary:       psycopg is a PostgreSQL database adapter for Python
 Summary(pl):   psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
 Name:          python-%{module}
-Version:       1.1.5.1
-Release:       1
+Version:       1.1.10
+Release:       3
 License:       GPL
 Group:         Libraries/Python
 Source0:       http://initd.org/pub/software/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5: 01ffd2a77d722c736281631ed9537259
+# Source0-md5: 2279a6aaddf8a8fbec44f782e5cdaa02
 Patch0:                %{name}-dumb-ac-fix.patch
 URL:           http://www.initd.org/software/psycopg/
+BuildRequires: autoconf
 BuildRequires: postgresql-backend-devel
 BuildRequires: python-devel
 BuildRequires: python-mx-DateTime-devel
 Requires:      postgresql-libs
-Requires:      python
+%pyrequires_eq python-modules
 Requires:      python-mx-DateTime
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define zope_subname ZPsycopgDA
+
 %description
 psycopg is a PostgreSQL database adapter for the Python programming
 language (just like pygresql and popy.) It was written from scratch
@@ -35,6 +38,20 @@ z za
 psycopg jest, ¿e w jest pe³ni zgodny z standardem DBAPI-2.0 i jest
 'thread safe' na poziomie 2.
 
+%package -n Zope-%{zope_subname}
+Summary:       Zope PostgreSQL database adapter
+Summary(pl):   Interfejs bazy danych PostgreSQL do Zope
+Group:         Development/Languages/Python
+Requires:      Zope
+Requires:      %{name} = %{version}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description -n Zope-%{zope_subname}
+Zope PostgreSQL database adapter.
+
+%description -n Zope-%{zope_subname} -l pl
+Interfejs bazy danych PostgreSQL do Zope.
+
 %prep
 %setup -q -n %{module}-%{version}
 %patch0 -p1
@@ -50,14 +67,37 @@ psycopg jest, 
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{py_sitedir}
+install -d $RPM_BUILD_ROOT{%{py_sitedir},%{_datadir}/Zope-%{zope_subname}}
 
 install psycopgmodule.so $RPM_BUILD_ROOT%{py_sitedir}
 
+cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
+%py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
+%py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
+rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post -n Zope-%{zope_subname}
+/usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname}
+if [ -f /var/lock/subsys/zope ]; then
+       /etc/rc.d/init.d/zope restart >&2
+fi
+
+%postun -n Zope-%{zope_subname}
+if [ "$1" = "0" ]; then
+       /usr/sbin/installzopeproduct -d %{zope_subname} 
+       if [ -f /var/lock/subsys/zope ]; then
+               /etc/rc.d/init.d/zope restart >&2
+       fi
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS CREDITS FAQ NEWS README RELEASE-1.0 SUCCESS TODO doc
 %attr(755,root,root) %{py_sitedir}/*.so
+
+%files -n Zope-%{zope_subname}
+%defattr(644,root,root,755)
+%{_datadir}/Zope-%{zope_subname}
This page took 0.100011 seconds and 4 git commands to generate.