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