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