]> git.pld-linux.org Git - packages/Zope-BTreeFolder2.git/blobdiff - Zope-BTreeFolder2.spec
- installed into %{_datadir}/%{name}
[packages/Zope-BTreeFolder2.git] / Zope-BTreeFolder2.spec
index 196ec654d819b65b25e78ec1076908ec5fc46002..2a38f0a5f30c3da7dcb812b484f985c7b54fa108 100644 (file)
@@ -12,11 +12,10 @@ Source0:    http://hathaway.freezope.org/Software/%{zope_subname}/%{zope_subname}-%
 URL:           http://hathaway.freezope.org/Software/BTreeFolder2/
 %pyrequires_eq python-modules
 Requires:      Zope
+Requires(post,postun): /usr/sbin/installzopeproduct
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define        product_dir     /usr/lib/zope/Products
-
 %description
 BTreeFolder2 is a Zope product that acts like a Zope folder but can
 store many more items.
@@ -30,12 +29,12 @@ folderach
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
 # should tests be included or not?
-cp -af {tests,*.py,*.dtml} $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}
+cp -af tests *.py *.dtml *.gif $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 {} \;;
 
@@ -43,16 +42,20 @@ cp -af {tests,*.py,*.dtml} $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}
 rm -rf $RPM_BUILD_ROOT
 
 %post
+/usr/sbin/installzopeproduct %{_datadir}/%{name}/$p BTreeFolder2
 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 $p BTreeFolder2
+       if [ -f /var/lock/subsys/zope ]; then
+               /etc/rc.d/init.d/zope restart >&2
+       fi
 fi
 
 %files
 %defattr(644,root,root,755)
-%doc README.txt
-%{product_dir}/%{zope_subname}
+%doc README.txt CHANGES.txt
+%{_datadir}/%{name}
This page took 0.054697 seconds and 4 git commands to generate.