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