]>
Commit | Line | Data |
---|---|---|
d780adba JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir Proc | |
6 | %define pnam InvokeEditor | |
d780adba JR |
7 | Summary: Proc::InvokeEditor - Perl extension for starting a text editor |
8 | Name: perl-Proc-InvokeEditor | |
2539277c | 9 | Version: 1.13 |
d780adba JR |
10 | Release: 1 |
11 | # same as perl | |
12 | License: GPL v1+ or Artistic | |
13 | Group: Development/Languages/Perl | |
14 | Source0: http://www.cpan.org/modules/by-module/Proc/%{pdir}-%{pnam}-%{version}.tar.gz | |
2539277c | 15 | # Source0-md5: 26595c1e1c80ed64f0fb97cceea7e167 |
d780adba JR |
16 | URL: http://search.cpan.org/dist/Proc-InvokeEditor/ |
17 | BuildRequires: perl-devel >= 1:5.8.0 | |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
19 | %if %{with tests} | |
20 | BuildRequires: perl(Carp::Assert) >= 0.11 | |
21 | %endif | |
22 | BuildArch: noarch | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | This module provides the ability to supply some text to an external | |
27 | text editor, have it edited by the user, and retrieve the results. | |
28 | ||
29 | The File::Temp module is used to provide secure, safe temporary | |
30 | files, and File::Temp is set to its highest available level of | |
31 | security. This may cause problems on some systems where no secure | |
32 | temporary directory is available. | |
33 | ||
34 | When the editor is started, no subshell is used. Your path will | |
35 | be scanned to find the binary to use for each editor if the string | |
36 | given does not exist as a file, and if a named editor contains whitespace, | |
37 | eg) if you try to use the editor xemacs -nw, then the string will | |
38 | be split on whitespace and anything after the editor name will be passed | |
39 | as arguments to your editor. A shell is not used but this should cover | |
40 | most simple cases. | |
41 | ||
42 | %prep | |
43 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
44 | ||
45 | %build | |
46 | %{__perl} Makefile.PL \ | |
47 | INSTALLDIRS=vendor | |
48 | %{__make} | |
49 | ||
50 | %{?with_tests:%{__make} test} | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %{__make} pure_install \ | |
56 | DESTDIR=$RPM_BUILD_ROOT | |
57 | ||
58 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
59 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
66 | %doc Changes README | |
67 | %{perl_vendorlib}/Proc/InvokeEditor.pm | |
68 | %{_mandir}/man3/* | |
69 | %{_examplesdir}/%{name}-%{version} |