- spaces -> tabs
[packages/Zope-zopeedit.git] / Zope-zopeedit.spec
CommitLineData
8ba5753d 1%define zope_subname zopeedit
2Summary: Client-side helper application for ExternalEditor Zope product
d6b25d12 3Summary(pl): Aplikacja kliencka dla ExternalEditor, produktu Zope
8ba5753d 4Name: Zope-%{zope_subname}
143bee39 5Version: 0.8
466bacef 6Release: 3
8ba5753d 7License: ZPL 2.0
8Group: Development/Tools
9Source0: http://zope.org/Members/Caseman/ExternalEditor/%{version}/%{zope_subname}-%{version}-src.tgz
143bee39 10# Source0-md5: 8ecc65067d32ac961476f924fa3e8b5b
8ba5753d 11URL: http://zope.org/Members/Caseman/ExternalEditor/
d9f7891a
JB
12Requires(post,postun): grep
13Requires(postun): fileutils
b7e6492e 14BuildRequires: python
8ba5753d 15%pyrequires_eq python-modules
16Requires: python-tkinter
8ba5753d 17BuildArch: noarch
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%description
21Client-side helper application for ExternalEditor Zope product
22
23%description -l pl
0ed72d96 24Aplikacja kliencka dla ExternalEditor, produktu Zope
8ba5753d 25
26%prep
27%setup -q -n %{zope_subname}-%{version}-src
28
29%install
30rm -rf $RPM_BUILD_ROOT
31install -d $RPM_BUILD_ROOT{%{_datadir}/%{zope_subname},%{_mandir}/man1,%{_bindir}}
32
33install man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
143bee39 34cp -af {Plugins,version.txt,%{zope_subname}.py} $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}
8ba5753d 35
36%py_comp $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}
37%py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}
38
39cat >$RPM_BUILD_ROOT%{_bindir}/%{zope_subname} <<EOF
40#!/bin/sh
41
42exec %{_bindir}/python %{_datadir}/%{zope_subname}/%{zope_subname}.pyo \$*
43EOF
44
45# sometimes .py needed
46# rm -f $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}/*.py
47# rm -f $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}/Plugins/*.py
48
49%clean
50rm -rf $RPM_BUILD_ROOT
51
52%post
d9f7891a
JB
53if ! grep -qs zopeedit /etc/mailcap ; then
54 umask 022
8ba5753d 55 echo "application/x-zope-edit; /usr/bin/zopeedit %%s ; test=test -x /usr/bin/zopeedit" >> /etc/mailcap
56fi
57
58%postun
d9f7891a
JB
59if [ "$1" = "0" ]; then
60 if grep -qs zopeedit /etc/mailcap ; then
61 umask 022
62 grep -v '^application/x-zope-edit; /usr/bin/zopeedit %%s ; test=test -x /usr/bin/zopeedit$' /etc/mailcap >> /etc/mailcap_new
63 mv -f /etc/mailcap_new /etc/mailcap
64 fi
7b5dc062 65fi
8ba5753d 66
67%files
68%defattr(644,root,root,755)
1f215146 69%doc CHANGES.txt INSTALL-UNIX.txt README.txt
8ba5753d 70%attr(755,root,root) %{_bindir}/%{zope_subname}
71%{_datadir}/%{zope_subname}
72%{_mandir}/man1/*
This page took 0.0682970000000001 seconds and 4 git commands to generate.