]>
Commit | Line | Data |
---|---|---|
5d8b4ea7 JK |
1 | %define zope_subname psycopgda |
2 | Summary: PostgreSQL database adapter for Zope 3 | |
3 | Summary(pl): Adapter bazy danych PostgreSQL dla Zope 3 | |
4 | Name: Zope3-%{zope_subname} | |
5 | Version: 1.0.0 | |
6 | Release: 1 | |
7 | License: ZPL 2.1 | |
8 | Group: Development/Tools | |
e38831d0 | 9 | Source0: http://www.zope.org/Products/Zope3-Packages/psycopgda/%{version}/%{zope_subname}-%{version}.tgz |
5d8b4ea7 | 10 | # Source0-md5: da55609e4612f2c6d431b00dfa57c369 |
ed7c8a66 | 11 | Patch0: %{name}-python_ver.patch |
5d8b4ea7 JK |
12 | URL: http://www.zope.org/Products/Zope3-Packages/psycopgda/view |
13 | BuildRequires: python | |
5d8b4ea7 JK |
14 | Requires(post,postun): /usr/sbin/installzope3package |
15 | Requires(post,postun): rc-scripts | |
e38831d0 JB |
16 | %pyrequires_eq python-modules |
17 | Requires: Zope3 | |
edfa306d | 18 | Requires: python-psycopg |
5d8b4ea7 JK |
19 | BuildArch: noarch |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
e38831d0 JB |
22 | %define zope_libdir /usr/lib/zope3 |
23 | %define zope_pyscriptdir /usr/share/zope3/lib/python | |
5d8b4ea7 JK |
24 | |
25 | %description | |
26 | PostgreSQL database adapter for Zope 3. | |
27 | ||
28 | %description -l pl | |
e38831d0 | 29 | Adapter bazy danych PostgreSQL dla Zope 3. |
5d8b4ea7 JK |
30 | |
31 | %prep | |
32 | %setup -q -n %{zope_subname}-%{version} | |
33 | %patch0 -p1 | |
34 | ||
35 | %build | |
36 | ./configure | |
37 | %{__make} | |
38 | ||
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/zope3 | |
42 | ||
43 | python install.py install \ | |
44 | --root="$RPM_BUILD_ROOT" \ | |
45 | --install-purelib="%{zope_pyscriptdir}" | |
46 | ||
47 | mv $RPM_BUILD_ROOT%{_prefix}/zopeskel $RPM_BUILD_ROOT%{_sysconfdir}/zope3 | |
48 | ||
49 | %py_comp $RPM_BUILD_ROOT%{zope_pyscriptdir} | |
50 | %py_ocomp $RPM_BUILD_ROOT%{zope_pyscriptdir} | |
51 | ||
52 | find $RPM_BUILD_ROOT -type f -name "*.py" | xargs rm | |
53 | ||
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %post | |
58 | /usr/sbin/installzope3package %{zope_subname} | |
59 | if [ -f /var/lock/subsys/zope3 ]; then | |
60 | /etc/rc.d/init.d/zope3 restart >&2 | |
61 | fi | |
62 | ||
63 | %postun | |
64 | if [ "$1" = "0" ]; then | |
65 | /usr/sbin/installzope3package -d %{zope_subname} | |
66 | if [ -f /var/lock/subsys/zope3 ]; then | |
67 | /etc/rc.d/init.d/zope3 restart >&2 | |
68 | fi | |
69 | fi | |
70 | ||
71 | %files | |
72 | %defattr(644,root,root,755) | |
73 | %{zope_pyscriptdir} | |
74 | %{_sysconfdir}/zope3/zopeskel%{_sysconfdir}/package-includes/*.zcml |