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