1 %define zope_subname zopeedit
2 Summary: Client-side helper application for ExternalEditor Zope product
3 Summary(pl.UTF-8): Aplikacja kliencka dla produktu Zope ExternalEditor
4 Name: Zope-%{zope_subname}
8 Group: Development/Tools
9 Source0: http://plope.com/software/ExternalEditor/%{zope_subname}-%{version}-src.tgz
10 # Source0-md5: 25dbf5438c27266a2a0840834f9bcd36
11 URL: http://plope.com/software/ExternalEditor/
13 BuildRequires: rpm-pythonprov
14 Requires(post,postun): grep
15 Requires(postun): fileutils
16 %pyrequires_eq python-modules
17 Requires: python-tkinter
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 Client-side helper application for ExternalEditor Zope product.
24 %description -l pl.UTF-8
25 Aplikacja kliencka dla produktu Zope ExternalEditor.
28 %setup -q -n %{zope_subname}-%{version}
31 rm -rf $RPM_BUILD_ROOT
32 install -d $RPM_BUILD_ROOT{%{_datadir}/%{zope_subname},%{_mandir}/man1,%{_bindir}}
34 install man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
35 cp -af {Plugins,version.txt,%{zope_subname}.py} $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}
37 %py_comp $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}
38 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}
40 cat >$RPM_BUILD_ROOT%{_bindir}/%{zope_subname} <<EOF
43 exec %{_bindir}/python %{_datadir}/%{zope_subname}/%{zope_subname}.pyo \$*
46 # sometimes .py needed
47 # rm -f $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}/*.py
48 # rm -f $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}/Plugins/*.py
51 rm -rf $RPM_BUILD_ROOT
54 if ! grep -qs zopeedit /etc/mailcap ; then
56 echo "application/x-zope-edit; /usr/bin/zopeedit %%s ; test=test -x /usr/bin/zopeedit" >> /etc/mailcap
60 if [ "$1" = "0" ]; then
61 if grep -qs zopeedit /etc/mailcap ; then
63 grep -v '^application/x-zope-edit; /usr/bin/zopeedit %%s ; test=test -x /usr/bin/zopeedit$' /etc/mailcap >> /etc/mailcap_new
64 mv -f /etc/mailcap_new /etc/mailcap
69 %defattr(644,root,root,755)
70 %doc CHANGES.txt INSTALL-UNIX.txt README.txt
71 %attr(755,root,root) %{_bindir}/%{zope_subname}
72 %{_datadir}/%{zope_subname}