X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=john.spec;h=7165061ccebd02114faf3062aa5ed7005551aeb8;hb=refs%2Fheads%2FRA-branch;hp=0605bd77257824f84d112de480b212a8b5a68089;hpb=fbb20392e220557c96151d63fe4519748368e027;p=packages%2Fjohn.git diff --git a/john.spec b/john.spec index 0605bd7..7165061 100644 --- a/john.spec +++ b/john.spec @@ -1,67 +1,96 @@ +# +# Conditional build: +%bcond_with mmx # MMX optimization +# Optimization must be chosen at compile time :( +# Maybe some patch...? But not yet. +# +%ifarch athlon +%define with_mmx 1 +%endif +%ifnarch %{x86} +%undefine with_mmx +%endif Summary: Password cracker Summary(pl): £amacz hase³ Name: john -Version: 1.6 -Release: 4 -Copyright: GPL -Group: Utilities/System -Group(pl): Narzêdzia/System -Source: http://www.openwall.com/john//%{name}-%{version}.tar.gz -Patch0: %{name}-%{version}.PLD.diff -Patch1: %{name}-%{version}.ini.diff -Patch2: %{name}-%{version}.makefile.diff +Version: 1.6.37 +Release: 2 +License: GPL +Group: Applications/System +Source0: http://www.openwall.com/john/a/%{name}-%{version}.tar.gz +# Source0-md5: 9403233b640927295c05b0564ff1f678 +# needed for docs and charset files +Source1: http://www.openwall.com/john/%{name}-1.6.tar.gz +# Source1-md5: aae782f160041b2bdc624b0a84054e32 +Patch0: %{name}-1.6.PLD.diff +Patch1: %{name}-1.6.ini.diff +Patch2: %{name}-1.6.makefile.diff BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -John the Ripper is a password cracker, currently available for UNIX, DOS, -WinNT/Win95. Its primary purpose is to detect weak UNIX passwords. It has -been tested with Linux x86/Alpha/SPARC, FreeBSD x86, OpenBSD x86, Solaris -2.x SPARC and x86, Digital UNIX, AIX, HP-UX, and IRIX. - +John the Ripper is a password cracker, currently available for UNIX, +DOS, WinNT/Win95. Its primary purpose is to detect weak UNIX +passwords. It has been tested with Linux x86/Alpha/SPARC, FreeBSD x86, +OpenBSD x86, Solaris 2.x SPARC and x86, Digital UNIX, AIX, HP-UX, and +IRIX. + %description -l pl -John The Ripper jest "³amaczem" hase³ dostêpnym dla systemów UNIX, DOS, -WinNT/Win95. G³ównym jego zadaniem jest wykrywanie "s³abych" hase³. - +John The Ripper jest "³amaczem" hase³ dostêpnym dla systemów UNIX, +DOS, WinNT/Win95. G³ównym jego zadaniem jest wykrywanie "s³abych" +hase³. By³ testowany z Linux x86/Alpha/SPARC, FreeBSD x86, OpenBSD x86, +Solaris 2.x SPARC i x86, Digital UNIX, AIX, HP-UX oraz IRIX. + %prep -%setup -q +%setup -q -a1 +# -n %{name}-1.6 %patch0 -p1 -%patch1 -p1 -%patch2 -p1 +#%patch1 -p1 +#%patch2 -p1 %build cd src -# Hmm. I don't know what is in /proc/cpuinfo on other processors than Intel MMX -if grep -q "MMX" /proc/cpuinfo; then - make OPT="$RPM_OPT_FLAGS" linux-x86-mmx-elf -elif grep -q "K6" /proc/cpuinfo; then - make OPT="$RPM_OPT_FLAGS" linux-x86-k6-elf -elif grep -q "Alpha" /proc/cpuinfo; then - make OPT="$RPM_OPT_FLAGS" linux-alpha -elif grep -q "SPARC" /proc/cpuinfo; then - make OPT="$RPM_OPT_FLAGS" linux-sparc -else - make OPT="$RPM_OPT_FLAGS" linux-x86-any-elf -fi - +COPT="%{rpmcflags}" + +# bleh... MMX code must be chosen at compile time :( +# cannot use MMX for generic i586 nor i686 (Pentium/Pentium Pro have no MMX) +# K6 optimization exists only in Makefile + +TARG=generic +%if %{with mmx} + TARG=linux-x86-mmx-elf +%endif +%ifarch %{ix86} + TARG=linux-x86-any-elf +%endif +%ifarch alpha + TARG=linux-alpha +%endif +%ifarch sparc sparc64 + TARG=linux-sparc +%endif + +%{__make} $TARG \ + OPT="$COPT" \ + CC="%{__cc}" + %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/john} -install run/*.chr $RPM_BUILD_ROOT%{_libdir}/john -install run/john.ini $RPM_BUILD_ROOT%{_libdir}/john +install run/john.conf john-1.6/run/*.chr $RPM_BUILD_ROOT%{_libdir}/john install run/john $RPM_BUILD_ROOT%{_bindir} -gzip -9nf doc/* run/mailer +rm -f doc/INSTALL cd $RPM_BUILD_ROOT%{_bindir} -ln -s john unafs; ln -s john unique; ln -s john unshadow +ln -sf john unafs +ln -sf john unique +ln -sf john unshadow %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc doc/* run/mailer.gz +%doc doc/* john-1.6/doc/{CONFIG,EXAMPLES,EXTERNAL,FAQ,MODES,NEWS,OPTIONS,RULES} run/mailer %attr(755,root,root) %{_bindir}/* - -%dir %{_libdir}/john -%{_libdir}/john/* +%{_libdir}/john