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