]> git.pld-linux.org Git - packages/Zope.git/blame_incremental - Zope.spec
- x32 rebuild
[packages/Zope.git] / Zope.spec
... / ...
CommitLineData
1# TODO:
2# - check why initgroups() crashes on AMD64 and something, better than
3# disabling initgroups() completely, with that
4# - no/more secure initial user/password settings (currently: zope/zope)
5# - ZEO support (mkzeoinstance is not tested and probably doesn't work)
6# - perl support?
7# - update to 2.9.x? rename to Zope27?
8# - how to apply the hotfix?
9
10Summary: An application server and portal toolkit for building Web sites
11Summary(es.UTF-8): Un servidor de aplicaciones y un conjunto de herramientas para la construcción de sitios Web
12Summary(pl.UTF-8): Serwer aplikacji i toolkit portalowy do tworzenia serwisów WWW
13Summary(pt_BR.UTF-8): Um servidor de aplicações e um conjunto de ferramentas para construção de sites Web
14Name: Zope
15Version: 2.11.8
16# %%define sub_ver b2
17Release: 5
18License: Zope Public License (ZPL)
19Group: Networking/Daemons
20Source0: http://www.zope.org/Products/Zope/%{version}/%{name}-%{version}-final.tgz
21# Source0-md5: 702a7967b239c70aa0a9d7e198c1f14f
22Source1: %{name}.init
23Source2: %{name}.sysconfig
24Source3: %{name}.logrotate
25Source4: %{name}-mkzopeinstance
26Source5: %{name}-mkzeoinstance
27Source6: %{name}-runzope
28Source7: %{name}-zopectl
29Source8: %{name}-installzopeproduct
30Source9: http://www.zope.org/Products/Zope/Hotfix-2006-07-05/Hotfix-20060705/Hotfix_20060705.tar.gz
31# Source9-md5: 6dec58130117fd860adc7fd58f8062e7
32Source10: %{name}.tmpfiles
33Patch0: %{name}-default_config.patch
34Patch1: %{name}-instance_paths.patch
35Patch2: %{name}-pld_makefile_fix.patch
36URL: http://www.zope.org/
37BuildRequires: python-devel >= 1:2.3.3
38BuildRequires: python-modules
39BuildRequires: rpm-pythonprov
40BuildRequires: rpmbuild(macros) >= 1.268
41Requires(post,preun): /sbin/chkconfig
42Requires(postun): /usr/sbin/groupdel
43Requires(postun): /usr/sbin/userdel
44Requires(pre): /bin/id
45Requires(pre): /usr/bin/getgid
46Requires(pre): /usr/sbin/groupadd
47Requires(pre): /usr/sbin/useradd
48Requires: expat >= 1.95.7
49Requires: logrotate
50Requires: python >= 2.3.3
51Requires: python-PyXML >= 0.8.3
52Requires: python-libs >= 2.3.3
53Requires: python-modules >= 2.3.3
54Requires: rc-scripts
55%pyrequires_eq python
56Provides: group(zope)
57Provides: user(zope)
58Conflicts: logrotate < 3.8.0
59Obsoletes: Zope-Hotfix = 040713
60Obsoletes: Zope-Hotfix = 040714
61Obsoletes: Zope-Hotfix = 050405
62# See Source9
63Obsoletes: Zope-Hotfix = 20060704
64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66%define zope_dir /usr/lib/zope
67
68%description
69The Z Object Programming Environment (Zope) is a free, Open Source
70Python-based application server for building high-performance, dynamic
71web sites, using a powerful and simple scripting object model and
72high-performance, integrated object database.
73
74%description -l es.UTF-8
75Zope es una aplicación basada en Python, Open Source[tm], para la
76construcción de sitios dinámicos, usa un modelo de escritura de
77guiones poderoso y sencillo. Para instalar la aplicación Zope, instale
78ese paquete y después, Zope-server, para un servidor HTTP integrado
79simple, Zope-pcgi, para uso con el servidor Apache. Si desea instalar
80solamente algunas partes de la aplicación Zope, están diponibles otros
81subpaquetes, usted debe instalar éstos en vez de ese RPM.
82
83%description -l pl.UTF-8
84Zope (Z Object Programming Environment - Obiektowe Środowisko
85Programistyczne Z) jest opartym o Pythona serwerem aplikacji do
86tworzenia wysoko wydajnych, dynamicznych serwisów WWW, przy użyciu
87użytecznego i prostego modelu obiektowego skryptów oraz wysoko
88wydajnej zintegrowanej obiektowej bazy danych.
89
90%description -l pt_BR.UTF-8
91Zope é uma aplicação baseada em Python, Open Source[tm], para
92construção de sites dinâmicos, usando um modelo de scripting poderoso
93e simples Para instalar o Zope, instale esse pacote e depois, ou o
94Zope-server, para um servidor HTTP integrado simples, ou Zope-pcgi,
95para uso com o Apache. Se você quiser instalar apenas algumas partes
96do Zope, outros sub-pacotes estão disponíveis, e você deveria instalar
97eles ao invés desse RPM.
98
99%prep
100%setup -q -a9 -n %{name}-%{version}-final
101%patch0 -p1
102%patch1 -p1
103%patch2 -p1
104# how to apply the hotfix?
105#mv Hotfix_20060705 lib/python/Products
106
107%build
108./configure \
109 --prefix=%{zope_dir} \
110 --with-python=%{__python} \
111 --optimize
112
113%{__make}
114
115%install
116rm -rf $RPM_BUILD_ROOT
117
118install -d $RPM_BUILD_ROOT{/var/lib/zope/main,/var/run/zope,/var/log/zope/main} \
119 $RPM_BUILD_ROOT{/etc/logrotate.d,/etc/sysconfig,/etc/rc.d/init.d} \
120 $RPM_BUILD_ROOT{%{_sysconfdir}/zope/main,%{_sbindir}} \
121 $RPM_BUILD_ROOT%{zope_dir}/bin \
122 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
123
124ln -sfn %{__python} $RPM_BUILD_ROOT%{zope_dir}/bin/python
125
126%{__make} install \
127 INSTALL_FLAGS="--root $RPM_BUILD_ROOT"
128
129mv $RPM_BUILD_ROOT%{zope_dir}/bin/zpasswd.py $RPM_BUILD_ROOT%{_sbindir}/zpasswd
130mv $RPM_BUILD_ROOT%{zope_dir}/skel $RPM_BUILD_ROOT%{_sysconfdir}/zope
131
132rm -rf $RPM_BUILD_ROOT%{zope_dir}/doc
133rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/zope/skel/log
134rm -f $RPM_BUILD_ROOT%{_sysconfdir}/zope/skel/bin/{runzope.bat,zopeservice.py}.in
135
136install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/zope
137install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/zope
138install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/zope
139install %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/mkzopeinstance
140install %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/mkzeoinstance
141install %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/runzope
142install %{SOURCE7} $RPM_BUILD_ROOT%{_sbindir}/zopectl
143install %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}/installzopeproduct
144install %{SOURCE10} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
145
146touch $RPM_BUILD_ROOT/var/log/zope/main/event.log
147touch $RPM_BUILD_ROOT/var/log/zope/main/Z2.log
148
149%clean
150rm -rf $RPM_BUILD_ROOT
151
152%pre
153%groupadd -g 112 zope
154%useradd -u 112 -d /var/lib/zope/main -s /bin/false -c "Zope User" -g zope zope
155
156%post
157/sbin/chkconfig --add zope
158# TODO: move this migration to trigger
159if [ ! -f %{_sysconfdir}/zope/main/zope.conf ] ; then
160 echo "Creating initial 'main' instance..."
161 %{_sbindir}/mkzopeinstance main zope:zope
162 echo "Instance created. Listening on 127.0.0.1:8080, initial user: 'zope' with password: 'zope'"
163else
164 echo "Old %{_sysconfdir}/zope/zope.conf detected - look at changes about upgrade!" >&2
165fi
166was_stopped=0
167for dir in /var/lib/zope/main /var/lib/zope ; do
168 if [ -f $dir/Data.fs ]; then
169 echo "Found the database in old location. Migrating..."
170 if [ -f /var/lock/subsys/zope ]; then
171 /sbin/service zope stop >&2
172 was_stopped=1
173 fi
174 umask 022
175 [ -d /var/lib/zope/main ] && cd $dir && mv -f Data* /var/lib/zope/main/var 2>/dev/null
176 if [ "x$was_stopped" = "x1" ]; then
177 /sbin/service zope start >&2
178 fi
179 echo "Migration completed (new db location is /var/lib/zope/main/var)"
180 break
181 fi
182done
183if [ -f /var/lock/subsys/zope ]; then
184 if [ "x$was_stopped" != "x1" ]; then
185 /sbin/service zope restart >&2
186 fi
187else
188 echo "look at %{_sysconfdir}/zope/main/zope.conf" >&2
189 echo "Run then \"/sbin/service zope start\" to start Zope." >&2
190 echo "You may create new Zope instances with mkzopeinstance" >&2
191fi
192
193%preun
194if [ "$1" = "0" ]; then
195 %service zope stop
196 /sbin/chkconfig --del zope
197fi
198
199%postun
200if [ "$1" = "0" ] ; then
201 %userremove zope
202 %groupremove zope
203fi
204
205%files
206%defattr(644,root,root,755)
207%doc doc/*
208%attr(754,root,root) /etc/rc.d/init.d/zope
209%attr(755,root,root) %{_sbindir}/*
210%{zope_dir}
211/usr/lib/tmpfiles.d/%{name}.conf
212%attr(775,zope,zope) %dir /var/run/zope
213%attr(775,zope,zope) %dir /var/lib/zope
214%attr(775,zope,zope) %dir /var/lib/zope/main
215%attr(775,zope,zope) %dir /var/log/zope
216%attr(775,zope,zope) %dir /var/log/zope/main
217%attr(640,root,root) %dir %{_sysconfdir}/zope
218%attr(640,root,root) %dir %{_sysconfdir}/zope/skel
219%attr(640,root,root) %dir %{_sysconfdir}/zope/main
220%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zope/skel/*
221%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/zope
222%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/zope
223%ghost /var/log/zope/main/event.log
224%ghost /var/log/zope/main/Z2.log
This page took 0.045559 seconds and 5 git commands to generate.