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