4569c8b60c554bb5a77435a7e268fd4aa2dd1808
[packages/Zope-zopeedit.git] / Zope-zopeedit.spec
1 %define         zope_subname    zopeedit
2 Summary:        Client-side helper application for ExternalEditor Zope product
3 Summary(pl.UTF-8):      Aplikacja kliencka dla ExternalEditor, produktu Zope
4 Name:           Zope-%{zope_subname}
5 Version:        0.9.3
6 Release:        1
7 License:        ZPL 2.0
8 Group:          Development/Tools
9 Source0:        http://plope.com/software/ExternalEditor/%{zope_subname}-%{version}-src.tgz
10 # Source0-md5:  25dbf5438c27266a2a0840834f9bcd36
11 URL:            http://plope.com/software/ExternalEditor/
12 Requires(post,postun):  grep
13 Requires(postun):       fileutils
14 BuildRequires:  python
15 %pyrequires_eq  python-modules
16 Requires:       python-tkinter
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
23 %description -l pl.UTF-8
24 Aplikacja kliencka dla ExternalEditor, produktu Zope
25
26 %prep
27 %setup -q -n %{zope_subname}-%{version}
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
34 cp -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
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
53 if ! 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
56 fi
57
58 %postun
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
65 fi
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.066777 seconds and 2 git commands to generate.