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