]> git.pld-linux.org Git - packages/john.git/blame - john.spec
- added jumbo version dependencies, gomp and opencl bconds
[packages/john.git] / john.spec
CommitLineData
b282b6dc
JB
1# TODO:
2# - MPI support (if with jumbo)
3# - CUDA support on bcond (if with jumbo)
94f3ed69 4#
d502d3d5 5# Conditional build:
2489275f 6%bcond_without jumbo # Build community-enhanced version with lots of contributed
20299915
JB
7 # patches adding support for over 30
8 # of additional hash types, and more.
b282b6dc
JB
9%bcond_without gomp # OpenMP support (in jumbo version)
10%bcond_without opencl # OpenCL support (in jumbo version)
20299915
JB
11%bcond_with avx # use x86 AVX instructions
12%bcond_with xop # use x86 XOP instructions
13%bcond_with altivec # use PPC Altivec instructions
3dbf4b73 14
0d881e9e 15%if %{without jumbo}
532ea34a
JB
16%ifarch i586 i686 athlon pentium2 pentium3 pentium4
17%define do_mmx 1
18%else
3dbf4b73 19%define do_mmx 0
532ea34a 20%endif
3dbf4b73
ER
21%ifarch i686 athlon pentium4
22%define do_sse2 1
20299915 23%else
3dbf4b73 24%define do_sse2 0
20299915 25%endif
532ea34a
JB
26%ifarch i586 i686
27%define do_mmxfb 1
3dbf4b73 28%define optmmxfb -DCPU_FALLBACK=1
532ea34a
JB
29%else
30%define do_mmxfb 0
31%undefine optmmxfb
d940cdff 32%endif
20299915 33%ifarch i686 athlon
3dbf4b73
ER
34%define do_ssefb 1
35%define optssefb -DCPU_FALLBACK=1
20299915 36%else
3dbf4b73
ER
37%define do_ssefb 0
38%define optssefb %{nil}
20299915 39%endif
0d881e9e 40%endif
3dbf4b73 41
00a4c442 42Summary: Password cracker
25772a4c 43Summary(pl.UTF-8): Łamacz haseł
00a4c442 44Name: john
3dbf4b73 45Version: 1.8.0
2489275f 46Release: 1
20299915 47License: GPL v2
94f3ed69 48Group: Applications/System
3dbf4b73
ER
49Source0: http://www.openwall.com/john/j/%{name}-%{version}.tar.xz
50# Source0-md5: a4086df68f51778782777e60407f1869
2489275f
JR
51Source1: http://www.openwall.com/john/j/%{name}-%{version}-jumbo-1.tar.xz
52# Source1-md5: 1d6b22ec41a12cdcd62ad6eae3e77345
53Source2: http://www.openwall.com/john/j/%{name}-extra-20130529.tar.xz
07bb9115 54# Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4
18fb1460 55Patch0: %{name}-mailer.patch
3443e32b 56Patch1: optflags.patch
4b4e0bd3
JR
57Patch2: jumbo-optflags.patch
58Patch3: jumbo-x32.patch
ad326883 59URL: http://www.openwall.com/john/
4380352b 60BuildRequires: rpmbuild(macros) >= 1.213
3dbf4b73
ER
61BuildRequires: tar >= 1:1.22
62BuildRequires: xz
b282b6dc
JB
63%if %{with jumbo}
64%{?with_opencl:BuildRequires: OpenCL-devel}
65BuildRequires: bzip2-devel
66%{?with_gomp:BuildRequires: gcc >= 6:4.2}
67BuildRequires: gmp-devel
68%{?with_gomp:BuildRequires: libgomp-devel}
69# for SIPdump and vncpcap2john binaries, which are not packaged
70#BuildRequires: libpcap-devel
71BuildRequires: openssl-devel >= 0.9.7
72BuildRequires: pkgconfig
73%ifarch %{ix86} %{x8664} x32
74BuildRequires: yasm
75%endif
76BuildRequires: zlib-devel
77%endif
53d2a984 78Requires: words
6ba1637d
JB
79%ifarch %{ix86} %{x8664}
80%if %{with xop}
81Requires: cpuinfo(xop)
82%endif
83%if %{with xop} || %{with avx}
84Requires: cpuinfo(avx)
85%endif
057ac041 86%if %{without jumbo}
6ba1637d
JB
87%if %{do_sse2} && !%{do_ssefb}
88Requires: cpuinfo(sse2)
89%endif
90%endif
057ac041 91%endif
fbb20392 92BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
00a4c442 93
94%description
8e3a118d
JB
95John the Ripper is a fast password cracker, currently available for
96many flavors of Unix (11 are officially supported, not counting
97different architectures), DOS, Win32, BeOS, and OpenVMS (the latter
98requires a contributed patch). Its primary purpose is to detect weak
99Unix passwords. Besides several crypt(3) password hash types most
100commonly found on various Unix flavors, supported out of the box are
101Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with
102contributed patches.
e73a58f8 103
15ea9c6b
JR
104%description -l pl.UTF-8
105John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu
106rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych
8e3a118d 107architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga
15ea9c6b
JR
108łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych.
109Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych
110na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz
111Windows NT/2000/XP LM, a także kilka innych przy użyciu łat.
e73a58f8 112
00a4c442 113%prep
2489275f 114%setup -q -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2
00a4c442 115%patch0 -p1
2489275f 116%{!?with_jumbo:%patch1 -p1}
4b4e0bd3
JR
117%{?with_jumbo:%patch2 -p1}
118%{?with_jumbo:%patch3 -p1}
18fb1460 119
3dbf4b73
ER
120mv john-extra-*/*.chr run
121
20299915 122%{__rm} doc/INSTALL
3443e32b 123
00a4c442 124%build
125cd src
94f3ed69 126
2489275f 127%if %{with jumbo}
4b4e0bd3
JR
128%ifarch x32
129ax_intel_x32=yes \
130%endif
b282b6dc
JB
131%configure \
132 %{!?with_opencl:--disable-opencl} \
133 %{!?with_gomp:--disable-openmp}
2489275f
JR
134%{__make}
135%else
582fa295
ER
136cat > defs.h <<'EOF'
137#define JOHN_SYSTEMWIDE 1
138#define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
139EOF
140
532ea34a
JB
141%if %{do_mmxfb}
142%{__make} linux-x86-any \
3443e32b 143 CC="%{__cc}" \
582fa295 144 OPTFLAGS="%{rpmcflags} -include defs.h"
532ea34a
JB
145mv ../run/john ../run/john-non-mmx
146%{__make} clean
147%endif
148
20299915
JB
149%if %{do_ssefb}
150%{__make} linux-x86-mmx \
151 CC="%{__cc}" \
152 OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}"
153mv ../run/john ../run/john-non-sse
5951e27b 154%{__make} clean
20299915
JB
155%endif
156
3443e32b 157TARG=generic
20299915
JB
158%ifarch %{x8664}
159 TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
160%endif
161%ifarch %{ix86}
162 %if %{with xop} || %{with avx}
163 TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
94f3ed69 164 %else
20299915
JB
165 %if %{do_sse2}
166 TARG=linux-x86-sse2
167 %else
168 %if %{do_mmx}
169 TARG=linux-x86-mmx
170 %else
171 TARG=linux-x86-any
172 %endif
173 %endif
94f3ed69 174 %endif
3443e32b 175%endif
20299915
JB
176%ifarch ppc
177 TARG=linux-ppc32%{?with_altivec:-altivec}
178%endif
179%ifarch ppc64
180 TARG=linux-ppc64%{?with_altivec:-altivec}
181%endif
3443e32b
ER
182%ifarch alpha
183 TARG=linux-alpha
184%endif
20299915
JB
185%ifarch ia64
186 TARG=linux-ia64
187%endif
3443e32b
ER
188%ifarch sparc sparcv9
189 TARG=linux-sparc
190%endif
94f3ed69 191
c4418ed8 192%{__make} $TARG \
3443e32b 193 CC="%{__cc}" \
582fa295 194 OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
2489275f 195%endif
94f3ed69 196
00a4c442 197%install
198rm -rf $RPM_BUILD_ROOT
18fb1460 199install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
3443e32b
ER
200cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
201install -p run/john $RPM_BUILD_ROOT%{_bindir}
0d881e9e 202
4b4e0bd3 203%if %{without jumbo}
532ea34a 204%if %{do_mmxfb}
20299915
JB
205install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
206%endif
207%if %{do_ssefb}
208install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
532ea34a 209%endif
4b4e0bd3 210%endif
d940cdff 211
3443e32b
ER
212ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
213ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
214ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
00a4c442 215
216%clean
217rm -rf $RPM_BUILD_ROOT
218
219%files
220%defattr(644,root,root,755)
1f693868 221%doc doc/* run/mailer
3443e32b
ER
222%attr(755,root,root) %{_bindir}/john
223%attr(755,root,root) %{_bindir}/unafs
224%attr(755,root,root) %{_bindir}/unique
225%attr(755,root,root) %{_bindir}/unshadow
4b4e0bd3 226%if %{without jumbo}
20299915 227%if %{do_mmxfb} || %{do_ssefb}
532ea34a 228%dir %{_libdir}/john
20299915 229%if %{do_mmxfb}
532ea34a
JB
230%attr(755,root,root) %{_libdir}/john/john-non-mmx
231%endif
20299915
JB
232%if %{do_ssefb}
233%attr(755,root,root) %{_libdir}/john/john-non-sse
234%endif
d0c69092 235%endif
4b4e0bd3 236%endif
18fb1460 237%{_datadir}/john
This page took 0.118905 seconds and 4 git commands to generate.