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