1 Summary: An application server and portal toolkit for building Web sites.
5 Group: Networking/Daemons
6 Group(de): Netzwerkwesen/Server
7 Group(pl): Sieciowe/Serwery
8 License: Zope Public License (ZPL)
9 Source0: http://www.zope.org/Download/Releases/%{name}-%{version}/%{name}-%{version}-src.tgz
10 Source1: http://www.zope.org/Documentation/Guides/ZCMG/ZCMG.html.tgz
11 Source2: http://www.zope.org/Documentation/Guides/DTML/DTML.html.tgz
12 Source3: http://www.zope.org/Documentation/Guides/ZSQL/ZSQL.html.tgz
13 Source4: http://www.zope.org/Documentation/Guides/%{name}-ProductTutorial.tar.gz
14 Source5: http://www.zope.org/Documentation/Guides/ZDG/ZDG.html.tgz
15 Source6: http://www.zope.org/Documentation/Guides/ZAG/ZAG.html.tgz
16 URL: http://www.zope.org/
18 Source8: %{name}-zserver.sh
19 Prereq: /sbin/chkconfig
20 Prereq: /usr/sbin/useradd
21 Requires: python >= 2.1
22 BuildRequires: python-devel >= 2.1
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define python_prefix %(echo `python -c "import sys; print sys.prefix"`)
26 %define python_version %(echo `python -c "import sys; print sys.version[:3]"`)
27 %define python_libdir %{python_prefix}/lib/python%{python_version}
28 %define python_includedir %{python_prefix}/include/python%{python_version}
29 %define python_sitedir %{python_libdir}/site-packages
30 %define python_configdir %{python_libdir}/config
32 %define python_compile python -c "import compileall; compileall.compile_dir('.')"
33 %define python_compile_opt python -O -c "import compileall; compileall.compile_dir('.')"
36 The Z Object Programming Environment (Zope) is a free, Open Source
37 Python-based application server for building high-performance, dynamic
38 web sites, using a powerful and simple scripting object model and
39 high-performance, integrated object database.
42 %setup -q -n %{name}-%{version}-src
43 %setup -q -T -D -c -a 1 -n %{name}-%{version}-src/ZopeContentManagersGuide
44 %setup -q -T -D -c -a 2 -n %{name}-%{version}-src/GuideToDTML
45 %setup -q -T -D -c -a 3 -n %{name}-%{version}-src/GuideToZSQL
46 %setup -q -T -D -a 4 -n %{name}-%{version}-src
47 %setup -q -T -D -c -a 5 -n %{name}-%{version}-src/ZopeDevelopersGuide
48 %setup -q -T -D -c -a 6 -n %{name}-%{version}-src/ZopeAdminGuide
49 %setup -q -T -D -n %{name}-%{version}-src
52 perl -pi -e "s|data_dir\s+=\s+.*?join\(INSTANCE_HOME, 'var'\)|data_dir=INSTANCE_HOME|" lib/python/Globals.py
55 find lib/python -type f -and \( -name 'Setup' -or -name '.cvsignore' \) -exec rm \{\} \;
56 find -type f -and \( -name '*.c' -or -name '*.h' -or -name 'Makefile*' \) -exec rm \{\} \;
57 rm ZServer/medusa/monitor_client_win32.py
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/zope} \
62 $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/log,/var/lib/zope}
64 cp -a lib/python/* $RPM_BUILD_ROOT%{_libdir}/zope
65 cp -a ZServer/ utilities/ import/ $RPM_BUILD_ROOT%{_libdir}/zope
66 find $RPM_BUILD_ROOT%{_libdir}/zope -type f -name '*.py' -or -name '*.txt' | xargs -r rm -f
68 install zpasswd.py $RPM_BUILD_ROOT%{_bindir}/zpasswd
69 install z2.py $RPM_BUILD_ROOT%{_libdir}/zope
70 install %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}/zope-zserver
71 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/zope
72 install var/Data.fs $RPM_BUILD_ROOT/var/lib/zope/Data.fs
74 touch $RPM_BUILD_ROOT/var/log/zope
76 python $RPM_BUILD_ROOT%{_bindir}/zpasswd -u zope -p zope -d localhost $RPM_BUILD_ROOT/var/lib/zope/access
77 gzip -9nf doc/*.txt *.txt
80 if [ -z "`getgid zope`" ]; then
84 if [ -z "`id -u zope 2>/dev/null`" ]; then
85 useradd -r -d /var/lib/zope -s /bin/false -c "Zope User" -g zope zope
89 /sbin/chkconfig --add zope
90 if [ -f /var/lock/subsys/zope ]; then
91 /etc/rc.d/init.d/zope restart >&2
93 echo "Run \"/etc/rc.d/init.d/zope start\" to start Zope." >&2
98 userdel zope >/dev/null 2>&1 || :
99 groupdel zope >/dev/null 2>&1 || :
103 if [ "$1" = "0" ]; then
104 if [ -f /var/lock/subsys/zope ]; then
105 /etc/rc.d/init.d/zope stop
107 /sbin/chkconfig --del zope
111 rm -rf $RPM_BUILD_ROOT
114 %defattr(644,root,root,755)
115 %attr(755,root,root) /etc/rc.d/init.d/zope
116 %attr(755,root,root) %{_bindir}/*
117 %attr(755,root,root) %{_sbindir}/*
119 %attr(771,root,zope) %dir /var/lib/zope
120 %attr(660,root,zope) %config(noreplace) %verify(not md5 size mtime) /var/lib/zope/*
121 %doc *.gz doc/*.gz ZopeContentManagersGuide GuideToZSQL Tutorial ZopeDevelopersGuide ZopeAdminGuide