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