]> git.pld-linux.org Git - packages/john.git/blob - john.spec
- clean up inspired by Solar Designer
[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.7
14 Release:        0.2
15 License:        GPL
16 Group:          Applications/System
17 Source0:        http://www.openwall.com/john/d/%{name}-%{version}.tar.bz2
18 # Source0-md5:  615b912caa677eec790e28745a12b2ae
19 Patch0:         %{name}-mailer.patch
20 URL:            http://www.openwall.com/john/
21 BuildRequires:  rpmbuild(macros) >= 1.213
22 BuildRequires:  sed >= 4.0
23 Requires:       words
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 John the Ripper is a password cracker, currently available for UNIX,
28 DOS, WinNT/Win95. Its primary purpose is to detect weak UNIX
29 passwords. It has been tested with Linux x86/Alpha/SPARC, FreeBSD x86,
30 OpenBSD x86, Solaris 2.x SPARC and x86, Digital UNIX, AIX, HP-UX, and
31 IRIX.
32
33 %description -l pl
34 John The Ripper jest "³amaczem" hase³ dostêpnym dla systemów UNIX,
35 DOS, WinNT/Win95. G³ównym jego zadaniem jest wykrywanie "s³abych"
36 hase³. By³ testowany z Linux x86/Alpha/SPARC, FreeBSD x86, OpenBSD x86,
37 Solaris 2.x SPARC i x86, Digital UNIX, AIX, HP-UX oraz IRIX.
38
39 %prep
40 %setup -q 
41 %patch0 -p1
42
43 sed -i -e 's/CLK_TCK/CLOCKS_PER_SEC/g' src/*.c
44
45 %build
46 cd src
47
48 # bleh... MMX code must be chosen at compile time :(
49 # cannot use MMX for generic i586 nor i686 (Pentium/Pentium Pro have no MMX)
50 # K6 optimization exists only in Makefile
51 %ifarch %{ix86}
52         %if %{with mmx}
53                 TARG=linux-x86-mmx
54         %else
55                 TARG=linux-x86-any
56         %endif
57 %else
58         %ifarch alpha
59                 TARG=linux-alpha
60         %else
61                 %ifarch sparc64
62                         TARG=linux-sparc
63                 %else
64                         %ifarch %{x8664}
65                                 TARG=linux-x86-64
66                         %else
67                                 TARG=generic
68                         %endif  
69                 %endif
70         %endif
71 %endif
72
73 %{__make} $TARG \
74         CFLAGS="-c -Wall -fomit-frame-pointer %{rpmcflags} -DJOHN_SYSTEMWIDE=1" \
75         CC="%{__cc}"
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
81 install run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
82 install run/john $RPM_BUILD_ROOT%{_bindir}
83
84 rm -f doc/INSTALL
85
86
87 cd $RPM_BUILD_ROOT%{_bindir}
88 ln -sf john unafs
89 ln -sf john unique
90 ln -sf john unshadow
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %files
96 %defattr(644,root,root,755)
97 %doc doc/* run/mailer
98 %attr(755,root,root) %{_bindir}/*
99 %{_datadir}/john
This page took 0.045747 seconds and 4 git commands to generate.