]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - split /usr/share/perl* part into perl-ack subpackage | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without tests # do not perform "make test" | |
6 | %bcond_with pty_tests # do not perform tests requiring a pty | |
7 | # | |
8 | %define pdir ack | |
9 | Summary: grep-like text finder | |
10 | Summary(pl.UTF-8): produkt grepopodobny | |
11 | Name: ack | |
12 | Version: 2.28 | |
13 | Release: 1 | |
14 | License: GPL v1+ or Artistic | |
15 | Group: Development/Languages/Perl | |
16 | Source0: http://www.cpan.org/modules/by-authors/id/P/PE/PETDANCE/%{name}-%{version}.tar.gz | |
17 | # Source0-md5: 5c363d701cb40cbc3806441b2a887b43 | |
18 | Patch0: %{name}-deps.patch | |
19 | Patch1: %{name}-interactive-tests.patch | |
20 | URL: http://betterthangrep.com/ | |
21 | Requires: perl-ack = %{version} | |
22 | %if %{with tests} | |
23 | BuildRequires: perl-File-Next >= 1.16 | |
24 | %{?with_pty_tests:BuildRequires: perl-IO-Tty} | |
25 | BuildRequires: perl-Test-Simple >= 0.98 | |
26 | %endif | |
27 | BuildRequires: perl-devel >= 1:5.8.0 | |
28 | BuildRequires: perl-perldoc | |
29 | BuildRequires: rpm-perlprov >= 4.1-13 | |
30 | BuildArch: noarch | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | Ack is designed as a replacement for 99% of the uses of grep. | |
35 | ||
36 | Ack searches the named input FILEs (or standard input if no files are | |
37 | named, or the file name - is given) for lines containing a match to | |
38 | the given PATTERN. By default, ack prints the matching lines. | |
39 | ||
40 | Ack can also list files that would be searched, without actually | |
41 | searching them, to let you take advantage of ack's file-type filtering | |
42 | capabilities. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | ack jest narzędziem podobnym do grepa, zaprojektowanym dla | |
46 | programistów pracujących z dużymi drzewami różnorodnych plików. | |
47 | ||
48 | ack jest napisany w czystym perlu i korzysta z potęgi wyrażeń | |
49 | regularnych tego języka. | |
50 | ||
51 | %package -n perl-ack | |
52 | Summary: ack perl library | |
53 | Summary(pl.UTF-8): biblioteka ack dla języka perl | |
54 | Group: Development/Languages/Perl | |
55 | ||
56 | %description -n perl-ack | |
57 | ack perl library. | |
58 | ||
59 | %description -n perl-ack -l pl.UTF-8 | |
60 | ack perl library. | |
61 | ||
62 | %prep | |
63 | %setup -q -n %{pdir}-%{version} | |
64 | %patch0 -p0 | |
65 | %patch1 -p0 | |
66 | ||
67 | %build | |
68 | %{__perl} Makefile.PL \ | |
69 | INSTALLDIRS=vendor | |
70 | %{__make} \ | |
71 | CC="%{__cc}" \ | |
72 | OPTIMIZE="%{rpmcflags}" | |
73 | ||
74 | %{?with_tests:%{!?with_pty_tests: RUN_INTERACTIVE=0} %{__make} -j1 test} | |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %{__make} pure_install \ | |
80 | DESTDIR=$RPM_BUILD_ROOT | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %files | |
86 | %defattr(644,root,root,755) | |
87 | %doc Changes README.md | |
88 | %attr(755,root,root) %{_bindir}/ack | |
89 | %{_mandir}/man1/ack.1p* | |
90 | ||
91 | %files -n perl-ack | |
92 | %defattr(644,root,root,755) | |
93 | %{perl_vendorlib}/App/Ack.pm | |
94 | %{perl_vendorlib}/App/Ack |