summaryrefslogtreecommitdiff
path: root/python-DCOracle.spec
blob: d0865975770debc1dcdac3bc2058f68027056d3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%define pp_subname DCOracle
Summary:       Oracle interface for Python language
Summary(pl):   Interfejs do bazy danych Oracle'a dla języka Python.
Name:          python-%{pp_subname}
Version:       1.2.1
Release:       1
Copyright:     Open Source
Group:         Development/Languages/Python
Group(pl):     Programowanie/Języki/Python
Source:        DCOracle-%{version}-nonbin.tgz 
Patch:         python-DCOracle-libs.patch
BuildRoot:	   /tmp/%{name}-%{version}-root
Requires:      python >= 1.5
#BuildRequires: python-devel >= 1.5, sed

%description
This package contains module that allows connect to Oracle
database in Python programs.

%description -l pl
Pakiet ten zawiera moduł dla języka Python umożliwiający 
połączenie się z bazą danych Oracle'a.
						
%prep
%setup -n DCOracle-%{version}-nonbin
%patch -p1

%build
cd DCOracle
python - <<END
import py_compile

py_compile.compile("__init__.py")
py_compile.compile("dbi.py")
py_compile.compile("ociBind.py")
py_compile.compile("ociCurs.py")
py_compile.compile("ociProc.py")
py_compile.compile("ociUtil.py")
py_compile.compile("ocidb.py")
py_compile.compile("ocitypes.py")

END

cd ../src
cp Setup-8.0.4 Setup
cp Makefile.pre.in-1.5 Makefile.pre.in
make -f Makefile.pre.in boot
make

%install
install -d $RPM_BUILD_ROOT%{_libdir}/python1.5/site-packages/%{pp_subname}
install src/{Buffer,oci_}.so $RPM_BUILD_ROOT%{_libdir}/python1.5/site-packages/%{pp_subname}
install -m 644 %{pp_subname}/* $RPM_BUILD_ROOT%{_libdir}/python1.5/site-packages/%{pp_subname}
echo %{pp_subname} > $RPM_BUILD_ROOT%{_libdir}/python1.5/site-packages/%{pp_subname}.pth
gzip -9nf {DCOracle,LICENSE,README,CHANGES}.txt 


%clean
rm -rf $RPM_BUILD_ROOT

%files
%doc {DCOracle,LICENSE,README,CHANGES}.txt.gz
%{_libdir}/python1.5/site-packages/%{pp_subname}.pth
%{_libdir}/python1.5/site-packages/%{pp_subname}