]> git.pld-linux.org Git - packages/john.git/blobdiff - john.spec
- fix ix86 build, by passing JOHN_SYSTEMWIDE_EXEC via include file; rel 2
[packages/john.git] / john.spec
index 160b1ab369a90c6b23be7bf446a79a1dd25314e4..25464be11f5099c9fd87f5379245bfeb4debe945 100644 (file)
--- a/john.spec
+++ b/john.spec
+#
+# Conditional build:
+%bcond_with jumbopatch # This patch integrates lots of contributed
+                       # patches adding support for over 30
+                       # of additional hash types, and more.
+
+%ifarch i586 i686 athlon pentium2 pentium3 pentium4
+%define do_mmx 1
+%else
+%define        do_mmx 0
+%endif
+%ifarch i586 i686
+%define do_mmxfb 1
+%define        optmmxfb        -DCPU_FALLBACK=1
+%else
+%define do_mmxfb 0
+%undefine optmmxfb
+%endif
 Summary:       Password cracker
-Summary(pl):   £amacz hase³
+Summary(pl.UTF-8):     Łamacz haseł
 Name:          john
-Version:       1.6
-Release:       3
-Copyright:     GPL
-Group:         Utilities/System
-Group(pl):     Narzêdzia/System
-URL:           http://www.false.com/security/john/
-Source:                %{name}-%{version}.tar.gz
-Patch0:                %{name}-%{version}.PLD.diff
-Patch1:                %{name}-%{version}.ini.diff
-Patch2:                %{name}-%{version}.makefile.diff
-Buildroot:     /tmp/%{name}-%{version}-root
+Version:       1.7.6
+Release:       2
+License:       GPL
+Group:         Applications/System
+Source0:       http://www.openwall.com/john/g/%{name}-%{version}.tar.bz2
+# Source0-md5: 321ac0793f1aa4f0603b33a393133756
+Patch0:                %{name}-mailer.patch
+Patch1:                optflags.patch
+%{?with_jumbopatch:Patch1: http://www.openwall.com/john/contrib/%{name}-%{version}-jumbo-2.diff.gz}
+URL:           http://www.openwall.com/john/
+%{?with_jumbopatch:BuildRequires: openssl-devel >= 0.9.7}
+BuildRequires: rpmbuild(macros) >= 1.213
+Requires:      words
+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.
-  
-%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 is a fast password cracker, currently available for
+many flavors of Unix (11 are officially supported, not counting
+different architectures), DOS, Win32, BeOS, and OpenVMS (the latter
+requires a contributed patch). Its primary purpose is to detect weak
+Unix passwords. Besides several crypt(3) password hash types most
+commonly found on various Unix flavors, supported out of the box are
+Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with
+contributed patches.
+
+%description -l pl.UTF-8
+John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu
+rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych
+architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga
+łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych.
+Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych
+na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz
+Windows NT/2000/XP LM, a także kilka innych przy użyciu łat.
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
+%{?with_jumbopatch:%patch1 -p1}
+
+rm -f doc/INSTALL
 
 %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
-       
+
+cat > defs.h <<'EOF'
+#define        JOHN_SYSTEMWIDE 1
+#define        JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
+EOF
+
+%if %{do_mmxfb}
+%{__make} linux-x86-any \
+       CC="%{__cc}" \
+       OPTFLAGS="%{rpmcflags} -include defs.h"
+mv ../run/john ../run/john-non-mmx
+%{__make} clean
+%endif
+
+TARG=generic
+%ifarch %{ix86}
+       %if %{do_mmx}
+               TARG=linux-x86-mmx
+       %else
+               TARG=linux-x86-any
+       %endif
+%endif
+%ifarch alpha
+       TARG=linux-alpha
+%endif
+%ifarch sparc sparcv9
+       TARG=linux-sparc
+%endif
+%ifarch %{x8664}
+       TARG=linux-x86-64
+%endif
+
+%{__make} $TARG \
+       CC="%{__cc}" \
+       OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/usr/{bin,lib/john}
-install run/*.chr $RPM_BUILD_ROOT%{_libdir}/john
-install run/john.ini $RPM_BUILD_ROOT%{_libdir}/john
-install run/john $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
+cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
+install -p run/john $RPM_BUILD_ROOT%{_bindir}
+%if %{do_mmxfb}
+install -d $RPM_BUILD_ROOT%{_libdir}/john
+install -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john
+%endif
 
-gzip -9nf doc/* run/mailer
-
-cd $RPM_BUILD_ROOT%{_bindir}
-ln -s john unafs; ln -s john unique; ln -s john unshadow
+ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
+ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
+ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc doc/* run/mailer.gz
-%attr(755,root,root) %{_bindir}/*
-
+%doc doc/* run/mailer
+%attr(755,root,root) %{_bindir}/john
+%attr(755,root,root) %{_bindir}/unafs
+%attr(755,root,root) %{_bindir}/unique
+%attr(755,root,root) %{_bindir}/unshadow
+%if %{do_mmxfb}
 %dir %{_libdir}/john
-%{_libdir}/john/*
-
-%changelog
-* Mon Apr 26 1999 Micha³ Kuratczyk <kura@pld.org.pl>
-  [1.6-3]
-- gzipping documentation instead bzipping
-- sloted BuildRoot into PLD standard
-
-* Wed Dec 09 1998 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
-- added ini patch.
-
-* Sun Oct 06 1998 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
-- initial rpm release.
+%attr(755,root,root) %{_libdir}/john/john-non-mmx
+%endif
+%{_datadir}/john
This page took 0.040207 seconds and 4 git commands to generate.