- converted to UTF-8
[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.UTF-8):   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 BuildRequires:  rpmbuild(macros) >= 1.268
17 %pyrequires_eq  python-modules
18 Requires(post,postun):  /usr/sbin/installzopeproduct
19 Requires:       Zope
20 Requires:       perl-modules
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Support module for Zope-Scheduler.
25
26 %description -l pl.UTF-8
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} %{_prefix}/lib/zope/lib/python/timerserver
62 if [ "$1" = 1 ]; then
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 fi
67
68 %service -q zope restart
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         %service -q zope restart
77 fi
78
79 %files
80 %defattr(644,root,root,755)
81 %attr(755,root,root) %{_sbindir}/Zope-timerserver_remover
82 %doc %{zope_subname}/{CREDITS.txt,INSTALL.txt}
83 %{_datadir}/%{name}
84 %{py_sitedir}/%{module}
This page took 0.11449 seconds and 3 git commands to generate.