]>
Commit | Line | Data |
---|---|---|
898ebeee JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # don't run tests | |
4 | ||
ad8bac55 AM |
5 | Summary: A statistical, numerical and textual operations tool |
6 | Name: datamash | |
7 | Version: 1.6 | |
8 | Release: 0.1 | |
9 | License: GPL v3+ | |
898ebeee | 10 | Group: Applications |
ad8bac55 | 11 | Source0: http://ftp.gnu.org/gnu/datamash/%{name}-%{version}.tar.gz |
898ebeee JP |
12 | # Source0-md5: c3c243278a2f35de5ce988c844f8e240 |
13 | URL: https://www.gnu.org/software/datamash/ | |
14 | BuildRequires: gettext-tools | |
ad8bac55 | 15 | BuildRequires: pkgconfig |
898ebeee JP |
16 | %if %{with tests} |
17 | BuildRequires: perl-base | |
18 | BuildRequires: perl-modules | |
19 | BuildRequires: rpm-build >= 4.6 | |
20 | %endif | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
ad8bac55 AM |
22 | |
23 | %description | |
898ebeee JP |
24 | GNU datamash is a command-line program which performs basic numeric, |
25 | textual and statistical operations on input textual data files. | |
26 | ||
27 | %package -n bash-completion-datamash | |
28 | Summary: Bash completion for datamash command line | |
29 | Group: Applications/Shells | |
30 | Requires: %{name} = %{version}-%{release} | |
31 | Requires: bash-completion >= 1:2.0 | |
32 | BuildArch: noarch | |
33 | ||
34 | %description -n bash-completion-datamash | |
35 | Bash completion for datamash command line. | |
ad8bac55 AM |
36 | |
37 | %prep | |
898ebeee | 38 | %setup -q |
ad8bac55 AM |
39 | |
40 | %build | |
898ebeee JP |
41 | %configure \ |
42 | --with-bash-completion-dir="%{bash_compdir}" | |
43 | ||
ad8bac55 AM |
44 | %{__make} |
45 | ||
898ebeee JP |
46 | %{?with_tests:%{__make} check} |
47 | ||
ad8bac55 AM |
48 | %install |
49 | rm -rf $RPM_BUILD_ROOT | |
898ebeee JP |
50 | |
51 | install -d $RPM_BUILD_ROOT%{bash_compdir} | |
52 | ||
ad8bac55 AM |
53 | %{__make} install \ |
54 | DESTDIR=$RPM_BUILD_ROOT | |
898ebeee | 55 | |
ad8bac55 | 56 | %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir |
ad8bac55 | 57 | |
898ebeee JP |
58 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/examples |
59 | ||
60 | %find_lang %{name} | |
ad8bac55 AM |
61 | |
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
898ebeee JP |
65 | %post -p /sbin/postshell |
66 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
ad8bac55 | 67 | |
898ebeee JP |
68 | %postun -p /sbin/postshell |
69 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
ad8bac55 AM |
70 | |
71 | %files -f %{name}.lang | |
72 | %defattr(644,root,root,755) | |
898ebeee | 73 | %doc AUTHORS ChangeLog NEWS README THANKS TODO examples |
ad8bac55 | 74 | %attr(755,root,root) %{_bindir}/datamash |
898ebeee | 75 | %{_infodir}/datamash.info* |
ad8bac55 | 76 | %{_mandir}/man1/datamash.1* |
898ebeee JP |
77 | |
78 | %files -n bash-completion-datamash | |
79 | %defattr(644,root,root,755) | |
80 | %{bash_compdir}/datamash |