File zope3-python-2.4.spec of Package zope3-python-2.4
#
# spec file for package zope3 (Version 3.2.1)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: zope3-python-2.4
BuildRequires: python-2.4-devel python-2.4-xml
License: Other License(s), see package, Other uncritical OpenSource License
Summary: Open Source Web Application Server
Group: Productivity/Networking/Web/Frontends
Prereq: /usr/sbin/useradd /usr/sbin/usermod /usr/sbin/groupadd python
Requires: python-2.4 python-2.4-xml
Autoreqprov: on
Version: 3.2.1
Release: 2
Source: Zope-%{version}.tar.bz2
# SUSE specific things:
Source1: zope3-python-2.4.logrotate
Source2: zope3-python-2.4.init
Source3: zope3-python-2.4.sysconfig
Source4: zope3-python-2.4.mkzope3instance
Source6: zope3.conf.in
Source10: README.SUSE
# Patches
Patch0: Zope-3.2.1-python-version.patch
Patch2: Zope-3.2.1-remove_OverflowWarning.patch
URL: www.zope.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The Z Object Programming Environment (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.
Check http://www.zope.org for documentation, news, downloads, and more.
Read /usr/share/doc/packages/zope/README.SuSE for post installation
hints.
Check http://www.zope.org/Products for available products and save some
time.
Authors:
--------
Jim Fulton <jim@zope.com>
%prep
%setup -q -n Zope-%{version}
%patch0
%patch2
# documentation
cp %{S:10} .
%build
# configure
./configure --prefix=/usr/lib/zope3 --with-python=/usr/bin/python2.4
# build
make
%install
# cleanup
rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
# install main part
# using install.py because --root flag is not present in Makefile
python2.4 install.py install --prefix=/usr/lib/zope3 --root=$RPM_BUILD_ROOT
# sysconfig
install -m 755 -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{S:3} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name}
# init script
install -m 755 -d $RPM_BUILD_ROOT/etc/init.d
install -m 755 %{S:2} $RPM_BUILD_ROOT/etc/init.d/zope3
install -m 755 -d $RPM_BUILD_ROOT/usr/sbin
ln -s /etc/init.d/zope3 $RPM_BUILD_ROOT/usr/sbin/rczope3
# administration scripts
install -m 755 %{S:4} $RPM_BUILD_ROOT/usr/sbin/mkzope3instance
# logrotate
install -m 755 -d $RPM_BUILD_ROOT/etc/logrotate.d
install -m 644 %{S:1} $RPM_BUILD_ROOT/etc/logrotate.d/zope3
# zope instances home
install -m 755 -d $RPM_BUILD_ROOT/var/opt/zope3
# some other needed stuff
install -m 755 -d $RPM_BUILD_ROOT/usr/lib/zope3/share
install -m 644 %{S:6} $RPM_BUILD_ROOT/usr/lib/zope3/share
# this won't run on windows...
rm -f $RPM_BUILD_ROOT/usr/lib/zope3/zopeskel/bin/*.bat.in
# make lib64 appear as lib for mkzopeinstance
%ifarch ppc64 x86_64 s390x
ln -s lib64 $RPM_BUILD_ROOT/usr/lib/zope3/lib
%endif
# starting with python2.4.2, zope libraries are put into lib/python2.4/site-packages
# but mkzopeinstance needs lib/python
ln -s python2.4/site-packages $RPM_BUILD_ROOT/usr/lib/zope3/lib/python
%clean
rm -rf $RPM_BUILD_ROOT
%pre
if
getent group zope3 >/dev/null
then
: OK group zope3 already present
else
/usr/sbin/groupadd -r zope3 2>/dev/null || :
fi
if
getent passwd zope3 >/dev/null
then
: OK zope3 user already present
/usr/sbin/usermod -g zope3 zope3 2>/dev/null ||: # in the past, it had daemon as initial group
/usr/sbin/usermod -d /usr/lib/zope3 zope3
else
/usr/sbin/useradd -r -g zope3 -c "Zope" \
-d /usr/lib/zope3 -s /bin/false \
zope3 2>/dev/null || :
fi
%{save_rc_config_d_was_in_filelist}
%post
%{fillup_only zope3-python-2.4}
%{fillup_and_insserv -f zope3}
# Create default instance
if [ ! -d /var/opt/zope3/default ] ; then
echo "Default zope instance not found, creating"
/usr/lib/zope3/bin/mkzopeinstance \
-d /var/opt/zope3/default \
-u superuser:123 \
-m MD5
cp /usr/lib/zope3/share/zope3.conf.in /var/opt/zope3/default/etc/zope.conf.in
fi
%preun
%stop_on_removal zope3
%postun
%restart_on_update zope3
%insserv_cleanup
%files
# on 64 architectures zope puts python libraries into $PREFIX/lib64
%define zope_lib_dir lib
%ifarch ppc64 x86_64 s390x
%define zope_lib_dir lib64
%endif
%defattr(-, root, root)
%config /etc/init.d/zope3
%config(noreplace) /etc/logrotate.d/zope3
%dir /usr/lib/zope3
%dir /usr/lib/zope3/zopeskel
%dir /usr/lib/zope3/bin
%defattr(755, root, root, 755)
/usr/sbin/*
/usr/lib/zope3/bin/*
/usr/lib/zope3/zopeskel/bin
%defattr(644, root, root, 755)
/var/adm/fillup-templates/sysconfig.%{name}
%dir /var/opt/zope3
/usr/lib/zope3/include
/usr/lib/zope3/lib
%ifarch ppc64 x86_64 s390x
/usr/lib/zope3/lib64
%endif
/usr/lib/zope3/share
/usr/lib/zope3/zopeskel/etc
/usr/lib/zope3/zopeskel/lib
/usr/lib/zope3/zopeskel/log
/usr/lib/zope3/zopeskel/var
/usr/lib/zope3/zopeskel/README.txt
%doc Zope/doc/*.txt Zope/doc/{schema,security,skins,style,zcml,zsync} README.SUSE
%changelog -n zope3
* Mon Sep 25 2006 - mkudlvasr@suse.cz
- update to 3.2.1
highlights from changelog:
Zope 3.2.0b1
- The ZServer has been replaced with the Twisted server.
- Added a test browser. The test browser simulates a real
Web browser as much as possible as a Python object. This
allows us to write functional tests the same way the site
would be experienced by the user.
Zope 3.2.0b2
- Changed the way returning large results is handled. Applications
can now simply return files to the publisher.
- OverflowWarning is not used anymore in python 2.5
- Created int vs. Py_ssize_t checks according to PEP 353
* Thu Sep 21 2006 - cthiel@suse.de
- fix build with python 2.5
* Wed May 31 2006 - mkudlvasr@suse.cz
- add acceptable python version 2.4.3
* Mon May 22 2006 - lrupp@suse.de
- add python to PreRequires for %%post-script
- use a dynamic gid/uid in the system range
* Mon Apr 10 2006 - mkudlvasr@suse.cz
- added missingok to logrotate configuration - (bug #105495)
* Thu Mar 09 2006 - mkudlvasr@suse.cz
- added symlink to reflect changed behaviour with python2.4.2
- added symlink and removed patch for mkzopeinstance lib64 problem
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 16 2006 - mkudlvasr@suse.cz
- repaired problem with mkzopeinstance on x86_64, ppc64 and s390x
* Wed Dec 14 2005 - mkudlvasr@suse.cz
- new package