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