Date: Fri, 13 Mar 2015 17:59:01 +0000 (UTC) From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r381228 - in head/security: . rhash rhash/files Message-ID: <201503131759.t2DHx1J2019281@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe Date: Fri Mar 13 17:59:00 2015 New Revision: 381228 URL: https://svnweb.freebsd.org/changeset/ports/381228 QAT: https://qat.redports.org/buildarchive/r381228/ Log: Add port of RHash, console utility and library for computing and verifying hash sums of files. It is based on the same code as existing Perl wrapper, `security/p5-Crypt-RHash' port. Also, properly sort `security/Makefile' while here. Added: head/security/rhash/ head/security/rhash/Makefile (contents, props changed) head/security/rhash/distinfo (contents, props changed) head/security/rhash/files/ head/security/rhash/files/patch-Makefile (contents, props changed) head/security/rhash/files/patch-librhash_Makefile (contents, props changed) head/security/rhash/pkg-descr (contents, props changed) head/security/rhash/pkg-plist (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Fri Mar 13 17:52:46 2015 (r381227) +++ head/security/Makefile Fri Mar 13 17:59:00 2015 (r381228) @@ -595,8 +595,8 @@ SUBDIR += p5-GSSAPI SUBDIR += p5-GnuPG SUBDIR += p5-GnuPG-Interface - SUBDIR += p5-Heimdal-Kadm5 SUBDIR += p5-HTML-Email-Obfuscate + SUBDIR += p5-Heimdal-Kadm5 SUBDIR += p5-IO-Async-SSL SUBDIR += p5-IO-Socket-SSL SUBDIR += p5-MD5 @@ -886,6 +886,7 @@ SUBDIR += retranslator SUBDIR += revealrk SUBDIR += revelation + SUBDIR += rhash SUBDIR += rifiuti2 SUBDIR += rkhunter SUBDIR += rndpassw Added: head/security/rhash/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/rhash/Makefile Fri Mar 13 17:59:00 2015 (r381228) @@ -0,0 +1,28 @@ +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= rhash +PORTVERSION= 1.3.3 +CATEGORIES= security +MASTER_SITES= SF +DISTNAME= ${PORTNAME}-${PORTVERSION}-src + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Utility and library for computing and checking of file hashes + +LICENSE= MIT + +USE_LDCONFIG= yes + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +PORTDOCS= ChangeLog README + +post-patch: + @${REINPLACE_CMD} -e 's,/etc/,${PREFIX}&,' ${WRKSRC}/parse_cmdline.c + +post-install: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR} + +.include <bsd.port.mk> Added: head/security/rhash/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/rhash/distinfo Fri Mar 13 17:59:00 2015 (r381228) @@ -0,0 +1,2 @@ +SHA256 (rhash-1.3.3-src.tar.gz) = 5b520b597bd83f933d316fce1382bb90e0b0b87b559b8c9c9a197551c935315a +SIZE (rhash-1.3.3-src.tar.gz) = 248855 Added: head/security/rhash/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/rhash/files/patch-Makefile Fri Mar 13 17:59:00 2015 (r381228) @@ -0,0 +1,50 @@ +--- Makefile.orig 2014-08-04 18:55:26 UTC ++++ Makefile +@@ -3,13 +3,13 @@ + # compile for pentiumpro: make CFLAGS="-O2 -DNDEBUG -march=i586 -mcpu=pentiumpro -fomit-frame-pointer" + # create rpm with statically linked program: make rpm ADDLDFLAGS="-static -s -Wl,--gc-sections" + VERSION = 1.3.3 +-PREFIX = /usr/local +-CC = gcc ++PREFIX ?= /usr/local ++CC ?= gcc + # using OPTFLAGS/OPTLDFLAGS for compatibilty with old scripts using this makefile +-OPTFLAGS = -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections ++OPTFLAGS = $(CFLAGS) -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections + OPTLDFLAGS = +-CFLAGS = $(OPTFLAGS) +-LDFLAGS = $(OPTLDFLAGS) ++#CFLAGS = $(OPTFLAGS) ++LDFLAGS += $(OPTLDFLAGS) + ADDCFLAGS = + ADDLDFLAGS = + ALLCFLAGS = -pipe $(CFLAGS) $(ADDCFLAGS) \ +@@ -55,7 +55,7 @@ I18N_FILES = po/de.po po/en_AU.po po/es. + DIST_FILES = $(LIN_DIST_FILES) $(LIBRHASH_FILES) $(WIN_DIST_FILES) $(WIN_SRC_FILES) $(I18N_FILES) + DESTDIR = + BINDIR = $(PREFIX)/bin +-MANDIR = $(PREFIX)/share/man ++MANDIR = $(PREFIX)/man + LOCALEDIR = $(PREFIX)/share/locale + RPMTOP = rpms + RPMDIRS = SOURCES SPECS BUILD SRPMS RPMS +@@ -70,7 +70,7 @@ build-shared: $(SHARED_TRG) + lib-shared: $(SHAREDLIB) + lib-static: $(LIBRHASH) + +-install: all install-binary install-data install-symlinks ++install: all install-binary install-lib-static install-lib-shared install-data install-symlinks + install-shared: $(SHARED_TRG) install-shared-binary install-data install-symlinks + install-data: install-man install-conf + uninstall: uninstall-binary uninstall-data uninstall-symlinks +@@ -105,8 +105,8 @@ install-man: + $(INSTALL_DATA) dist/rhash.1 $(DESTDIR)$(MANDIR)/man1/rhash.1 + + install-conf: +- $(INSTALL) -d $(DESTDIR)/etc +- sed -e 's/\x0D//g' dist/rhashrc.sample > rc.tmp && $(INSTALL_DATA) rc.tmp $(DESTDIR)/etc/rhashrc ++ $(INSTALL) -d $(DESTDIR)$(PREFIX)/etc ++ tr -d \\r < dist/rhashrc.sample > rc.tmp && $(INSTALL_DATA) rc.tmp $(DESTDIR)$(PREFIX)/etc/rhashrc.sample + rm -f rc.tmp + + # dependencies should be properly set, otherwise 'make -j<n>' can fail Added: head/security/rhash/files/patch-librhash_Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/rhash/files/patch-librhash_Makefile Fri Mar 13 17:59:00 2015 (r381228) @@ -0,0 +1,37 @@ +--- librhash/Makefile.orig 2014-08-01 10:53:45 UTC ++++ librhash/Makefile +@@ -1,11 +1,11 @@ + # Makefile for LibRHash +-CC = gcc +-AR = ar ++CC ?= gcc ++AR ?= ar + #NOTE: NDEBUG turns off asserts +-OPTFLAGS = -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections ++OPTFLAGS = $(CFLAGS) -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections + OPTLDFLAGS = +-CFLAGS = $(OPTFLAGS) +-LDFLAGS = $(OPTLDFLAGS) ++#CFLAGS = $(OPTFLAGS) ++LDFLAGS += $(OPTLDFLAGS) + ADDCFLAGS = + LIBCFLAGS = + ADDLDFLAGS = +@@ -24,7 +24,7 @@ LEGACY_LIB_HEADERS = rhash_timing.h + SO_HEADERS = $(LIB_HEADERS) $(LEGACY_LIB_HEADERS) + # installation directories and names + DESTDIR = +-PREFIX = /usr/local ++PREFIX ?= /usr/local + INCDIR = $(PREFIX)/include + LIBDIR = $(PREFIX)/lib + LIBRARY = librhash.a +@@ -182,7 +182,7 @@ test-dll: $(DLLNAME) test_hashes.o + + # shared and static libraries + $(SONAME): $(SOURCES) +- sed -n '1s/.*/{ global:/p; s/^RHASH_API.* \([a-z0-9_]\+\)(.*/ \1;/p; $$s/.*/local: *; };/p' $(SO_HEADERS) > exports.sym ++ sed -nE '1s/.*/{ global:/p; s/^RHASH_API.* ([a-z0-9_]+)\(.*/ \1;/p; $$s/.*/local: *; };/p' $(SO_HEADERS) > exports.sym + $(CC) -fpic $(ALLCFLAGS) -shared $(SOURCES) -Wl,--version-script,exports.sym,-soname,$(SONAME) $(LIBLDFLAGS) -o $@ + ln -s $(SONAME) $(SOLINK) + # use 'nm -Cg --defined-only $@' to view exported symbols Added: head/security/rhash/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/rhash/pkg-descr Fri Mar 13 17:59:00 2015 (r381228) @@ -0,0 +1,15 @@ +RHash is a console utility and library for computing and verifying hash sums +of files. It supports CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, Tiger, +TTH, Torrent BTIH, AICH, ED2K, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R +256/512, Whirlpool, and Snefru-128/256 hash sums. Its features are: + + * Can calculate Magnet links + * Output in a predefined (SFV, BSD-like) or a user-defined format + * Ability to process directories recursively + * Updating existing hash-files (adding hash sums of files missing in a + hash-file) + * Portable, written in pure C, small in size, open source (MIT license) + +Perl wrapper is available as `security/p5-Crypt-RHash' port. + +WWW: http://rhash.anz.ru/ Added: head/security/rhash/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/rhash/pkg-plist Fri Mar 13 17:59:00 2015 (r381228) @@ -0,0 +1,24 @@ +bin/ed2k-link +bin/gost-hash +bin/has160-hash +bin/magnet-link +bin/rhash +bin/sfv-hash +bin/tiger-hash +bin/tth-hash +bin/whirlpool-hash +@sample etc/rhashrc.sample +include/rhash.h +include/rhash_torrent.h +lib/librhash.a +lib/librhash.so +lib/librhash.so.0 +man/man1/ed2k-link.1.gz +man/man1/gost-hash.1.gz +man/man1/has160-hash.1.gz +man/man1/magnet-link.1.gz +man/man1/rhash.1.gz +man/man1/sfv-hash.1.gz +man/man1/tiger-hash.1.gz +man/man1/tth-hash.1.gz +man/man1/whirlpool-hash.1.gz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503131759.t2DHx1J2019281>