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