]> git.pld-linux.org Git - packages/john.git/blob - john.spec
- fix path to john.conf and *.chr files (john now works on amd64)
[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 Requires:       words
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 John the Ripper is a password cracker, currently available for UNIX,
31 DOS, WinNT/Win95. Its primary purpose is to detect weak UNIX
32 passwords. It has been tested with Linux x86/Alpha/SPARC, FreeBSD x86,
33 OpenBSD x86, Solaris 2.x SPARC and x86, Digital UNIX, AIX, HP-UX, and
34 IRIX.
35
36 %description -l pl
37 John The Ripper jest "³amaczem" hase³ dostêpnym dla systemów UNIX,
38 DOS, WinNT/Win95. G³ównym jego zadaniem jest wykrywanie "s³abych"
39 hase³. By³ testowany z Linux x86/Alpha/SPARC, FreeBSD x86, OpenBSD x86,
40 Solaris 2.x SPARC i x86, Digital UNIX, AIX, HP-UX oraz IRIX.
41
42 %prep
43 %setup -q -a1
44 %patch0 -p1
45 #%patch1 -p1
46 #%patch2 -p1
47 # or move it to /var maybe?
48 sed -i -e 's,/usr/lib,%{_libdir},' src/params.h run/john.conf
49
50 %build
51 cd src
52 COPT="%{rpmcflags}"
53
54 # bleh... MMX code must be chosen at compile time :(
55 # cannot use MMX for generic i586 nor i686 (Pentium/Pentium Pro have no MMX)
56 # K6 optimization exists only in Makefile
57 %ifarch %{ix86}
58         %if %{with mmx}
59                 TARG=linux-x86-mmx-elf
60         %else
61                 TARG=linux-x86-any-elf
62         %endif
63 %else
64         %ifarch alpha
65                 TARG=linux-alpha
66         %else
67                 %ifarch sparc64
68                         TARG=linux-sparc
69                 %else
70                         %ifarch amd64
71                                 TARG=linux-x86-64
72                         %else
73                                 TARG=generic
74                         %endif  
75                 %endif
76         %endif
77 %endif
78
79 %{__make} $TARG \
80         OPT="$COPT" \
81         CC="%{__cc}"
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/john}
86 install run/john.conf john-1.6/run/*.chr $RPM_BUILD_ROOT%{_libdir}/john
87 install run/john $RPM_BUILD_ROOT%{_bindir}
88
89 rm -f doc/INSTALL
90
91 cd $RPM_BUILD_ROOT%{_bindir}
92 ln -sf john unafs
93 ln -sf john unique
94 ln -sf john unshadow
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %files
100 %defattr(644,root,root,755)
101 %doc doc/* john-1.6/doc/{CONFIG,EXAMPLES,EXTERNAL,FAQ,MODES,NEWS,OPTIONS,RULES} run/mailer
102 %attr(755,root,root) %{_bindir}/*
103 %{_libdir}/john
This page took 0.058187 seconds and 4 git commands to generate.