]> git.pld-linux.org Git - packages/Zope.git/blob - Zope.spec
- release 2
[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.0
7 Release:        2
8 License:        Zope Public License (ZPL)
9 Group:          Networking/Daemons
10 Source0:        http://www.zope.org/Products/%{name}/%{version}/%{name}-%{version}-src.tgz
11 Source1:        http://www.zope.org/Documentation/Guides/ZCMG/ZCMG.html.tgz
12 Source2:        http://www.zope.org/Documentation/Guides/DTML/DTML.html.tgz
13 Source3:        http://www.zope.org/Documentation/Guides/ZSQL/ZSQL.html.tgz
14 Source4:        http://www.zope.org/Documentation/Guides/%{name}-ProductTutorial.tar.gz
15 Source5:        http://www.zope.org/Documentation/Guides/ZDG/ZDG.html.tgz
16 Source6:        http://www.zope.org/Documentation/Guides/ZAG/ZAG.html.tgz
17 # note: above documentation is deprecated, zope.org suggests using ZopeBook:
18 #Source1:       http://www.zope.org/Members/michel/ZB/ZopeBook.tgz
19 Source7:        %{name}.init
20 Source8:        %{name}-zserver.sh
21 URL:            http://www.zope.org/
22 Prereq:         rc-scripts
23 Prereq:         /sbin/chkconfig
24 Prereq:         /usr/sbin/useradd
25 Requires:       python >= 2.2
26 BuildRequires:  python-devel >= 2.2
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define python_prefix      %(echo `python -c "import sys; print sys.prefix"`)
30 %define python_version     %(echo `python -c "import sys; print sys.version[:3]"`)
31 %define python_libdir      %{python_prefix}/lib/python%{python_version}
32 %define python_includedir  %{python_prefix}/include/python%{python_version}
33 %define python_sitedir     %{python_libdir}/site-packages
34 %define python_configdir   %{python_libdir}/config
35
36 %define python_compile     python -c "import compileall; compileall.compile_dir('.')"
37 %define python_compile_opt python -O -c "import compileall; compileall.compile_dir('.')"
38
39 %description
40 The Z Object Programming Environment (Zope) is a free, Open Source
41 Python-based application server for building high-performance, dynamic
42 web sites, using a powerful and simple scripting object model and
43 high-performance, integrated object database.
44
45 %description -l es
46 Zope es una aplicación basada en Python, Open Source[tm], para la
47 construcción de sitios dinámicos, usa un modelo de escritura de
48 guiones poderoso y sencillo. Para instalar la aplicación Zope, instale
49 ese paquete y después, Zope-server, para un servidor HTTP integrado
50 simple, Zope-pcgi, para uso con el servidor Apache. Si desea instalar
51 solamente algunas partes de la aplicación Zope, están diponibles otros
52 subpaquetes, usted debe instalar éstos en vez de ese RPM.
53
54 %description -l pl
55 Zope (Z Object Programming Environment - Obiektowe ¦rodowisko
56 Programistyczne Z) jest opartym o Pythona serwerem aplikacji do
57 tworzenia wysoko wydajnych, dynamicznych serwisów WWW, przy u¿yciu
58 u¿ytecznego i prostego modelu obiektowego skryptów oraz wysoko
59 wydajnej zintegrowanej obiektowej bazy danych.
60
61 %description -l pt_BR
62 Zope é uma aplicação baseada em Python, Open Source[tm], para
63 construção de sites dinâmicos, usando um modelo de scripting poderoso
64 e simples Para instalar o Zope, instale esse pacote e depois, ou o
65 Zope-server, para um servidor HTTP integrado simples, ou Zope-pcgi,
66 para uso com o Apache. Se você quiser instalar apenas algumas partes
67 do Zope, outros sub-pacotes estão disponíveis, e você deveria instalar
68 eles ao invés desse RPM.
69
70 %prep
71 %setup -q -n %{name}-%{version}-src -a4
72 mkdir ZopeContentManagersGuide GuideToDTML GuideToZSQL ZopeDevelopersGuide ZopeAdminGuide
73 tar xzf %{SOURCE1} -C ZopeContentManagersGuide
74 tar xzf %{SOURCE2} -C GuideToDTML
75 tar xzf %{SOURCE3} -C GuideToZSQL
76 tar xzf %{SOURCE5} -C ZopeDevelopersGuide
77 tar xzf %{SOURCE6} -C ZopeAdminGuide
78
79 %build
80 perl -pi -e "s|data_dir\s+=\s+.*?join\(INSTANCE_HOME, 'var'\)|data_dir=INSTANCE_HOME|" lib/python/Globals.py
81 python wo_pcgi.py
82
83 find lib/python -type f -and \( -name 'Setup' -or -name '.cvsignore' \) -exec rm -f \{\} \;
84 find -type f -and \( -name '*.c' -or -name '*.h' -or -name 'Makefile*' \) -exec rm -f \{\} \;
85 rm -f ZServer/medusa/monitor_client_win32.py
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/zope} \
90             $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/log,/var/lib/zope}
91
92 cp -a lib/python/* $RPM_BUILD_ROOT%{_libdir}/zope
93 cp -a ZServer/ utilities/ import/ $RPM_BUILD_ROOT%{_libdir}/zope
94 find $RPM_BUILD_ROOT%{_libdir}/zope -type f -name '*.py' -or -name '*.txt' | xargs -r rm -f
95 cp -a ZServer/medusa/test/* $RPM_BUILD_ROOT%{_libdir}/zope/ZServer/medusa/test/
96
97 install zpasswd.py $RPM_BUILD_ROOT%{_bindir}/zpasswd
98 install z2.py $RPM_BUILD_ROOT%{_libdir}/zope
99 install %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}/zope-zserver
100 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/zope
101 install var/Data.fs $RPM_BUILD_ROOT/var/lib/zope/Data.fs
102
103 touch $RPM_BUILD_ROOT/var/log/zope
104
105 python $RPM_BUILD_ROOT%{_bindir}/zpasswd -u zope -p zope -d localhost $RPM_BUILD_ROOT/var/lib/zope/access
106
107 gzip -9nf doc/*.txt *.txt
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %pre
113 if [ -z "`getgid zope`" ]; then
114         echo "Making group zope"
115         /usr/sbin/groupadd -r -f zope
116 fi
117
118 if [ -z "`id -u zope 2>/dev/null`" ]; then
119         echo "Making user zope"
120         /usr/sbin/useradd -r -d /var/lib/zope -s /bin/false -c "Zope User" -g zope zope
121 fi
122
123 %post
124 /sbin/chkconfig --add zope
125 if [ -f /var/lock/subsys/zope ]; then
126         /etc/rc.d/init.d/zope restart >&2
127 else
128         echo "Run \"/etc/rc.d/init.d/zope start\" to start Zope." >&2
129 fi
130
131 %preun
132 if [ "$1" = "0" ]; then
133         if [ -f /var/lock/subsys/zope ]; then
134                 /etc/rc.d/init.d/zope stop
135         fi
136         /sbin/chkconfig --del zope
137 fi
138
139 %postun
140 if [ "$1" = "0" ] ; then
141         echo "Removing user zope"
142         /usr/sbin/userdel zope >/dev/null 2>&1 || :
143         echo "Removing group zope"
144         /usr/sbin/groupdel zope >/dev/null 2>&1 || :    
145 fi
146
147 %files
148 %defattr(644,root,root,755)
149 %attr(755,root,root) /etc/rc.d/init.d/zope
150 %attr(755,root,root) %{_bindir}/*
151 %attr(755,root,root) %{_sbindir}/*
152 %{_libdir}/zope
153 %attr(1771,root,zope) %dir /var/lib/zope
154 %attr(660,root,zope) %config(noreplace) %verify(not md5 size mtime) /var/lib/zope/*
155 %doc *.gz doc/*.gz ZopeContentManagersGuide GuideToZSQL Tutorial ZopeDevelopersGuide ZopeAdminGuide
This page took 0.08767 seconds and 3 git commands to generate.