- install in %{_datadir}/%{name}
authorJacek Konieczny <jajcus@pld-linux.org>
Sun, 16 Nov 2003 16:27:53 +0000 (16:27 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- installzopeproduct in %post/%postun

Changed files:
    Zope-CookieCrumbler.spec -> 1.4

Zope-CookieCrumbler.spec

index 3c6b28048bfa61b2447835b46b13ed2767df8fbd..69efcc25011cdba02bbae066a0138bad82124410 100644 (file)
@@ -15,8 +15,6 @@ Requires:     Zope
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define         product_dir     /usr/lib/zope/Products
-
 %description
 CookieCrumbler is Zope product that enables cookie-based
 authentication.
@@ -34,29 +32,33 @@ mv -f {CHANGES.txt,README.txt} docs
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}
-cp -af * $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
+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
+       /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}
This page took 0.032388 seconds and 4 git commands to generate.