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