]> git.pld-linux.org Git - packages/Zope3.git/blob - Zope3.spec
- R: rc-scripts added
[packages/Zope3.git] / Zope3.spec
1 Summary:        An application server and portal toolkit for building Web sites
2 Summary(es):    Un servidor de aplicaciones y un conjunto de herramientas para la construcción de sitios Web
3 Summary(pl):    Serwer aplikacji i toolkit portalowy do tworzenia serwisów WWW
4 Summary(pt_BR): Um servidor de aplicações e um conjunto de ferramentas para construção de sites Web
5 Name:           Zope3
6 Version:        3.1.0
7 %define         sub_ver c1
8 Release:        0.%{sub_ver}.0.2
9 License:        Zope Public License (ZPL)
10 Group:          Networking/Daemons
11 Source0:        http://www.zope.org/Products/Zope3/%{version}%{sub_ver}/%{name}-%{version}%{sub_ver}.tgz
12 # Source0-md5:  e22eeeae5de89c0eea9edabe3f2c3c4d
13 Source1:        %{name}.init
14 Source2:        %{name}.sysconfig
15 Source3:        %{name}.logrotate
16 Source4:        mkzope3instance
17 Source5:        installzope3package
18 Patch0:         %{name}-skeleton_path.patch
19 URL:            http://dev.zope.org/Zope3
20 BuildRequires:  python-devel >= 1:2.4.1
21 BuildRequires:  perl-base
22 BuildRequires:  rpmbuild(macros) >= 1.213
23 Requires:       rc-scripts
24 Requires(post,preun):   rc-scripts
25 Requires(pre):  /bin/id
26 Requires(pre):  /usr/bin/getgid
27 Requires(pre):  /usr/sbin/groupadd
28 Requires(pre):  /usr/sbin/useradd
29 Requires(postun):       /usr/sbin/groupdel
30 Requires(postun):       /usr/sbin/userdel
31 Requires(post,preun):   /sbin/chkconfig
32 Requires:       expat >= 1.95.7
33 Requires:       logrotate
34 Requires:       python >= 2.4.1
35 Requires:       python-modules >= 2.4.1
36 Requires:       python-libs >= 2.4.1
37 Requires:       python-zope = %{epoch}:%{version}-%{release}
38 %pyrequires_eq  python
39 Provides:       group(zope)
40 Provides:       user(zope)
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         zope_libdir /usr/lib/zope3
44 %define         zope_datadir /usr/share/zope3
45
46 %description
47 The Z Object Programming Environment (Zope) is a free, Open Source
48 Python-based application server for building high-performance, dynamic
49 web sites, using a powerful and simple scripting object model and
50 high-performance, integrated object database.
51
52 This project is a redesign of Zope 2 and seeks to improve the Zope
53 development experience through the use of Interfaces and Components.
54
55 %description -l es
56 Zope es una aplicación basada en Python, Open Source[tm], para la
57 construcción de sitios dinámicos, usa un modelo de escritura de
58 guiones poderoso y sencillo. Para instalar la aplicación Zope, instale
59 ese paquete y después, Zope-server, para un servidor HTTP integrado
60 simple, Zope-pcgi, para uso con el servidor Apache. Si desea instalar
61 solamente algunas partes de la aplicación Zope, están diponibles otros
62 subpaquetes, usted debe instalar éstos en vez de ese RPM.
63
64 %description -l pl
65 Zope (Z Object Programming Environment - Obiektowe ¦rodowisko
66 Programistyczne Z) jest opartym o Pythona serwerem aplikacji do
67 tworzenia wysoko wydajnych, dynamicznych serwisów WWW, przy u¿yciu
68 u¿ytecznego i prostego modelu obiektowego skryptów oraz wysoko
69 wydajnej zintegrowanej obiektowej bazy danych.
70
71 %description -l pt_BR
72 Zope é uma aplicação baseada em Python, Open Source[tm], para
73 construção de sites dinâmicos, usando um modelo de scripting poderoso
74 e simples Para instalar o Zope, instale esse pacote e depois, ou o
75 Zope-server, para um servidor HTTP integrado simples, ou Zope-pcgi,
76 para uso com o Apache. Se você quiser instalar apenas algumas partes
77 do Zope, outros sub-pacotes estão disponíveis, e você deveria instalar
78 eles ao invés desse RPM.
79
80 %package -n python-zope
81 Summary:        Python packages developed as part of the Zope 3 project
82 Summary(pl):    Modu³y Pythona rozwijane w projekcie Zope 3
83 Group:          Development/Tools
84 Provides:       ZopeInterface
85 Provides:       python-zope-cachedescriptors = %{epoch}:%{version}-%{release}
86 Provides:       python-zope-component = %{epoch}:%{version}-%{release}
87 Provides:       python-zope-configuration = %{epoch}:%{version}-%{release}
88 Provides:       python-zope-deprecation = %{epoch}:%{version}-%{release}
89 Provides:       python-zope-documenttemplate = %{epoch}:%{version}-%{release}
90 Provides:       python-zope-event = %{epoch}:%{version}-%{release}
91 Provides:       python-zope-exceptions = %{epoch}:%{version}-%{release}
92 Provides:       python-zope-hookable = %{epoch}:%{version}-%{release}
93 Provides:       python-zope-i18n = %{epoch}:%{version}-%{release}
94 Provides:       python-zope-i18nmessageid = %{epoch}:%{version}-%{release}
95 Provides:       python-zope-index = %{epoch}:%{version}-%{release}
96 Provides:       python-zope-interface = %{epoch}:%{version}-%{release}
97 Provides:       python-zope-modulealias = %{epoch}:%{version}-%{release}
98 Provides:       python-zope-pagetemplate = %{epoch}:%{version}-%{release}
99 Provides:       python-zope-proxy = %{epoch}:%{version}-%{release}
100 Provides:       python-zope-publisher = %{epoch}:%{version}-%{release}
101 Provides:       python-zope-schema = %{epoch}:%{version}-%{release}
102 Provides:       python-zope-security = %{epoch}:%{version}-%{release}
103 Provides:       python-zope-server = %{epoch}:%{version}-%{release}
104 Provides:       python-zope-structuredtext = %{epoch}:%{version}-%{release}
105 Provides:       python-zope-tal = %{epoch}:%{version}-%{release}
106 Provides:       python-zope-tales = %{epoch}:%{version}-%{release}
107 Provides:       python-zope-testing = %{epoch}:%{version}-%{release}
108 Provides:       python-zope-thread = %{epoch}:%{version}-%{release}
109 Obsoletes:      ZopeInterface
110
111 %description -n python-zope
112 The "zope" package is a pure namespace package holding packages
113 developed as part of the Zope 3 project.
114
115 Generally, the immediate subpackages of the "zope" package should be
116 useful and usable outside of the Zope application server. Subpackages
117 of the "zope" package should have minimal interdependencies, although
118 most depend on "zope.interface".
119
120 %description -n python-zope -l pl
121 Pakiet "zope" to pakiet czystej przestrzeni nazw przechowuj±cej
122 pakiety tworzone jako czê¶æ projektu Zope 3.
123
124 Ogólnie bezpo¶rednie podpakiety pakietu "zope" powinny byæ przydatne i
125 u¿ywalne poza serwerem aplikacji Zope. Podpakiety pakietu "zope"
126 powinny mieæ minimalne zale¿no¶ci wzajemne, chocia¿ wiêkszo¶æ zale¿y
127 od "zope.interface".
128
129 %prep
130 %setup -q -n Zope-%{version}%{sub_ver}
131 %patch0 -p1
132
133 cp %{SOURCE4} ./mkzope3instance
134 chmod a+x ./mkzope3instance
135
136 %build
137 ./configure \
138         --prefix=%{zope_libdir} \
139         --force
140 %{__make}
141
142 %install
143 rm -rf $RPM_BUILD_ROOT
144
145 install -d $RPM_BUILD_ROOT{%{py_sitedir},%{_sbindir},%{zope_datadir}/lib/python} \
146         $RPM_BUILD_ROOT{/etc/logrotate.d,/etc/sysconfig,/etc/rc.d/init.d} \
147         $RPM_BUILD_ROOT{/var/lib/zope3/main,/var/run/zope3,/var/log/zope3/main} \
148 $RPM_BUILD_ROOT%{_sysconfdir}/zope3/main
149
150 python install.py -q install --skip-build --home "%{zope_libdir}" --root "$RPM_BUILD_ROOT"
151 mv $RPM_BUILD_ROOT%{zope_libdir}/lib/python/zope  $RPM_BUILD_ROOT%{py_sitedir}
152 rm $RPM_BUILD_ROOT%{zope_libdir}/zopeskel/bin/{*.bat.in,zopeservice*}
153 mv $RPM_BUILD_ROOT%{zope_libdir}/zopeskel $RPM_BUILD_ROOT%{_sysconfdir}/zope3
154
155 cat >$RPM_BUILD_ROOT%{zope_libdir}/bin/mkzopeinstance <<EOF
156 #!/usr/bin/python
157 import sys
158 from zope.app.server.mkzopeinstance import main
159 sys.exit(main(from_checkout=False))
160 EOF
161
162 PYTHONPATH="$RPM_BUILD_ROOT%{py_sitedir}:$RPM_BUILD_ROOT%{zope_libdir}/lib/python" \
163         DESTDIR="$RPM_BUILD_ROOT" ./mkzope3instance main \
164 -u zope:zope -s $RPM_BUILD_ROOT%{_sysconfdir}/zope3/zopeskel
165
166 cat >> $RPM_BUILD_ROOT%{py_sitedir}/zope/app/__init__.py <<EOF
167 import sys
168 sys.path.insert(0,"%{zope_libdir}/lib/python")
169 sys.path.insert(0,"%{zope_datadir}/lib/python")
170 EOF
171
172 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/zope
173 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/zope
174 %py_postclean
175
176 for f in zconfig zconfig_schema2html zopetest; do
177         ln -sf %{zope_libdir}/bin/"$f" $RPM_BUILD_ROOT%{_sbindir}/"$f"
178 done
179 for f in mkzeoinst runzeo zdctl zdrun zeoctl zeopasswd ; do
180         ln -sf %{zope_libdir}/bin/"$f".py $RPM_BUILD_ROOT%{_sbindir}/"$f"
181 done
182
183 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/zope3
184 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/zope3
185 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/zope3
186 install %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/mkzope3instance
187 install %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/installzope3package
188
189 touch $RPM_BUILD_ROOT/var/log/zope3/main/access.log
190 touch $RPM_BUILD_ROOT/var/log/zope3/main/transcript.log
191 touch $RPM_BUILD_ROOT/var/log/zope3/main/z3.log
192
193 %clean
194 rm -rf $RPM_BUILD_ROOT
195
196 %pre
197 %groupadd -g 112 zope
198 %useradd -u 112 -d /var/lib/zope/main -s /bin/false -c "Zope User" -g zope zope
199
200 %post
201 /sbin/chkconfig --add zope3
202 if [ -f /var/lock/subsys/zope3-main ]; then
203         /etc/rc.d/init.d/zope3 restart 1>&2
204 else
205         echo "Run \"/etc/rc.d/init.d/zopew start\" to start Zope 3 daemon."
206 fi
207
208 %preun
209 if [ "$1" = "0" ]; then
210         if [ -f /var/lock/subsys/zope3 ]; then
211                 /etc/rc.d/init.d/zope3 stop
212         fi
213         /sbin/chkconfig --del zope3
214 fi
215
216 %postun
217 if [ "$1" = "0" ] ; then
218         %userremove zope
219         %groupremove zope
220 fi
221
222 %files
223 %defattr(644,root,root,755)
224 %doc Zope/doc/*
225 %attr(754,root,root) /etc/rc.d/init.d/zope3
226 %attr(755,root,root) %{_sbindir}/*
227 %dir %{zope_libdir}
228 %dir %{zope_libdir}/bin
229 %attr(755,root,root) %{zope_libdir}/bin/*
230 %{zope_libdir}/include
231 %{zope_libdir}/lib
232 %{zope_datadir}
233 %{py_sitedir}/zope/app
234 %attr(775,root,zope) %dir /var/run/zope3
235 %attr(755,root,root) %dir /var/lib/zope3
236 %attr(775,root,root) %dir /var/lib/zope3/main
237 %dir /var/lib/zope3/main/bin
238 %attr(755,root,root) %dir /var/lib/zope3/main/bin/*
239 /var/lib/zope3/main%{_sysconfdir}
240 /var/lib/zope3/main/lib
241 /var/lib/zope3/main/log
242 %attr(775,root,zope) %dir /var/lib/zope3/main/var
243 /var/lib/zope3/main/var/README.txt
244 /var/lib/zope3/main/README.txt
245 %attr(755,root,zope) %dir /var/log/zope3
246 %attr(775,root,zope) %dir /var/log/zope3/main
247 %attr(751,root,zope) %dir %{_sysconfdir}/zope3
248 %attr(751,root,zope) %dir %{_sysconfdir}/zope3/main
249 %attr(751,root,zope) %dir %{_sysconfdir}/zope3/main/package-includes
250 %attr(640,root,zope) %dir %{_sysconfdir}/zope3/main/*.conf
251 %{_sysconfdir}/zope3/main/*.zcml
252 %{_sysconfdir}/zope3/main/package-includes/*.zcml
253 %{_sysconfdir}/zope3/main/package-includes/README.txt
254 %dir %{_sysconfdir}/zope3/zopeskel
255 %dir %{_sysconfdir}/zope3/zopeskel/bin
256 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zope3/zopeskel/bin/*
257 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zope3/zopeskel%{_sysconfdir}
258 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zope3/zopeskel/lib
259 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zope3/zopeskel/log
260 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zope3/zopeskel/var
261 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zope3/zopeskel/README.txt
262 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/zope3
263 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/zope3
264 %ghost /var/log/zope3/main/access.log
265 %ghost /var/log/zope3/main/transcript.log
266 %ghost /var/log/zope3/main/z3.log
267
268 %files -n python-zope
269 %defattr(644,root,root,755)
270 %{py_sitedir}/zope
271 %exclude %{py_sitedir}/zope/app
This page took 0.067344 seconds and 4 git commands to generate.