|
|
@@ -0,0 +1,142 @@
|
|
|
+##
|
|
|
+## zope.spec -- OpenPKG RPM Specification
|
|
|
+## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
|
|
|
+## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
|
|
|
+## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
|
|
|
+##
|
|
|
+## Permission to use, copy, modify, and distribute this software for
|
|
|
+## any purpose with or without fee is hereby granted, provided that
|
|
|
+## the above copyright notice and this permission notice appear in all
|
|
|
+## copies.
|
|
|
+##
|
|
|
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
+## SUCH DAMAGE.
|
|
|
+##
|
|
|
+
|
|
|
+# package information
|
|
|
+Name: zope
|
|
|
+Summary: Content Management System and Application Server
|
|
|
+URL: http://www.zope.org/
|
|
|
+Vendor: Zope Corporation
|
|
|
+Packager: The OpenPKG Project
|
|
|
+Distribution: OpenPKG [EVAL]
|
|
|
+Group: Web
|
|
|
+License: Zope Public License
|
|
|
+Version: 2.6.2
|
|
|
+Release: 20031002
|
|
|
+
|
|
|
+# list of sources
|
|
|
+Source0: http://www.zope.org/Products/Zope/%{version}/Zope-%{version}-src.tgz
|
|
|
+Source1: rc.zope
|
|
|
+
|
|
|
+# build information
|
|
|
+Prefix: %{l_prefix}
|
|
|
+BuildRoot: %{l_buildroot}
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20030802
|
|
|
+PreReq: OpenPKG, openpkg >= 20030802
|
|
|
+BuildPreReq: python >= 2.2.3
|
|
|
+PreReq: python >= 2.2.3
|
|
|
+AutoReq: no
|
|
|
+AutoReqProv: no
|
|
|
+
|
|
|
+%description
|
|
|
+ Zope is the leading Open Source web application server. Zope enables
|
|
|
+ teams to collaborate in the creation and management of dynamic
|
|
|
+ web-based business applications such as intranets and portals.
|
|
|
+ Zope makes it easy to build features such as site search, news,
|
|
|
+ personalization, and e-commerce into your web applications.
|
|
|
+
|
|
|
+%prep
|
|
|
+ %setup -q -n Zope-%{version}-src
|
|
|
+
|
|
|
+%build
|
|
|
+ # build package
|
|
|
+ CC="%{l_cc}" \
|
|
|
+ CFLAGS="%{l_cflags -O}" \
|
|
|
+ %{l_prefix}/bin/python setup.py build_ext \
|
|
|
+ --force
|
|
|
+
|
|
|
+%install
|
|
|
+ rm -rf $RPM_BUILD_ROOT
|
|
|
+
|
|
|
+ # install package
|
|
|
+ %{l_prefix}/bin/python setup.py install \
|
|
|
+ --root=$RPM_BUILD_ROOT \
|
|
|
+ --prefix=%{l_prefix} \
|
|
|
+ --install-purelib=%{l_prefix}/lib/zope \
|
|
|
+ --install-platlib=%{l_prefix}/lib/zope \
|
|
|
+ --install-headers=%{l_prefix}/include \
|
|
|
+ --install-scripts=%{l_prefix}/bin \
|
|
|
+ --no-compile
|
|
|
+
|
|
|
+ # strip down installation
|
|
|
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/zope/import
|
|
|
+
|
|
|
+ # install additional scripts
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/libexec/zope \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/bin
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ z2.py inst/compilezpy.py \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/libexec/zope/
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ -e 's;/usr/bin/env python;%{l_prefix}/bin/python;' \
|
|
|
+ zpasswd.py \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/bin/zpasswd
|
|
|
+
|
|
|
+ # create Zope instance home
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/var/zope/default/var
|
|
|
+
|
|
|
+ # install run-command script
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
+ %{SOURCE rc.zope} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
+
|
|
|
+ # determine installation files
|
|
|
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
+ %{l_files_std} \
|
|
|
+ '%attr(700,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/zope/default/var'
|
|
|
+
|
|
|
+%files -f files
|
|
|
+
|
|
|
+%clean
|
|
|
+ rm -rf $RPM_BUILD_ROOT
|
|
|
+
|
|
|
+%post
|
|
|
+ # compile python modules in place after installation
|
|
|
+ echo "Compiling Python modules. Just be patient." |\
|
|
|
+ %{l_rpmtool} msg -b -t info
|
|
|
+ ( cd $RPM_INSTALL_PREFIX/lib/zope
|
|
|
+ find . -name "*.pyc" | xargs rm -f || true
|
|
|
+ $RPM_INSTALL_PREFIX/bin/python \
|
|
|
+ $RPM_INSTALL_PREFIX/libexec/zope/compilezpy.py
|
|
|
+ ) >/dev/null 2>&1 || true
|
|
|
+
|
|
|
+%preun
|
|
|
+ [ $1 -eq 0 ] || exit 0
|
|
|
+
|
|
|
+ # stop service
|
|
|
+ %{l_rc} zope stop 2>/dev/null
|
|
|
+
|
|
|
+ # remove compiled python modules
|
|
|
+ ( cd $RPM_INSTALL_PREFIX/lib/zope
|
|
|
+ find . -name "*.pyc" | xargs rm -f || true
|
|
|
+ ) || true
|
|
|
+
|
|
|
+ # remove log files
|
|
|
+ rm -rf $RPM_INSTALL_PREFIX/var/zope/default/var/* >/dev/null 2>&1 || true
|
|
|
+ exit 0
|
|
|
+
|