]>
Commit | Line | Data |
---|---|---|
8ba5753d | 1 | %define zope_subname zopeedit |
2 | Summary: Client-side helper application for ExternalEditor Zope product | |
3143c359 | 3 | Summary(pl.UTF-8): Aplikacja kliencka dla ExternalEditor, produktu Zope |
8ba5753d | 4 | Name: Zope-%{zope_subname} |
fb5c4fa8 | 5 | Version: 0.9.1 |
6 | Release: 1 | |
8ba5753d | 7 | License: ZPL 2.0 |
8 | Group: Development/Tools | |
fb5c4fa8 | 9 | Source0: http://plope.com/software/ExternalEditor/%{zope_subname}-%{version}-src.tgz |
10 | # Source0-md5: 4a2f0be43b2e2bb8695504099519310a | |
11 | URL: http://plope.com/software/ExternalEditor/ | |
d9f7891a JB |
12 | Requires(post,postun): grep |
13 | Requires(postun): fileutils | |
b7e6492e | 14 | BuildRequires: python |
8ba5753d | 15 | %pyrequires_eq python-modules |
16 | Requires: python-tkinter | |
8ba5753d | 17 | BuildArch: noarch |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | Client-side helper application for ExternalEditor Zope product | |
22 | ||
db6ec2f8 | 23 | %description -l pl.UTF-8 |
0ed72d96 | 24 | Aplikacja kliencka dla ExternalEditor, produktu Zope |
8ba5753d | 25 | |
26 | %prep | |
fb5c4fa8 | 27 | %setup -q -n %{zope_subname}-%{version} |
8ba5753d | 28 | |
29 | %install | |
30 | rm -rf $RPM_BUILD_ROOT | |
31 | install -d $RPM_BUILD_ROOT{%{_datadir}/%{zope_subname},%{_mandir}/man1,%{_bindir}} | |
32 | ||
33 | install man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
143bee39 | 34 | cp -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 | ||
39 | cat >$RPM_BUILD_ROOT%{_bindir}/%{zope_subname} <<EOF | |
40 | #!/bin/sh | |
41 | ||
42 | exec %{_bindir}/python %{_datadir}/%{zope_subname}/%{zope_subname}.pyo \$* | |
43 | EOF | |
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 | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %post | |
d9f7891a JB |
53 | if ! 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 |
56 | fi | |
57 | ||
58 | %postun | |
d9f7891a JB |
59 | if [ "$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 | 65 | fi |
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/* |