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