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