python-psycopg-vl.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. %define _python python%(python -c 'import sys;print(sys.version[0:3])')
  2. %define _product ZPsycopgDA
  3. %define _zope_instance %{_libdir}/zope/lib/python/Products
  4. Summary: psycopg is a PostgreSQL database adapter for Python
  5. Summary(ja): psycopg は Python の PostgreSQL 用データベースアダプタです
  6. Name: python-psycopg
  7. Group: Applications/Databases
  8. Version: 1.1.21
  9. Release: 4%{?_dist_release}
  10. License: GNU GPL2
  11. URL: http://initd.org/software/initd/psycopg
  12. Source: http://initd.org/pub/software/psycopg/psycopg-%{version}.tar.gz
  13. Distribution: Vine Linux
  14. Vendor: Project Vine
  15. BuildRoot: %{_tmppath}/psycopg-%{version}-root
  16. BuildRequires: python-devel postgresql-devel python-egenix-mx-base
  17. Requires: python postgresql-libs
  18. %description
  19. psycopg is a PostgreSQL database adapter for the Python programming
  20. language (just like pygresql and popy.) It was written from scratch with
  21. the aim of being very small and fast, and stable as a rock. The main
  22. advantages of psycopg are that it supports the full Python DBAPI-2.0 and
  23. being thread safe at level 2.
  24. %package doc
  25. Summary: Documentation for psycopg python PostgreSQL database adapter
  26. Group: Applications/Databases
  27. %description doc
  28. Documenation and example files for the psycopg python PostgreSQL
  29. database adapter.
  30. %package -n Zope-%{_product}
  31. Summary: ZPsycopgDA is a PostgreSQL database adapter product for Zope
  32. Group: Development/Web Applications
  33. Requires: python-psycopg == %{version}
  34. Requires: Zope-zserver
  35. %description -n Zope-%{_product}
  36. ZPsycopgDA is a PostgreSQL database adapter product for Zope.
  37. %prep
  38. %setup -q -n psycopg-%{version}
  39. %build
  40. %configure \
  41. --with-python=%{_bindir}/%{_python} \
  42. --with-postgres-libraries=%{_libdir} \
  43. --with-postgres-includes=%{_includedir}/pgsql \
  44. --with-mxdatetime-includes=%{_libdir}/%{_python}/site-packages/mx/DateTime/mxDateTime \
  45. --with-zope=%{_libdir}/zope
  46. make
  47. %install
  48. mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_python}/site-packages
  49. install -m 755 psycopgmodule.so $RPM_BUILD_ROOT%{_libdir}/%{_python}/site-packages
  50. mkdir -p $RPM_BUILD_ROOT%{_zope_instance}
  51. find %{_product} -name CVS | xargs rm -fr
  52. cp -pR %{_product} $RPM_BUILD_ROOT%{_zope_instance}
  53. %clean
  54. rm -rf $RPM_BUILD_ROOT
  55. %post
  56. if [ -d /var/lib/zope/Products/%{_product} ]; then
  57. rm -rf /var/lib/zope/Products/%{_product}
  58. fi
  59. %files
  60. %defattr(-,root,root)
  61. %{_libdir}/%{_python}/site-packages/*.so
  62. %files doc
  63. %defattr(-,root,root)
  64. %doc AUTHORS COPYING CREDITS FAQ INSTALL NEWS README RELEASE-1.0 SUCCESS TODO doc
  65. %files -n Zope-%{_product}
  66. %defattr(-,zope,zope)
  67. %{_zope_instance}/%{_product}
  68. %changelog
  69. * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 1.1.21-4
  70. - rebuild with python-2.6
  71. * Wed Jul 08 2009 Shu KONNO <owa@bg.wakwak.com> 1.1.21-3
  72. - rebuilt with postgresql-8.4.0
  73. * Sun Jul 20 2008 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.21-2vl5
  74. - rebuilt with python-2.5.2
  75. * Thu Jul 17 2008 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.21-1vl5
  76. - applied new versioning policy and spec in utf-8
  77. * Fri Oct 13 2006 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.21-0vl1
  78. - update psycopg to 1.1.21
  79. - changed install directory with %{_libdir}/zope/lib/python/Products/
  80. * Sat May 28 2005 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.18-0vl1
  81. - changed spec for vine seed
  82. * Sun May 01 2005 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.18-uvl3
  83. - added option "--with-postgres-libraries" to configure
  84. * Mon Mar 21 2005 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.18-uvl2
  85. - rebuilded with python 2.4
  86. * Thu Mar 10 2005 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.18-uvl1
  87. - updated psycopg to 1.1.18
  88. * Tue Feb 15 2005 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.17-uvl1
  89. - updated psycopg to 1.1.17
  90. * Fri Jul 30 2004 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.15-uvl1
  91. - updated psycopg to 1.1.15
  92. * Mon May 24 2004 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.13-uvl1
  93. - updated psycopg to 1.1.13
  94. * Thu Apr 29 2004 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.11-uvl3
  95. - rebuild
  96. * Sat Apr 24 2004 Shu KONNO <owa@bg.wakwak.com> python-psycopg-1.1.11-uvl1
  97. - renamed
  98. - build with python-2.3.3-0vl1
  99. * Sat Feb 28 2004 Shu KONNO <owa@bg.wakwak.com> python2.3-psycopg-1.1.10-uvl1
  100. - changed package name
  101. * Fri Nov 21 2003 Shu KONNO <owa@bg.wakwak.com> psycopg-1.1.10-py2.1_uvl1
  102. - removed memory leak by adding some DECREFs (by Chris Douty)
  103. * Sun Aug 31 2003 Shu KONNO <owa@bg.wakwak.com> psycopg-1.1.6-py2.1_uvl1
  104. * Wed Jun 25 2003 Shu KONNO <owa@bg.wakwak.com> psycopg-1.1.5.1-py2.1_uvl1
  105. * Wed Mar 5 2003 Shu KONNO <owa@bg.wakwak.com> psycopg-1.0.14-py2.1_0vp1
  106. * Mon Jul 1 2002 Shu KONNO <owa@bg.wakwak.com> psycopg-1.0.9-0vp1
  107. - created new