]> git.pld-linux.org Git - packages/Zope.git/blob - Zope.spec
- changed default config to more secure (zope user, 127.0.0.1:8080 socket)
[packages/Zope.git] / Zope.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:           Zope
6 Version:        2.6.2
7 Release:        1
8 License:        Zope Public License (ZPL)
9 Group:          Networking/Daemons
10 Source0:        http://www.zope.org/Products/%{name}/%{version}/%{version}/%{name}-%{version}-src.tgz
11 # Source0-md5:  a0e873d54994231d7c03640f7092a4fb
12 Source1:        %{name}.init
13 Source2:        %{name}.logrotate
14 Source3:        %{name}.sysconfig
15 Source4:        %{name}-start.sh
16 Source5:        %{name}.instance
17 Source6:        http://zope.org/Documentation/Guides/ZCMG/Tarred%20HTML%202.1.1/ZCMG.html.tgz
18 # Source6-md5:  4c52eebc2e874a0590ac9c04e222e9f1
19 Source7:        http://www.zope.org/Documentation/Guides/DTML/Compressed%20html%202.1.1/DTML.html.tgz
20 # Source7-md5:  10f363dd061a1af8d472c51c32fa0a0e
21 Source8:        http://www.zope.org/Documentation/Guides/ZSQL/2.1.1/ZSQL.html.tgz
22 # Source8-md5:  0cddb5688fc0f886db468da08251fb81
23 Source9:        http://www.zope.org/Documentation/Guides/ZDG/HTML%201.2/ZDG.html.tgz
24 # Source9-md5:  0344ca88acb8a71688d2925975a55443
25 Source10:       http://www.zope.org/Documentation/Guides/ZAG/HTML%201.0/ZAG.html.tgz
26 # Source10-md5: b28bfc4ba4bee880767fcf89d79532d2
27 Source11:       http://openbsd.secsup.org/distfiles/zopebook-2.5/ZopeBook.tgz
28 # Source11-md5: 268c38a4c7d9f7334cdc98b0a152f8da
29 Patch0:         %{name}-http-virtual-cache.patch
30 URL:            http://www.zope.org/
31 BuildRequires:  python-devel < 2.3
32 BuildRequires:  perl
33 PreReq:         rc-scripts
34 Requires(pre):  /usr/bin/getgid
35 Requires(pre):  /bin/id
36 Requires(pre):  /usr/sbin/groupadd
37 Requires(pre):  /usr/sbin/useradd
38 Requires(postun):       /usr/sbin/userdel
39 Requires(postun):       /usr/sbin/groupdel
40 Requires(post,preun):   /sbin/chkconfig
41 Requires:       logrotate
42 Requires:       python >= 2.2.3
43 Requires:       python-modules >= 2.2.3
44 Requires:       python-libs >= 2.2.3
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %define         python_prefix           %(echo `python -c "import sys; print sys.prefix"`)
48 %define         python_version          %(echo `python -c "import sys; print sys.version[:3]"`)
49 %define         python_libdir           %{python_prefix}/lib/python%{python_version}
50 %define         python_includedir       %{python_prefix}/include/python%{python_version}
51 %define         python_sitedir          %{python_libdir}/site-packages
52 %define         python_configdir        %{python_libdir}/config
53
54 %define         python_compile          python -c "import compileall; compileall.compile_dir('.')"
55 %define         python_compile_opt      python -O -c "import compileall; compileall.compile_dir('.')"
56
57 %description
58 The Z Object Programming Environment (Zope) is a free, Open Source
59 Python-based application server for building high-performance, dynamic
60 web sites, using a powerful and simple scripting object model and
61 high-performance, integrated object database.
62
63 %description -l es
64 Zope es una aplicación basada en Python, Open Source[tm], para la
65 construcción de sitios dinámicos, usa un modelo de escritura de
66 guiones poderoso y sencillo. Para instalar la aplicación Zope, instale
67 ese paquete y después, Zope-server, para un servidor HTTP integrado
68 simple, Zope-pcgi, para uso con el servidor Apache. Si desea instalar
69 solamente algunas partes de la aplicación Zope, están diponibles otros
70 subpaquetes, usted debe instalar éstos en vez de ese RPM.
71
72 %description -l pl
73 Zope (Z Object Programming Environment - Obiektowe ¦rodowisko
74 Programistyczne Z) jest opartym o Pythona serwerem aplikacji do
75 tworzenia wysoko wydajnych, dynamicznych serwisów WWW, przy u¿yciu
76 u¿ytecznego i prostego modelu obiektowego skryptów oraz wysoko
77 wydajnej zintegrowanej obiektowej bazy danych.
78
79 %description -l pt_BR
80 Zope é uma aplicação baseada em Python, Open Source[tm], para
81 construção de sites dinâmicos, usando um modelo de scripting poderoso
82 e simples Para instalar o Zope, instale esse pacote e depois, ou o
83 Zope-server, para um servidor HTTP integrado simples, ou Zope-pcgi,
84 para uso com o Apache. Se você quiser instalar apenas algumas partes
85 do Zope, outros sub-pacotes estão disponíveis, e você deveria instalar
86 eles ao invés desse RPM.
87
88 %prep
89 %setup -q -n %{name}-%{version}-src -a6
90 %patch0 -p1
91 mkdir ZopeContentManagersGuide GuideToDTML GuideToZSQL ZopeDevelopersGuide
92 mkdir ZopeAdminGuide ZopeBook
93 tar xzf %{SOURCE6} -C ZopeContentManagersGuide
94 tar xzf %{SOURCE7} -C GuideToDTML
95 tar xzf %{SOURCE8} -C GuideToZSQL
96 tar xzf %{SOURCE9} -C ZopeDevelopersGuide
97 tar xzf %{SOURCE10} -C ZopeAdminGuide
98 tar xzf %{SOURCE11} -C ZopeBook
99
100 %build
101 perl -pi -e "s|data_dir\s+=\s+.*?join\(INSTANCE_HOME, 'var'\)|data_dir=INSTANCE_HOME|" lib/python/Globals.py
102 python wo_pcgi.py
103
104 find lib/python -type f -and \( -name 'Setup' -or -name '.cvsignore' \) -exec rm -f \{\} \;
105 find -type f -and \( -name '*.c' -or -name '*.h' -or -name 'Makefile*' \) -exec rm -f \{\} \;
106 rm -f ZServer/medusa/monitor_client_win32.py
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/zope}
111 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,zope/instances,logrotate.d,sysconfig}
112 install -d $RPM_BUILD_ROOT{/var/log/zope,/var/lib/zope/main}
113
114 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/zope
115 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/zope
116 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/zope
117 install %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/zope-start
118 install %{SOURCE5} $RPM_BUILD_ROOT/etc/zope/instances/main
119
120 cp -a lib/python/* $RPM_BUILD_ROOT%{_libdir}/zope
121 cp -a ZServer/ utilities/ import/ $RPM_BUILD_ROOT%{_libdir}/zope
122 find $RPM_BUILD_ROOT%{_libdir}/zope -type f -name '*.py' -or -name '*.txt' | xargs -r rm -f
123 cp -a ZServer/medusa/test/* $RPM_BUILD_ROOT%{_libdir}/zope/ZServer/medusa/test/
124
125 install zpasswd.py $RPM_BUILD_ROOT%{_bindir}/zpasswd
126 install z2.py $RPM_BUILD_ROOT%{_libdir}/zope
127 install var/Data.fs $RPM_BUILD_ROOT/var/lib/zope/main/Data.fs
128
129 python $RPM_BUILD_ROOT%{_bindir}/zpasswd -u zope -p zope -d localhost \
130         $RPM_BUILD_ROOT/var/lib/zope/main/access
131
132 touch $RPM_BUILD_ROOT/var/log/zope/main.log
133 touch $RPM_BUILD_ROOT/var/log/zope/main-detailed.log
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %pre
139 if [ -z "`getgid zope`" ]; then
140        echo "Making group zope"
141        /usr/sbin/groupadd -r -f zope
142 fi
143 if [ -z "`id -u zope 2>/dev/null`" ]; then
144        echo "Making user zope"
145        /usr/sbin/useradd -r -d /var/lib/zope/main -s /bin/false -c "Zope User" -g zope zope
146 fi
147
148 %post
149 /sbin/chkconfig --add zope
150 was_stopped=0
151 if [ -f /var/lib/zope/Data.fs ]; then
152         echo "Found the database in old location. Migrating..."
153         if [ -f /var/lock/subsys/zope ]; then
154             /etc/rc.d/init.d/zope stop >&2
155             was_stopped=1
156         fi
157         umask 022
158         [ -d /var/lib/zope/main ] && cd /var/lib/zope && mv -f * ./main 2>/dev/null
159         touch /var/lib/zope/access
160         if [ "x$was_stopped" = "x1" ]; then
161             /etc/rc.d/init.d/zope start >&2
162         fi
163         echo "Migration completed (new db location is /var/lib/zope/main)"
164 fi
165 if [ -f /var/lock/subsys/zope ]; then
166         if [ "x$was_stopped" != "x1" ]; then
167             /etc/rc.d/init.d/zope restart >&2
168         fi
169 else
170         echo "Create inituser using \"zpasswd inituser\" in directory \"/var/lib/zope/main\"" >&2
171         echo "look at /etc/zope/instances/main" >&2
172         echo "Run then \"/etc/rc.d/init.d/zope start\" to start Zope." >&2
173 fi
174
175 %preun
176 if [ "$1" = "0" ]; then
177         if [ -f /var/lock/subsys/zope ]; then
178                 /etc/rc.d/init.d/zope stop
179         fi
180         /sbin/chkconfig --del zope
181 fi
182
183 %postun
184 if [ "$1" = "0" ] ; then
185        echo "Removing user zope"
186        /usr/sbin/userdel zope >/dev/null 2>&1 || :
187        echo "Removing group zope"
188        /usr/sbin/groupdel zope >/dev/null 2>&1 || :
189 fi
190
191 %files
192 %defattr(644,root,root,755)
193 %doc doc/*.txt *.txt ZopeContentManagersGuide GuideToZSQL ZopeDevelopersGuide ZopeAdminGuide ZopeBook
194 %attr(754,root,root) /etc/rc.d/init.d/zope
195 %attr(755,root,root) %{_bindir}/*
196 %attr(755,root,root) %{_sbindir}/*
197 %{_libdir}/zope
198 %attr(640,root,root) %dir /var/lib/zope
199 %attr(1771,root,zope) %dir /var/lib/zope/main
200 %attr(640,root,root) %dir /etc/zope
201 %attr(640,root,root) %dir /etc/zope/instances
202 %attr(660,root,zope) %config(noreplace) %verify(not md5 size mtime) /var/lib/zope/main/*
203 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/zope/instances/*
204 %attr(640,root,root) /etc/logrotate.d/zope
205 %attr(640,root,root) /etc/sysconfig/zope
206 %ghost /var/log/zope/main.log
207 %ghost /var/log/zope/main-detailed.log
This page took 0.042243 seconds and 3 git commands to generate.