]> git.pld-linux.org Git - packages/Zope.git/blame_incremental - Zope.spec
- BR: python-modules, rpm-pythonprov
[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: python-devel >= 1:2.3.3
37BuildRequires: python-modules
38BuildRequires: rpm-pythonprov
39BuildRequires: rpmbuild(macros) >= 1.268
40Requires(post,preun): /sbin/chkconfig
41Requires(postun): /usr/sbin/groupdel
42Requires(postun): /usr/sbin/userdel
43Requires(pre): /bin/id
44Requires(pre): /usr/bin/getgid
45Requires(pre): /usr/sbin/groupadd
46Requires(pre): /usr/sbin/useradd
47Requires: expat >= 1.95.7
48Requires: logrotate
49Requires: python >= 2.3.3
50Requires: python-PyXML >= 0.8.3
51Requires: python-libs >= 2.3.3
52Requires: python-modules >= 2.3.3
53Requires: rc-scripts
54%pyrequires_eq python
55Provides: group(zope)
56Provides: user(zope)
57Obsoletes: Zope-Hotfix = 040713
58Obsoletes: Zope-Hotfix = 040714
59Obsoletes: Zope-Hotfix = 050405
60# extracted from lib/python/App/Hotfixes.py
61Obsoletes: Zope-Hotfix = 2001-09-28
62Obsoletes: Zope-Hotfix = 2002-03-01
63Obsoletes: Zope-Hotfix = 2002-04-15
64Obsoletes: Zope-Hotfix = 2002-06-14
65# See Source9
66Obsoletes: Zope-Hotfix = 20060704
67BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69%define zope_dir /usr/lib/zope
70
71%description
72The Z Object Programming Environment (Zope) is a free, Open Source
73Python-based application server for building high-performance, dynamic
74web sites, using a powerful and simple scripting object model and
75high-performance, integrated object database.
76
77%description -l es.UTF-8
78Zope es una aplicación basada en Python, Open Source[tm], para la
79construcción de sitios dinámicos, usa un modelo de escritura de
80guiones poderoso y sencillo. Para instalar la aplicación Zope, instale
81ese paquete y después, Zope-server, para un servidor HTTP integrado
82simple, Zope-pcgi, para uso con el servidor Apache. Si desea instalar
83solamente algunas partes de la aplicación Zope, están diponibles otros
84subpaquetes, usted debe instalar éstos en vez de ese RPM.
85
86%description -l pl.UTF-8
87Zope (Z Object Programming Environment - Obiektowe Środowisko
88Programistyczne Z) jest opartym o Pythona serwerem aplikacji do
89tworzenia wysoko wydajnych, dynamicznych serwisów WWW, przy użyciu
90użytecznego i prostego modelu obiektowego skryptów oraz wysoko
91wydajnej zintegrowanej obiektowej bazy danych.
92
93%description -l pt_BR.UTF-8
94Zope é uma aplicação baseada em Python, Open Source[tm], para
95construção de sites dinâmicos, usando um modelo de scripting poderoso
96e simples Para instalar o Zope, instale esse pacote e depois, ou o
97Zope-server, para um servidor HTTP integrado simples, ou Zope-pcgi,
98para uso com o Apache. Se você quiser instalar apenas algumas partes
99do Zope, outros sub-pacotes estão disponíveis, e você deveria instalar
100eles ao invés desse RPM.
101
102%prep
103%setup -q -a9 -n %{name}-%{version}-final
104%patch0 -p1
105%patch1 -p1
106%patch2 -p1
107# how to apply the hotfix?
108#mv Hotfix_20060705 lib/python/Products
109
110%build
111./configure \
112 --prefix=%{zope_dir} \
113 --with-python=%{__python} \
114 --optimize
115
116%{__make}
117
118%install
119rm -rf $RPM_BUILD_ROOT
120
121install -d $RPM_BUILD_ROOT{/var/lib/zope/main,/var/run/zope,/var/log/zope/main} \
122 $RPM_BUILD_ROOT{/etc/logrotate.d,/etc/sysconfig,/etc/rc.d/init.d} \
123 $RPM_BUILD_ROOT{%{_sysconfdir}/zope/main,%{_sbindir}} \
124 $RPM_BUILD_ROOT%{zope_dir}/bin
125
126ln -sfn %{__python} $RPM_BUILD_ROOT%{zope_dir}/bin/python
127
128%{__make} install \
129 INSTALL_FLAGS="--root $RPM_BUILD_ROOT"
130
131mv $RPM_BUILD_ROOT%{zope_dir}/bin/zpasswd.py $RPM_BUILD_ROOT%{_sbindir}/zpasswd
132mv $RPM_BUILD_ROOT%{zope_dir}/skel $RPM_BUILD_ROOT%{_sysconfdir}/zope
133
134rm -rf $RPM_BUILD_ROOT%{zope_dir}/doc
135rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/zope/skel/log
136rm -f $RPM_BUILD_ROOT%{_sysconfdir}/zope/skel/bin/{runzope.bat,zopeservice.py}.in
137
138install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/zope
139install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/zope
140install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/zope
141install %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/mkzopeinstance
142install %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/mkzeoinstance
143install %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/runzope
144install %{SOURCE7} $RPM_BUILD_ROOT%{_sbindir}/zopectl
145install %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}/installzopeproduct
146
147touch $RPM_BUILD_ROOT/var/log/zope/main/event.log
148touch $RPM_BUILD_ROOT/var/log/zope/main/Z2.log
149
150%clean
151rm -rf $RPM_BUILD_ROOT
152
153%pre
154%groupadd -g 112 zope
155%useradd -u 112 -d /var/lib/zope/main -s /bin/false -c "Zope User" -g zope zope
156
157%post
158/sbin/chkconfig --add zope
159# TODO: move this migration to trigger
160if [ ! -f %{_sysconfdir}/zope/main/zope.conf ] ; then
161 echo "Creating initial 'main' instance..."
162 %{_sbindir}/mkzopeinstance main zope:zope
163 echo "Instance created. Listening on 127.0.0.1:8080, initial user: 'zope' with password: 'zope'"
164else
165 echo "Old %{_sysconfdir}/zope/zope.conf detected - look at changes about upgrade!" >&2
166fi
167was_stopped=0
168for dir in /var/lib/zope/main /var/lib/zope ; do
169 if [ -f $dir/Data.fs ]; then
170 echo "Found the database in old location. Migrating..."
171 if [ -f /var/lock/subsys/zope ]; then
172 /sbin/service zope stop >&2
173 was_stopped=1
174 fi
175 umask 022
176 [ -d /var/lib/zope/main ] && cd $dir && mv -f Data* /var/lib/zope/main/var 2>/dev/null
177 if [ "x$was_stopped" = "x1" ]; then
178 /sbin/service zope start >&2
179 fi
180 echo "Migration completed (new db location is /var/lib/zope/main/var)"
181 break
182 fi
183done
184if [ -f /var/lock/subsys/zope ]; then
185 if [ "x$was_stopped" != "x1" ]; then
186 /sbin/service zope restart >&2
187 fi
188else
189 echo "look at %{_sysconfdir}/zope/main/zope.conf" >&2
190 echo "Run then \"/sbin/service zope start\" to start Zope." >&2
191 echo "You may create new Zope instances with mkzopeinstance" >&2
192fi
193
194%preun
195if [ "$1" = "0" ]; then
196 %service zope stop
197 /sbin/chkconfig --del zope
198fi
199
200%postun
201if [ "$1" = "0" ] ; then
202 %userremove zope
203 %groupremove zope
204fi
205
206%files
207%defattr(644,root,root,755)
208%doc doc/*
209%attr(754,root,root) /etc/rc.d/init.d/zope
210%attr(755,root,root) %{_sbindir}/*
211%{zope_dir}
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.025713 seconds and 4 git commands to generate.