- release 2 for rebuild with python 2.4
[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:        2
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 BuildRequires:  python
16 %pyrequires_eq  python-modules
17 Requires:       Zope
18 Requires:       perl-modules
19 Requires(post,postun):  /usr/sbin/installzopeproduct
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Support module for Zope-Scheduler.
25
26 %description -l pl
27 Modu³ wspomagaj±cy dla Zope-Scheduler.
28
29 %prep
30 %setup -q -c
31
32 %build
33 CFLAGS="%{rpmcflags}"
34 export CFLAGS
35 cd %{zope_subname}/timerserver
36 rm -rf .#*
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 %py_comp $RPM_BUILD_ROOT%{_datadir}/%{name}
51 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name}
52 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/%{module}
53 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/%{module}
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 /usr/sbin/installzopeproduct %{_datadir}/%{name} %{zope_subname}
60
61 # ln -s %{py_sitedir}/%{module} /usr/lib/zope/lib/python/timerserver
62
63 echo "%import timerserver" >> /etc/zope/main/zope.conf
64 echo "<timer-server>" >> /etc/zope/main/zope.conf
65 echo "</timer-server>" >> /etc/zope/main/zope.conf
66
67 if [ -f /var/lock/subsys/zope ]; then
68         /etc/rc.d/init.d/zope restart >&2
69 fi
70
71 %preun
72 /usr/sbin/Zope-timerserver_remover
73
74 %postun
75 if [ "$1" = "0" ]; then
76         /usr/sbin/installzopeproduct -d %{zope_subname}
77         if [ -f /var/lock/subsys/zope ]; then
78                 /etc/rc.d/init.d/zope restart >&2
79         fi
80 fi
81
82 %files
83 %defattr(644,root,root,755)
84 %attr(755,root,root) %{_sbindir}/Zope-timerserver_remover
85 %doc %{zope_subname}/{CREDITS.txt,INSTALL.txt}
86 %{_datadir}/%{name}
87 %{py_sitedir}/%{module}
This page took 0.156344 seconds and 3 git commands to generate.