]> git.pld-linux.org Git - packages/Zope.git/blame_incremental - Zope.spec
- rel 3; initgroups dropped (looked insane).
[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.3
16# %%define sub_ver b2
17Release: 4
18License: Zope Public License (ZPL)
19Group: Networking/Daemons
20Source0: http://www.zope.org/Products/Zope/%{version}/%{name}-%{version}-final.tgz
21# Source0-md5: 208e235087d707ec0ff07a47cb43c786
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
32Patch0: %{name}-default_config.patch
33Patch1: %{name}-instance_paths.patch
34Patch2: %{name}-pld_makefile_fix.patch
35URL: http://www.zope.org/
36BuildRequires: perl-base
37BuildRequires: python-devel >= 1:2.3.3
38BuildRequires: rpmbuild(macros) >= 1.268
39Requires(post,preun): /sbin/chkconfig
40Requires(postun): /usr/sbin/groupdel
41Requires(postun): /usr/sbin/userdel
42Requires(pre): /bin/id
43Requires(pre): /usr/bin/getgid
44Requires(pre): /usr/sbin/groupadd
45Requires(pre): /usr/sbin/useradd
46Requires: expat >= 1.95.7
47Requires: logrotate
48Requires: python >= 2.3.3
49Requires: python-PyXML >= 0.8.3
50Requires: python-libs >= 2.3.3
51Requires: python-modules >= 2.3.3
52Requires: rc-scripts
53%pyrequires_eq python
54Provides: group(zope)
55Provides: user(zope)
56Obsoletes: Zope-Hotfix = 040713
57Obsoletes: Zope-Hotfix = 040714
58Obsoletes: Zope-Hotfix = 050405
59# extracted from lib/python/App/Hotfixes.py
60Obsoletes: Zope-Hotfix = 2001-09-28
61Obsoletes: Zope-Hotfix = 2002-03-01
62Obsoletes: Zope-Hotfix = 2002-04-15
63Obsoletes: Zope-Hotfix = 2002-06-14
64# See Source9
65Obsoletes: Zope-Hotfix = 20060704
66BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68%define zope_dir /usr/lib/zope
69
70%description
71The Z Object Programming Environment (Zope) is a free, Open Source
72Python-based application server for building high-performance, dynamic
73web sites, using a powerful and simple scripting object model and
74high-performance, integrated object database.
75
76%description -l es.UTF-8
77Zope es una aplicación basada en Python, Open Source[tm], para la
78construcción de sitios dinámicos, usa un modelo de escritura de
79guiones poderoso y sencillo. Para instalar la aplicación Zope, instale
80ese paquete y después, Zope-server, para un servidor HTTP integrado
81simple, Zope-pcgi, para uso con el servidor Apache. Si desea instalar
82solamente algunas partes de la aplicación Zope, están diponibles otros
83subpaquetes, usted debe instalar éstos en vez de ese RPM.
84
85%description -l pl.UTF-8
86Zope (Z Object Programming Environment - Obiektowe Środowisko
87Programistyczne Z) jest opartym o Pythona serwerem aplikacji do
88tworzenia wysoko wydajnych, dynamicznych serwisów WWW, przy użyciu
89użytecznego i prostego modelu obiektowego skryptów oraz wysoko
90wydajnej zintegrowanej obiektowej bazy danych.
91
92%description -l pt_BR.UTF-8
93Zope é uma aplicação baseada em Python, Open Source[tm], para
94construção de sites dinâmicos, usando um modelo de scripting poderoso
95e simples Para instalar o Zope, instale esse pacote e depois, ou o
96Zope-server, para um servidor HTTP integrado simples, ou Zope-pcgi,
97para uso com o Apache. Se você quiser instalar apenas algumas partes
98do Zope, outros sub-pacotes estão disponíveis, e você deveria instalar
99eles ao invés desse RPM.
100
101%prep
102%setup -q -a9 -n %{name}-%{version}-final
103%patch0 -p1
104%patch1 -p1
105%patch2 -p1
106# how to apply the hotfix?
107#mv Hotfix_20060705 lib/python/Products
108
109%build
110./configure \
111 --prefix=%{zope_dir} \
112 --with-python=%{__python} \
113 --optimize
114
115%{__make}
116
117%install
118rm -rf $RPM_BUILD_ROOT
119
120install -d $RPM_BUILD_ROOT{/var/lib/zope/main,/var/run/zope,/var/log/zope/main} \
121 $RPM_BUILD_ROOT{/etc/logrotate.d,/etc/sysconfig,/etc/rc.d/init.d} \
122 $RPM_BUILD_ROOT{%{_sysconfdir}/zope/main,%{_sbindir}} \
123 $RPM_BUILD_ROOT%{zope_dir}/bin
124
125ln -sfn %{_bindir}/python $RPM_BUILD_ROOT%{zope_dir}/bin/python
126
127%{__make} install \
128 INSTALL_FLAGS="--root $RPM_BUILD_ROOT"
129
130mv $RPM_BUILD_ROOT%{zope_dir}/bin/zpasswd.py $RPM_BUILD_ROOT%{_sbindir}/zpasswd
131mv $RPM_BUILD_ROOT%{zope_dir}/skel $RPM_BUILD_ROOT%{_sysconfdir}/zope
132
133rm -rf $RPM_BUILD_ROOT%{zope_dir}/doc
134rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/zope/skel/log
135rm -f $RPM_BUILD_ROOT%{_sysconfdir}/zope/skel/bin/{runzope.bat,zopeservice.py}.in
136
137install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/zope
138install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/zope
139install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/zope
140install %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/mkzopeinstance
141install %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/mkzeoinstance
142install %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/runzope
143install %{SOURCE7} $RPM_BUILD_ROOT%{_sbindir}/zopectl
144install %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}/installzopeproduct
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%attr(775,zope,zope) %dir /var/run/zope
212%attr(775,zope,zope) %dir /var/lib/zope
213%attr(775,zope,zope) %dir /var/lib/zope/main
214%attr(775,zope,zope) %dir /var/log/zope
215%attr(775,zope,zope) %dir /var/log/zope/main
216%attr(640,root,root) %dir %{_sysconfdir}/zope
217%attr(640,root,root) %dir %{_sysconfdir}/zope/skel
218%attr(640,root,root) %dir %{_sysconfdir}/zope/main
219%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zope/skel/*
220%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/zope
221%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/zope
222%ghost /var/log/zope/main/event.log
223%ghost /var/log/zope/main/Z2.log
This page took 0.075348 seconds and 4 git commands to generate.