summaryrefslogtreecommitdiff
path: root/parallel.spec
blob: 2cc82f544d650ac6063d3eb501a6476207620aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Summary:	Shell tool for executing jobs in parallel
Name:		parallel
Version:	20200122
Release:	1
License:	GPL v3+
Group:		Applications/System
Source0:	https://ftp.gnu.org/gnu/parallel/%{name}-%{version}.tar.bz2
# Source0-md5:	c2649715d1fb099a70f6c0402071b31f
URL:		https://www.gnu.org/software/parallel/
BuildRequires:	perl-tools-pod
BuildRequires:	rpm-perlprov
BuildArch:	noarch
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
GNU Parallel is a shell tool for executing jobs in parallel using one
or more machines. A job is typically a single command or a small
script that has to be run for each of the lines in the input. The
typical input is a list of files, a list of hosts, a list of users, or
a list of tables.

If you use xargs today you will find GNU Parallel very easy to use. If
you write loops in shell, you will find GNU Parallel may be able to
replace most of the loops and make them run faster by running jobs in
parallel. If you use ppss or pexec you will find GNU Parallel will
often make the command easier to read.

GNU Parallel also makes sure output from the commands is the same
output as you would get had you run the commands sequentially. This
makes it possible to use output from GNU Parallel as input for other
programs.

GNU Parallel is command-line-compatible with moreutils' parallel, but
offers additional features.

%package -n env_parallel
Summary:	env_parallel
Group:		Applications/System
Requires:	%{name} = %{version}-%{release}

%description -n env_parallel
env_parallel is a shell function that exports the current environment
to GNU parallel.

%prep
%setup -q

%{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' src/{parallel,sem}
%{__sed} -i -e '1{\@^#!@d}' src/env_parallel.*
%{__sed} -i -e '1s,^#!/usr/bin/env ,#!/bin/,' src/env_* src/parset

%build
%configure
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_sysconfdir}/parallel
%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

mv $RPM_BUILD_ROOT%{_mandir}/man1/{sql,parallel-sql}.1
touch $RPM_BUILD_ROOT%{_sysconfdir}/parallel/config
rm -rv $RPM_BUILD_ROOT%{_docdir}/parallel

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc README NEWS
%doc src/parallel.html src/sem.html src/sql.html src/niceload.html
%doc src/*.texi
%dir %{_sysconfdir}/parallel
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/parallel/config
%attr(755,root,root) %{_bindir}/niceload
%attr(755,root,root) %{_bindir}/parallel
%attr(755,root,root) %{_bindir}/parcat
%attr(755,root,root) %{_bindir}/parset
%attr(755,root,root) %{_bindir}/sem
%attr(755,root,root) %{_bindir}/sql
%{_mandir}/man1/niceload.1*
%{_mandir}/man1/parallel.1*
%{_mandir}/man1/parallel-sql.1*
%{_mandir}/man1/parcat.1*
%{_mandir}/man1/parset.1*
%{_mandir}/man1/sem.1*
%{_mandir}/man7/parallel_alternatives.7*
%{_mandir}/man7/parallel_book.7*
%{_mandir}/man7/parallel_design.7*
%{_mandir}/man7/parallel_tutorial.7*

%files -n env_parallel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/env_parallel
%attr(755,root,root) %{_bindir}/env_parallel.ash
%attr(755,root,root) %{_bindir}/env_parallel.bash
%attr(755,root,root) %{_bindir}/env_parallel.csh
%attr(755,root,root) %{_bindir}/env_parallel.dash
%attr(755,root,root) %{_bindir}/env_parallel.fish
%attr(755,root,root) %{_bindir}/env_parallel.ksh
%attr(755,root,root) %{_bindir}/env_parallel.mksh
%attr(755,root,root) %{_bindir}/env_parallel.pdksh
%attr(755,root,root) %{_bindir}/env_parallel.sh
%attr(755,root,root) %{_bindir}/env_parallel.tcsh
%attr(755,root,root) %{_bindir}/env_parallel.zsh
%{_mandir}/man1/env_parallel.1*