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