michael@644: ## michael@644: ## john.spec -- OpenPKG RPM Package Specification michael@644: ## Copyright (c) 2000-2011 OpenPKG Foundation e.V. michael@644: ## michael@644: ## Permission to use, copy, modify, and distribute this software for michael@644: ## any purpose with or without fee is hereby granted, provided that michael@644: ## the above copyright notice and this permission notice appear in all michael@644: ## copies. michael@644: ## michael@644: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@644: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@644: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@644: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@644: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@644: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@644: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@644: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@644: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@644: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@644: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@644: ## SUCH DAMAGE. michael@644: ## michael@644: michael@644: # package information michael@644: Name: john michael@644: Summary: Password Cracking Tool michael@644: URL: http://www.openwall.com/john/ michael@644: Vendor: Solar Designer michael@644: Packager: OpenPKG Foundation e.V. michael@644: Distribution: OpenPKG Community michael@644: Class: PLUS michael@644: Group: System michael@644: License: GPL michael@644: Version: 1.7.9 michael@645: Release: 20120800 michael@644: michael@644: # list of sources michael@644: Source0: http://www.openwall.com/john/g/john-%{version}.tar.gz michael@644: Patch0: john.patch michael@644: michael@644: # build information michael@645: BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc michael@644: PreReq: OpenPKG, openpkg >= 20100101 michael@644: michael@644: %description michael@644: John the Ripper is a fast password cracker. Its primary purpose is michael@644: to detect weak Unix passwords. Besides several crypt(3) password michael@644: hash types most commonly found on various Unix flavors Kerberos AFS michael@644: and Windows NT/2000/XP/2003 LM hashes. michael@644: michael@644: %track michael@644: prog john = { michael@644: version = %{version} michael@644: url = http://www.openwall.com/john/ michael@644: regex = john-(__VER__)\.tar\.gz michael@644: } michael@644: michael@644: %prep michael@644: %setup -q michael@644: %patch -p0 michael@644: michael@644: %build michael@644: %{l_shtool} subst %{l_value -s -a} src/params.h michael@644: %{l_shtool} subst -e 's;-lcrypto -lssl;-lssl -lcrypto;' src/Makefile michael@644: %{l_shtool} subst -e 's;/usr/local;%{l_prefix};g' src/Makefile michael@644: ( cd src michael@644: platform="generic" michael@644: case "%{l_platform -t}" in michael@644: i?86-freebsd* ) platform="freebsd-x86-any" ;; michael@644: amd64-freebsd* ) platform="freebsd-x86-64" ;; michael@644: i?86-linux* ) platform="linux-x86-any" ;; michael@644: amd64-linux* ) platform="linux-x86-64" ;; michael@644: sun4u-sunos* ) platform="solaris-sparc64-gcc" ;; michael@645: i?86-sunos* ) platform="solaris-x86-any-gcc" ;; michael@645: amd64-sunos* ) platform="solaris-x86-any-gcc" ;; michael@644: esac michael@645: %{l_make} %{l_mflags -O} $platform CC="%{l_cc}" michael@644: ) || exit $? michael@644: cat doc/README doc/OPTIONS doc/MODES >john.1 michael@644: michael@644: %install michael@644: %{l_shtool} mkdir -f -p -m 755 \ michael@644: $RPM_BUILD_ROOT%{l_prefix}/bin \ michael@644: $RPM_BUILD_ROOT%{l_prefix}/etc/john \ michael@644: $RPM_BUILD_ROOT%{l_prefix}/man/cat1 michael@644: %{l_shtool} install -c -s -m 755 \ michael@644: run/john $RPM_BUILD_ROOT%{l_prefix}/bin/ michael@644: %{l_shtool} install -c -m 644 \ michael@644: run/john.conf $RPM_BUILD_ROOT%{l_prefix}/etc/john/ michael@644: %{l_shtool} install -c -m 644 \ michael@644: john.1 $RPM_BUILD_ROOT%{l_prefix}/man/cat1/ michael@644: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@644: %{l_files_std} \ michael@644: '%config %{l_prefix}/etc/john/*' michael@644: michael@644: %files -f files michael@644: michael@644: %clean michael@644: