source: trunk/module/PyGreSQL.spec @ 404

Last change on this file since 404 was 404, checked in by cito, 9 years ago

Added SVN keyword "Id".

  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1# $Id: PyGreSQL.spec 404 2010-03-16 21:48:42Z cito $
2%define version 3.0
3%define release pre20000310
4%define name PyGreSQL
5%define pythonversion 1.5
6Source: %{name}-%{version}-%{release}.tgz
7Summary: A Python interface for PostgreSQL database.
8Name: %{name}
9Version: %{version}
10Release: %{release}
11#Patch:
12Group: Applications/Databases
13BuildRoot: /tmp/rpmbuild_%{name}
14Copyright: GPL-like
15Requires: python >= %{pythonversion}, postgresql
16Packager: Hartmut Goebel <hartmut@goebel.noris.de>
17Vendor: D'Arcy J.M. Cain <darcy@druid.net>
18URL: http://www.druid.net/pygresql/
19
20%changelog
21#* Tue Oct 06 1998 Fabio Coatti <cova@felix.unife.it>
22#- fixed installation directory files list
23
24%description
25PyGreSQL is a python module that interfaces to a PostgreSQL database. It
26embeds the PostgreSQL query library to allow easy use of the powerful
27PostgreSQL features from a Python script.
28
29Version 3.0 includes DB-API 2.0 support.
30
31%prep
32rm -rf $RPM_BUILD_ROOT
33
34%setup -n %{name}-%{version}-%{release}
35#%patch
36
37%build
38mkdir -p $RPM_BUILD_ROOT/usr/lib/python%{pythonversion}/lib-dynload
39cc -fpic -shared -o $RPM_BUILD_ROOT/usr/lib/python%{pythonversion}/lib-dynload/_pg.so -I/usr/include/pgsql/ -I/usr/include/python1.5 pgmodule.c -lpq
40## import fails, since _pg is not yet installed
41python -c 'import pg' || true
42python -c 'import pgdb' || true
43
44%install
45cp *.py *.pyc $RPM_BUILD_ROOT/usr/lib/python%{pythonversion}/
46
47cd $RPM_BUILD_ROOT
48find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' > $RPM_BUILD_DIR/file.list.%{name}
49find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}
50
51%files -f ../file.list.%{name}
52%doc %attr(-,root,root) Announce ChangeLog README tutorial
53
54
55%clean
56rm -rf $RPM_BUILD_ROOT
57cd $RPM_BUILD_DIR
58rm -rf %{name}-%{version}-%{release} file.list.%{name}
Note: See TracBrowser for help on using the repository browser.