dcfcd63a110f62470082cb3bf8e1e6f3de3e8eaa
[packages/Zope-TimerService.git] / Zope-TimerService.spec
1 # WARNING: not working propertly - Zope 2.7 not started 
2 #
3 %include        /usr/lib/rpm/macros.python
4 %define         zope_subname    TimerService
5 %define         module timerserver
6 Summary:        Support module for Zope-Scheduler
7 Summary(pl):    Modu³ wspomagaj±cy dla Zope-Scheduler
8 Name:           Zope-%{zope_subname}
9 Version:        0.2
10 Release:        0.1
11 License:        GPL
12 Group:          Libraries/Python
13 Source0:        http://dev.legco.biz/downloads/%{zope_subname}-%{version}.tar.gz
14 # Source0-md5:  5fb0fce2b90f69478a9370b313a45aa9
15 Source1:        Zope-timerserver_remover
16 URL:            http://dev.legco.biz/products/timerservice/
17 %pyrequires_eq  python-modules
18 Requires:       Zope
19 Requires:       perl-modules
20 Requires(post,postun):  /usr/sbin/installzopeproduct
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Support module for Zope-Scheduler.
26
27 %description -l pl
28 Modu³ wspomagaj±cy dla Zope-Scheduler.
29
30 %prep
31 %setup -q -c
32
33 %build
34 CFLAGS="%{rpmcflags}"
35 export CFLAGS
36 cd %{zope_subname}/timerserver
37 python setup.py build_ext
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41
42 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
43 install -d $RPM_BUILD_ROOT%{py_sitedir}
44 install -d $RPM_BUILD_ROOT%{_sbindir}
45 install %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/Zope-timerserver_remover
46
47 cp -af %{zope_subname}/timerserver $RPM_BUILD_ROOT%{py_sitedir}/%{module}
48 cp -af %{zope_subname}/{zpt,*.py,version.txt} $RPM_BUILD_ROOT%{_datadir}/%{name}
49
50 #cd $RPM_BUILD_ROOT%{_datadir}/%{name}/%{module}
51 #
52 #python setup.py install \
53 #        --root=$RPM_BUILD_ROOT \
54 #        --optimize=2
55 #rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/timerserver
56
57 %py_comp $RPM_BUILD_ROOT%{_datadir}/%{name}
58 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name}
59 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/%{module}
60 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/%{module}
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 /usr/sbin/installzopeproduct %{_datadir}/%{name} %{zope_subname}
67
68 ln -s %{py_sitedir}/%{module} /usr/lib/zope/lib/python/timerserver
69
70 echo "%import timerserver" >> /etc/zope/main/zope.conf
71 echo "<timer-server>" >> /etc/zope/main/zope.conf
72 echo "</timer-server>" >> /etc/zope/main/zope.conf
73
74 if [ -f /var/lock/subsys/zope ]; then
75         /etc/rc.d/init.d/zope restart >&2
76 fi
77
78 %preun
79 /usr/sbin/Zope-timerserver_remover
80
81 %postun
82 if [ "$1" = "0" ]; then
83         /usr/sbin/installzopeproduct -d %{zope_subname}
84         if [ -f /var/lock/subsys/zope ]; then
85             /etc/rc.d/init.d/zope restart >&2
86         fi
87 fi
88
89 %files
90 %defattr(644,root,root,755)
91 %attr(755,root,root) %{_sbindir}/Zope-timerserver_remover
92 %doc %{zope_subname}/{CREDITS.txt,INSTALL.txt}
93 %{_datadir}/%{name}
94 %{py_sitedir}/%{module}
This page took 0.031003 seconds and 2 git commands to generate.