From 7b074efd1d181234a38507be5403ba9d5c5829ad Mon Sep 17 00:00:00 2001 From: ciesiel Date: Mon, 17 Nov 2003 11:18:27 +0000 Subject: [PATCH] - install into new dir (datadir) - installzopeproduct - cleaning Changed files: Zope-COREBlog.spec -> 1.4 --- Zope-COREBlog.spec | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Zope-COREBlog.spec b/Zope-COREBlog.spec index f86b122..2a42d1b 100644 --- a/Zope-COREBlog.spec +++ b/Zope-COREBlog.spec @@ -4,7 +4,7 @@ Summary: Blog / Weblog / Web Nikki system on Zope Summary(pl): System bloga/webloga oparty na Zope Name: Zope-%{zope_subname} Version: 0.52b -Release: 1 +Release: 2 License: GPL Group: Development/Tools Source0: http://zope.org/Members/ats/%{zope_subname}/%{zope_subname}%20%{version}/%{zope_subname}052b.tgz @@ -12,11 +12,10 @@ Source0: http://zope.org/Members/ats/%{zope_subname}/%{zope_subname}%20%{version URL: http://zope.org/Members/ats/COREBlog/ %pyrequires_eq python-modules Requires: Zope >= 2.6.1 +Requires(post,postun): /usr/sbin/installzopeproduct BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define product_dir /usr/lib/zope/Products - %description Blog / Weblog / Web Nikki system on Zope. @@ -33,30 +32,34 @@ mv -f stripogram/readme.txt docs/stripogram %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{product_dir}/%{zope_subname} +install -d $RPM_BUILD_ROOT%{_datadir}/%{name} -cp -af * $RPM_BUILD_ROOT%{product_dir}/%{zope_subname} +cp -af * $RPM_BUILD_ROOT%{_datadir}/%{name} -%py_comp $RPM_BUILD_ROOT%{product_dir}/%{zope_subname} -%py_ocomp $RPM_BUILD_ROOT%{product_dir}/%{zope_subname} +%py_comp $RPM_BUILD_ROOT%{_datadir}/%{name} +%py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name} # find $RPM_BUILD_ROOT -type f -name "*.py" -exec rm -rf {} \;; -rm -rf $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}/docs +rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/docs %clean rm -rf $RPM_BUILD_ROOT %post +/usr/sbin/installzopeproduct %{_datadir}/%{name} %{zope_subname} if [ -f /var/lock/subsys/zope ]; then /etc/rc.d/init.d/zope restart >&2 fi %postun -if [ -f /var/lock/subsys/zope ]; then - /etc/rc.d/init.d/zope restart >&2 +if [ "$1" = "0" ]; then + /usr/sbin/installzopeproduct -d %{zope_subname} + if [ -f /var/lock/subsys/zope ]; then + /etc/rc.d/init.d/zope restart >&2 + fi fi %files %defattr(644,root,root,755) %doc docs/* -%{product_dir}/%{zope_subname} +%{_datadir}/%{name} -- 2.43.0