]> git.pld-linux.org Git - packages/john.git/blame_incremental - john.spec
- added jumbo version dependencies, gomp and opencl bconds
[packages/john.git] / john.spec
... / ...
CommitLineData
1# TODO:
2# - MPI support (if with jumbo)
3# - CUDA support on bcond (if with jumbo)
4#
5# Conditional build:
6%bcond_without jumbo # Build community-enhanced version with lots of contributed
7 # patches adding support for over 30
8 # of additional hash types, and more.
9%bcond_without gomp # OpenMP support (in jumbo version)
10%bcond_without opencl # OpenCL support (in jumbo version)
11%bcond_with avx # use x86 AVX instructions
12%bcond_with xop # use x86 XOP instructions
13%bcond_with altivec # use PPC Altivec instructions
14
15%if %{without jumbo}
16%ifarch i586 i686 athlon pentium2 pentium3 pentium4
17%define do_mmx 1
18%else
19%define do_mmx 0
20%endif
21%ifarch i686 athlon pentium4
22%define do_sse2 1
23%else
24%define do_sse2 0
25%endif
26%ifarch i586 i686
27%define do_mmxfb 1
28%define optmmxfb -DCPU_FALLBACK=1
29%else
30%define do_mmxfb 0
31%undefine optmmxfb
32%endif
33%ifarch i686 athlon
34%define do_ssefb 1
35%define optssefb -DCPU_FALLBACK=1
36%else
37%define do_ssefb 0
38%define optssefb %{nil}
39%endif
40%endif
41
42Summary: Password cracker
43Summary(pl.UTF-8): Łamacz haseł
44Name: john
45Version: 1.8.0
46Release: 1
47License: GPL v2
48Group: Applications/System
49Source0: http://www.openwall.com/john/j/%{name}-%{version}.tar.xz
50# Source0-md5: a4086df68f51778782777e60407f1869
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
54# Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4
55Patch0: %{name}-mailer.patch
56Patch1: optflags.patch
57Patch2: jumbo-optflags.patch
58Patch3: jumbo-x32.patch
59URL: http://www.openwall.com/john/
60BuildRequires: rpmbuild(macros) >= 1.213
61BuildRequires: tar >= 1:1.22
62BuildRequires: xz
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
78Requires: words
79%ifarch %{ix86} %{x8664}
80%if %{with xop}
81Requires: cpuinfo(xop)
82%endif
83%if %{with xop} || %{with avx}
84Requires: cpuinfo(avx)
85%endif
86%if %{without jumbo}
87%if %{do_sse2} && !%{do_ssefb}
88Requires: cpuinfo(sse2)
89%endif
90%endif
91%endif
92BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
93
94%description
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.
103
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
107architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga
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.
112
113%prep
114%setup -q -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2
115%patch0 -p1
116%{!?with_jumbo:%patch1 -p1}
117%{?with_jumbo:%patch2 -p1}
118%{?with_jumbo:%patch3 -p1}
119
120mv john-extra-*/*.chr run
121
122%{__rm} doc/INSTALL
123
124%build
125cd src
126
127%if %{with jumbo}
128%ifarch x32
129ax_intel_x32=yes \
130%endif
131%configure \
132 %{!?with_opencl:--disable-opencl} \
133 %{!?with_gomp:--disable-openmp}
134%{__make}
135%else
136cat > defs.h <<'EOF'
137#define JOHN_SYSTEMWIDE 1
138#define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
139EOF
140
141%if %{do_mmxfb}
142%{__make} linux-x86-any \
143 CC="%{__cc}" \
144 OPTFLAGS="%{rpmcflags} -include defs.h"
145mv ../run/john ../run/john-non-mmx
146%{__make} clean
147%endif
148
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
154%{__make} clean
155%endif
156
157TARG=generic
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}}
164 %else
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
174 %endif
175%endif
176%ifarch ppc
177 TARG=linux-ppc32%{?with_altivec:-altivec}
178%endif
179%ifarch ppc64
180 TARG=linux-ppc64%{?with_altivec:-altivec}
181%endif
182%ifarch alpha
183 TARG=linux-alpha
184%endif
185%ifarch ia64
186 TARG=linux-ia64
187%endif
188%ifarch sparc sparcv9
189 TARG=linux-sparc
190%endif
191
192%{__make} $TARG \
193 CC="%{__cc}" \
194 OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
195%endif
196
197%install
198rm -rf $RPM_BUILD_ROOT
199install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
200cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
201install -p run/john $RPM_BUILD_ROOT%{_bindir}
202
203%if %{without jumbo}
204%if %{do_mmxfb}
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
209%endif
210%endif
211
212ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
213ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
214ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
215
216%clean
217rm -rf $RPM_BUILD_ROOT
218
219%files
220%defattr(644,root,root,755)
221%doc doc/* run/mailer
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
226%if %{without jumbo}
227%if %{do_mmxfb} || %{do_ssefb}
228%dir %{_libdir}/john
229%if %{do_mmxfb}
230%attr(755,root,root) %{_libdir}/john/john-non-mmx
231%endif
232%if %{do_ssefb}
233%attr(755,root,root) %{_libdir}/john/john-non-sse
234%endif
235%endif
236%endif
237%{_datadir}/john
This page took 0.111122 seconds and 4 git commands to generate.