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