This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
zope/zope.spec

264 lines
8.2 KiB
RPMSpec

%define python_minver 2.3.3
%define zope_user zope
%define zope_group %{zope_user}
%define zope_home %{_libdir}/zope
%define software_home %{zope_home}/lib/python
%define instance_home %{_localstatedir}/lib/zope
%define zopectl %{_bindir}/zopectl
%define runzope %{_bindir}/runzope
Name: zope
Summary: Web application server for flexible content management applications
Version: 2.7.4
Release: 1
License: ZPL
Group: System Environment/Daemons
URL: http://www.zope.org/
Source: http://zope.org/Products/Zope/2.7.4/Zope-2.7.4-0.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source1: zope.init.in
Source2: zope.sysconfig.in
Source3: zope.zopectl.in
Source4: zope-README.Fedora
Source5: zope.logrotate.in
Source6: zope.logrotate.cron.in
Patch0: zope-2.7.3-config.patch
BuildRequires: python-devel >= %{python_minver}
BuildRequires: python >= %{python_minver}
Requires: python >= %{python_minver}
Requires(pre): /usr/sbin/useradd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig, /sbin/service
Requires(postun): /usr/sbin/userdel
%description
Zope is an application server framework that enables developers to quickly
build web applications such as intranets, portals, and content management
systems.
%prep
%setup -q -n Zope-%{version}-0
# Do not use -b option, or we'll install the backup too
%patch0 -p1 -b .config
rm -f skel/etc/zope.conf.in.config
chmod -x skel/import/README.txt
cp -p %{SOURCE4} README.Fedora
cp -p %{SOURCE5} skel/etc/logrotate.conf.in
%build
./configure \
--with-python=%{__python} \
--prefix=$RPM_BUILD_ROOT%{zope_home} \
--optimize
# --no-compile
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
rm -f docs
# Create all required additional directories
for dir in %{zope_home} %{software_home} %{instance_home}/{Products,bin,var} \
%{_sysconfdir}/sysconfig %{_bindir}; do
mkdir -p $RPM_BUILD_ROOT$dir
done
install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/zope
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/zope
install -D -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/zopectl
install -D -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/zope-logrotate
perl -pi -e 's,<<SYSCONFDIR>>,%{_sysconfdir},g;
s,<<BINDIR>>,%{_bindir},g;
s,<<LOCALSTATEDIR>>,%{_localstatedir},g;
s,<<ZOPE_USER>>,%{zope_user},g' \
$RPM_BUILD_ROOT%{_initrddir}/zope \
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/zope \
$RPM_BUILD_ROOT%{_bindir}/zopectl \
$RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/zope-logrotate \
README.Fedora skel/etc/zope.conf.in
# Install the skel, translating paths, into the build root
%{__python} "utilities/copyzopeskel.py" \
--sourcedir="skel" \
--targetdir="$RPM_BUILD_ROOT%{instance_home}" \
--replace="INSTANCE_HOME:%{instance_home}" \
--replace="SOFTWARE_HOME:%{software_home}" \
--replace="ZOPE_HOME:%{zope_home}" \
--replace="PYTHON:%{__python}" \
# Actually copy all the other files over
make install
chmod 700 $RPM_BUILD_ROOT%{instance_home}
chmod 755 $RPM_BUILD_ROOT%{zope_home}
# Symlink to include in the docs
ln -sf %{zope_home}/doc docs
# write version.txt
echo "Zope %{version}-%{release}" > \
"$RPM_BUILD_ROOT%{zope_home}/lib/python/version.txt"
# Compile .pyc
%{__python} -c "import compileall; \
compileall.compile_dir(\"$RPM_BUILD_ROOT%{zope_home}\", \
ddir=\"%{zope_home}\", force=1)"
%clean
rm -rf $RPM_BUILD_ROOT
%pre
/usr/sbin/useradd -c "Zope user" -s /bin/false -r -d %{zope_home} \
%{zope_user} 2>/dev/null || :
%post
# add zope init to runlevels
/sbin/chkconfig --add zope
%preun
if [ $1 -eq 0 ]; then
/sbin/service zope stop >/dev/null 2>&1
/sbin/chkconfig --del zope
fi
%postun
if [ $1 -eq 0 ]; then
/usr/sbin/userdel %{zope_user} 2>/dev/null || :
fi
%files
%defattr(-, root, root, -)
%doc %{zope_home}/doc
%doc docs README.Fedora
%config(noreplace) %{_sysconfdir}/sysconfig/zope
%config %{_initrddir}/zope
%config %{_sysconfdir}/cron.daily/zope-logrotate
%attr(0755, root, root) %{_bindir}/zopectl
%dir %{zope_home}
%{zope_home}/bin
%{zope_home}/import
%{zope_home}/lib
%dir %{zope_home}/skel
%{zope_home}/skel/bin
%{zope_home}/skel/Extensions
%{zope_home}/skel/import
%{zope_home}/skel/log
%{zope_home}/skel/Products
%{zope_home}/skel/README.txt
%{zope_home}/skel/var
%config %{zope_home}/skel/etc
%attr(-, %{zope_user}, %{zope_group}) %dir %{instance_home}
%attr(-, %{zope_user}, %{zope_group}) %{instance_home}/bin
%attr(-, %{zope_user}, %{zope_group}) %{instance_home}/Extensions
%attr(-, %{zope_user}, %{zope_group}) %{instance_home}/import
%attr(-, %{zope_user}, %{zope_group}) %{instance_home}/log
%attr(-, %{zope_user}, %{zope_group}) %{instance_home}/Products
%attr(-, %{zope_user}, %{zope_group}) %{instance_home}/README.txt
%attr(-, %{zope_user}, %{zope_group}) %{instance_home}/var
%attr(-, %{zope_user}, %{zope_group}) %config %{instance_home}/etc
%changelog
* Wed Jan 26 2005 Aurelien Bompard <gauret[AT]free.fr> 2.7.4-1
- version 2.7.4
- flag the documentation as %%doc
- make %%zope_home go+rx to allow users to create instances and to allow
access to docs
- add a logrotate cron job
- flag config files as %%config even in %%zope_home and %%instance_home
* Fri Dec 10 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.6
- activate "security-policy-implementation python" in zope.conf
* Sun Nov 21 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.5
- revert to zope's default directory tree to allow multiple instances
- make the zopectl script multiple-instaces-aware.
- add README.Fedora
* Fri Nov 12 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.4
- compile scripts in %zope_home/bin too
- keep skel dir in %zope_home to fix mkzopeinstance
- BuildRequire python, since python-devel doesn't require it.
* Fri Nov 12 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.3
- compile .pyc instead of just touch-ing them
* Thu Nov 11 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.2
- deal with leftover .pyc files
- minor spec cleanups
* Thu Nov 11 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.1
- fix scriptlets requirements
- use standard buildroot
- replace %%buildroot by RPM_BUILD_ROOT
- update to 2.7.3
- drop Hotfix
- drop patch 1, fixed upstream
* Tue Aug 10 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.2-0.fdr.3
- add hotfix from Zope.org:
http://zope.org/Products/Zope/Hotfix-200400807/Hotfix-20040807-alert
* Wed Aug 04 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.2-0.fdr.2
- add patch to warn the user that the initial user cannot be added while
Zope is running (from Chris McDonough)
* Wed Aug 04 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.2-0.fdr.1
- version 2.7.2
- remove leftover byte-compilation in %%post
- Zope 2.7.x really requires python >= 2.3.3
* Wed Jul 14 2004 Rex Dieter <rexdieter at sf.net> 2.7.1-0.fdr.1
- 2.7.1
- move files created in %%post back into rpm. Unowned files are bad.
- make (theoretically) buildable for all rh73-rh90,fc1/2,el3
NOTE: lowerred python_minver to 2.2.2 to test builds, though (most)
docs claim 2.3.3 is required. (??)
- don't use Requires(preun,postun)
- use %%_smp_mflags
* Tue Apr 28 2004 Chris McDonough <chrism@plope.com> 2.7.0-0.fdr.1
- Prep for submission to Fedora.us by revising work done by Matthias
- Refer to source files by URL instead of by name
- Write version.txt into software home in post
- Don't ship byte-compiled files, instead compile them in post
- Add patch for inverted P_WAIT/P_NOWAIT in zdctl (fixes startup)
- Add patch for objectmanager bug that could effect sites that depend
on userid/username separation
- Improved init script (OK and FAILED now are printed at the appropriate
times)
- Remove runzope workaround by adding a <zoperunner> stanza to the
config file.
- Start in runlevels 345.
- Known issues:
- zopectl is started and runs as the root user at boot time,
(although Zope itself runs as the zope user)
- no distro-specific docs telling people which port the software
runs on or how to add a user via zopectl adduser.
* Wed Feb 18 2004 Matthias Saou <http://freshrpms.net/> 2.7.0-0.6.fr
- Initial RPM release.
- The startup/stop needs to be modified further.
- Currently "zopectl" returns an error although Zope does start...