]> git.pld-linux.org Git - packages/john.git/blob - john.spec
- use non-mmx exec fallback on i[56]86
[packages/john.git] / john.spec
1 #
2 %ifarch i586 i686 athlon pentium2 pentium3 pentium4
3 %define do_mmx 1
4 %else
5 %define do_mmx 0
6 %endif
7 %ifarch i586 i686
8 %define do_mmxfb 1
9 %define optmmxfb        -DCPU_FALLBACK=1
10 %else
11 %define do_mmxfb 0
12 %undefine optmmxfb
13 %endif
14 Summary:        Password cracker
15 Summary(pl):    £amacz hase³
16 Name:           john
17 Version:        1.7
18 Release:        0.2
19 License:        GPL
20 Group:          Applications/System
21 Source0:        http://www.openwall.com/john/d/%{name}-%{version}.tar.bz2
22 # Source0-md5:  615b912caa677eec790e28745a12b2ae
23 Patch0:         %{name}-mailer.patch
24 URL:            http://www.openwall.com/john/
25 BuildRequires:  rpmbuild(macros) >= 1.213
26 BuildRequires:  sed >= 4.0
27 Requires:       words
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 John the Ripper is a password cracker, currently available for UNIX,
32 DOS, WinNT/Win95. Its primary purpose is to detect weak UNIX
33 passwords. It has been tested with Linux x86/Alpha/SPARC, FreeBSD x86,
34 OpenBSD x86, Solaris 2.x SPARC and x86, Digital UNIX, AIX, HP-UX, and
35 IRIX.
36
37 %description -l pl
38 John The Ripper jest "³amaczem" hase³ dostêpnym dla systemów UNIX,
39 DOS, WinNT/Win95. G³ównym jego zadaniem jest wykrywanie "s³abych"
40 hase³. By³ testowany z Linux x86/Alpha/SPARC, FreeBSD x86, OpenBSD x86,
41 Solaris 2.x SPARC i x86, Digital UNIX, AIX, HP-UX oraz IRIX.
42
43 %prep
44 %setup -q 
45 %patch0 -p1
46
47 sed -i -e 's/CLK_TCK/CLOCKS_PER_SEC/g' src/*.c
48
49 %build
50 cd src
51
52 %if %{do_mmxfb}
53 %{__make} linux-x86-any \
54         CFLAGS="-c -Wall -fomit-frame-pointer %{rpmcflags} -DJOHN_SYSTEMWIDE=1" \
55         CC="%{__cc}"
56 mv ../run/john ../run/john-non-mmx
57 %{__make} clean
58 %endif
59
60 %ifarch %{ix86}
61         %if %{do_mmx}
62                 TARG=linux-x86-mmx
63         %else
64                 TARG=linux-x86-any
65         %endif
66 %else
67         %ifarch alpha
68                 TARG=linux-alpha
69         %else
70                 %ifarch sparc sparcv9
71                         TARG=linux-sparc
72                 %else
73                         %ifarch %{x8664}
74                                 TARG=linux-x86-64
75                         %else
76                                 TARG=generic
77                         %endif  
78                 %endif
79         %endif
80 %endif
81
82 %{__make} $TARG \
83         CFLAGS="-c -Wall -fomit-frame-pointer %{rpmcflags} -DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\"%{_libdir}/john\\\" %{?optmmxfb}" \
84         CC="%{__cc}"
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88
89 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
90 install run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
91 install run/john $RPM_BUILD_ROOT%{_bindir}
92 %if %{do_mmxfb}
93 install -d $RPM_BUILD_ROOT%{_libdir}/john
94 install run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john
95 %endif
96
97 rm -f doc/INSTALL
98
99 cd $RPM_BUILD_ROOT%{_bindir}
100 ln -sf john unafs
101 ln -sf john unique
102 ln -sf john unshadow
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %files
108 %defattr(644,root,root,755)
109 %doc doc/* run/mailer
110 %attr(755,root,root) %{_bindir}/*
111 %if %{do_mmxfb}
112 %dir %{_libdir}/john
113 %attr(755,root,root) %{_libdir}/john/john-non-mmx
114 %endif
115 %{_datadir}/john
This page took 0.054239 seconds and 4 git commands to generate.