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