- spaces->tabs
[packages/Zope-TimerService.git] / Zope-TimerService.spec
1 # WARNING: Need test! 
2 #
3 %define         zope_subname    TimerService
4 %define         module timerserver
5 Summary:        Support module for Zope-Scheduler
6 Summary(pl):    Modu³ wspomagaj±cy dla Zope-Scheduler
7 Name:           Zope-%{zope_subname}
8 Version:        0.2
9 Release:        0.2
10 License:        GPL
11 Group:          Libraries/Python
12 Source0:        http://dev.legco.biz/downloads/%{zope_subname}-%{version}.tar.gz
13 # Source0-md5:  5fb0fce2b90f69478a9370b313a45aa9
14 Source1:        Zope-timerserver_remover
15 URL:            http://dev.legco.biz/products/timerservice/
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 #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.052652 seconds and 3 git commands to generate.