]> git.pld-linux.org Git - packages/Zope-zopeedit.git/blame_incremental - Zope-zopeedit.spec
- up to 0.9.3
[packages/Zope-zopeedit.git] / Zope-zopeedit.spec
... / ...
CommitLineData
1%define zope_subname zopeedit
2Summary: Client-side helper application for ExternalEditor Zope product
3Summary(pl.UTF-8): Aplikacja kliencka dla ExternalEditor, produktu Zope
4Name: Zope-%{zope_subname}
5Version: 0.9.3
6Release: 1
7License: ZPL 2.0
8Group: Development/Tools
9Source0: http://plope.com/software/ExternalEditor/%{zope_subname}-%{version}-src.tgz
10# Source0-md5: 25dbf5438c27266a2a0840834f9bcd36
11URL: http://plope.com/software/ExternalEditor/
12Requires(post,postun): grep
13Requires(postun): fileutils
14BuildRequires: python
15%pyrequires_eq python-modules
16Requires: python-tkinter
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.UTF-8
24Aplikacja kliencka dla ExternalEditor, produktu Zope
25
26%prep
27%setup -q -n %{zope_subname}-%{version}
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
34cp -af {Plugins,version.txt,%{zope_subname}.py} $RPM_BUILD_ROOT%{_datadir}/%{zope_subname}
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
53if ! grep -qs zopeedit /etc/mailcap ; then
54 umask 022
55 echo "application/x-zope-edit; /usr/bin/zopeedit %%s ; test=test -x /usr/bin/zopeedit" >> /etc/mailcap
56fi
57
58%postun
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
65fi
66
67%files
68%defattr(644,root,root,755)
69%doc CHANGES.txt INSTALL-UNIX.txt README.txt
70%attr(755,root,root) %{_bindir}/%{zope_subname}
71%{_datadir}/%{zope_subname}
72%{_mandir}/man1/*
This page took 0.034458 seconds and 4 git commands to generate.