]> git.pld-linux.org Git - packages/john.git/blob - john.spec
f7a895a4614f50ee8019c25f78094127905c16b9
[packages/john.git] / john.spec
1 #
2 # Conditional build:
3 %bcond_with     mmx     # MMX optimization
4 # Optimization must be chosen at compile time :(
5 # Maybe some patch...? But not yet.
6 #
7 %ifarch athlon
8 %define with_mmx 1
9 %endif
10 Summary:        Password cracker
11 Summary(pl):    £amacz hase³
12 Name:           john
13 Version:        1.6.37
14 Release:        7
15 License:        GPL
16 Group:          Applications/System
17 Source0:        http://www.openwall.com/john/a/%{name}-%{version}.tar.gz
18 # Source0-md5:  9403233b640927295c05b0564ff1f678
19 # needed for docs and charset files
20 Source1:        http://www.openwall.com/john/%{name}-1.6.tar.gz
21 # Source1-md5:  aae782f160041b2bdc624b0a84054e32
22 Patch0:         %{name}-1.6.PLD.diff
23 Patch1:         %{name}-1.6.ini.diff
24 Patch2:         %{name}-1.6.makefile.diff
25 URL:            http://www.openwall.com/john/
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 -a1
45 %patch0 -p1
46 #%patch1 -p1
47 #%patch2 -p1
48 # or move it to /var maybe?
49 sed -i -e 's,/usr/lib,%{_libdir},' src/params.h run/john.conf
50
51 %build
52 cd src
53 COPT="%{rpmcflags}"
54
55 # bleh... MMX code must be chosen at compile time :(
56 # cannot use MMX for generic i586 nor i686 (Pentium/Pentium Pro have no MMX)
57 # K6 optimization exists only in Makefile
58 %ifarch %{ix86}
59         %if %{with mmx}
60                 TARG=linux-x86-mmx-elf
61         %else
62                 TARG=linux-x86-any-elf
63         %endif
64 %else
65         %ifarch alpha
66                 TARG=linux-alpha
67         %else
68                 %ifarch sparc64
69                         TARG=linux-sparc
70                 %else
71                         %ifarch amd64
72                                 TARG=linux-x86-64
73                         %else
74                                 TARG=generic
75                         %endif  
76                 %endif
77         %endif
78 %endif
79
80 %{__make} $TARG \
81         OPT="$COPT" \
82         CC="%{__cc}"
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/john}
87 install run/john.conf john-1.6/run/*.chr $RPM_BUILD_ROOT%{_libdir}/john
88 install run/john $RPM_BUILD_ROOT%{_bindir}
89
90 rm -f doc/INSTALL
91
92 cd $RPM_BUILD_ROOT%{_bindir}
93 ln -sf john unafs
94 ln -sf john unique
95 ln -sf john unshadow
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %files
101 %defattr(644,root,root,755)
102 %doc doc/* john-1.6/doc/{CONFIG,EXAMPLES,EXTERNAL,FAQ,MODES,NEWS,OPTIONS,RULES} run/mailer
103 %attr(755,root,root) %{_bindir}/*
104 %{_libdir}/john
This page took 0.05774 seconds and 2 git commands to generate.