diff --git a/net-p2p/Makefile b/net-p2p/Makefile index f588d7e18d85..7f849ecae71c 100644 --- a/net-p2p/Makefile +++ b/net-p2p/Makefile @@ -1,98 +1,99 @@ COMMENT = Peer-to-peer network applications SUBDIR += amule SUBDIR += amule-devel SUBDIR += awgg SUBDIR += bitcoin SUBDIR += bitcoin-daemon SUBDIR += bitcoin-utils SUBDIR += bitflu SUBDIR += bitmark SUBDIR += bitmark-cli SUBDIR += bitmark-daemon SUBDIR += bitmark-recorder + SUBDIR += btcheck SUBDIR += btpd SUBDIR += c-lightning SUBDIR += cpuminer SUBDIR += createtorrent SUBDIR += ctcs SUBDIR += ctorrent SUBDIR += dclib SUBDIR += deluge SUBDIR += deluge-cli SUBDIR += ed2k SUBDIR += edonkey-tool-hash SUBDIR += eiskaltdcpp-cli SUBDIR += eiskaltdcpp-daemon SUBDIR += eiskaltdcpp-data SUBDIR += eiskaltdcpp-gtk SUBDIR += eiskaltdcpp-lib SUBDIR += frost SUBDIR += go-ethereum SUBDIR += go-prysm SUBDIR += gtk-gnutella SUBDIR += gtorrentviewer SUBDIR += jackett SUBDIR += jigdo SUBDIR += ktorrent SUBDIR += libbt SUBDIR += liberator SUBDIR += libktorrent SUBDIR += libswift SUBDIR += libtorrent SUBDIR += libtorrent-rasterbar SUBDIR += lidarr SUBDIR += linuxdcpp SUBDIR += litecoin SUBDIR += litecoin-daemon SUBDIR += litecoin-utils SUBDIR += microdc2 SUBDIR += minder SUBDIR += mktorrent SUBDIR += mldonkey SUBDIR += mldonkey-core SUBDIR += mldonkey-gui SUBDIR += monero-cli SUBDIR += namecoin SUBDIR += namecoin-daemon SUBDIR += namecoin-utils SUBDIR += ncdc SUBDIR += opendchub SUBDIR += openethereum SUBDIR += p5-Net-BitTorrent SUBDIR += p5-Net-BitTorrent-File SUBDIR += p5-Net-BitTorrent-PeerPacket SUBDIR += p5-Net-DirectConnect SUBDIR += p5-WWW-BitTorrent SUBDIR += phex SUBDIR += py-libtorrent-rasterbar SUBDIR += py-transmission-rpc SUBDIR += py-tremc SUBDIR += py-vertex SUBDIR += qbittorrent SUBDIR += qtum SUBDIR += radarr SUBDIR += retroshare SUBDIR += rslsync SUBDIR += rtorrent SUBDIR += shx SUBDIR += sonarr SUBDIR += torrent-file-editor SUBDIR += torrentcheck SUBDIR += torrentsniff SUBDIR += transmission SUBDIR += transmission-cli SUBDIR += transmission-daemon SUBDIR += transmission-gtk SUBDIR += transmission-qt SUBDIR += transmission-remote-gui SUBDIR += transmission-utils SUBDIR += udpt SUBDIR += uhub SUBDIR += vuze SUBDIR += xmrig SUBDIR += zetacoin SUBDIR += zetacoin-daemon SUBDIR += zetacoin-utils .include diff --git a/net-p2p/btcheck/Makefile b/net-p2p/btcheck/Makefile new file mode 100644 index 000000000000..c205af140e70 --- /dev/null +++ b/net-p2p/btcheck/Makefile @@ -0,0 +1,62 @@ +# Created by: Alexey Dokuchaev + +PORTNAME= btcheck +PORTVERSION= 2.1 +CATEGORIES= net-p2p +MASTER_SITES= SF/${PORTNAME} + +MAINTAINER= danfe@FreeBSD.org +COMMENT= BitTorrent data checker and torrent file content viewer + +LICENSE= GPLv3 + +GNU_CONFIGURE= yes + +PLIST_FILES= bin/btcheck man/man1/btcheck.1.gz +PORTDOCS= AUTHORS ChangeLog NEWS README + +OPTIONS_DEFINE= DOCS +OPTIONS_RADIO= SHA1 +SHA1_DESC= Optimized SHA-1 calculation +OPTIONS_RADIO_SHA1= BEECRYPT GCRYPT GNUTLS MBEDTLS NETTLE OPENSSL TOMCRYPT +OPTIONS_DEFAULT= OPENSSL + +BEECRYPT_DESC= Use SHA-1 implementation from BeeCrypt +BEECRYPT_LIB_DEPENDS= libbeecrypt.so:security/beecrypt +BEECRYPT_USES= localbase +BEECRYPT_CONFIGURE_ON= --with-beecrypt + +GCRYPT_DESC= Use SHA-1 implementation from GNU crypt +GCRYPT_LIB_DEPENDS= libgcrypt.so:security/libgcrypt +GCRYPT_USES= localbase +GCRYPT_CONFIGURE_ON= --with-gcrypt + +GNUTLS_DESC= Use SHA-1 implementation from GnuTLS +GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls +GNUTLS_USES= localbase +GNUTLS_CONFIGURE_ON= --with-gnutls + +MBEDTLS_DESC= Use SHA-1 implementation from mbedTLS/PolarSSL +MBEDTLS_LIB_DEPENDS= libmbedcrypto.so:security/mbedtls +MBEDTLS_USES= localbase +MBEDTLS_CONFIGURE_ON= --with-polarssl + +NETTLE_DESC= Use SHA-1 implementation from Nettle +NETTLE_LIB_DEPENDS= libnettle.so:security/nettle +NETTLE_USES= localbase +NETTLE_CONFIGURE_ON= --with-nettle + +OPENSSL_DESC= Use SHA-1 implementation from OpenSSL +OPENSSL_USES= ssl +OPENSSL_CONFIGURE_ON= --with-openssl + +TOMCRYPT_DESC= Use SHA-1 implementation from LibTomCrypt +TOMCRYPT_LIB_DEPENDS= libtomcrypt.so:security/libtomcrypt +TOMCRYPT_USES= localbase +TOMCRYPT_CONFIGURE_ON= --with-tomcrypt + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR} + +.include diff --git a/net-p2p/btcheck/distinfo b/net-p2p/btcheck/distinfo new file mode 100644 index 000000000000..13ece7bf10cb --- /dev/null +++ b/net-p2p/btcheck/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1503959726 +SHA256 (btcheck-2.1.tar.gz) = 4718109d591e27bd58e1b2b07dbed7b63ae2fe869f5ced58c45b8aa64543c4b4 +SIZE (btcheck-2.1.tar.gz) = 155618 diff --git a/net-p2p/btcheck/files/patch-src_check.c b/net-p2p/btcheck/files/patch-src_check.c new file mode 100644 index 000000000000..a04553d43300 --- /dev/null +++ b/net-p2p/btcheck/files/patch-src_check.c @@ -0,0 +1,32 @@ +--- src/check.c.orig 2017-08-26 19:37:29 UTC ++++ src/check.c +@@ -36,7 +36,7 @@ int check(btree_t *torrentbtree) + btfile_t *btfile; + void *piecebuffer, *piecedigest; + size_t size, length; +- int ret, pieceindex, failure; ++ int ret, pieceindex, failure, numpieces; + + torrentinfo = search_dict_value(torrentbtree, TorrentInfoSearch); + if (torrentinfo == NULL) { +@@ -80,6 +80,7 @@ int check(btree_t *torrentbtree) + fprintf(stderr, "Can't open btfile.\n"); + } + ++ numpieces = (torrentinfolength + torrentinfopiecelength - 1) / torrentinfopiecelength; + failure = 0; + pieceindex = 0; + readlength = 0; +@@ -99,10 +100,10 @@ int check(btree_t *torrentbtree) + } + if (ret == 0) { + if (Verbose >= 0) +- printf("\rpiece[%d] OK ", pieceindex); ++ printf("\rpiece[%d/%d] OK ", pieceindex, numpieces); + } else { + if (Verbose >= 0) +- printf("\rpiece[%d] BAD \n", pieceindex); ++ printf("\rpiece[%d/%d] BAD \n", pieceindex, numpieces); + failure++; + } + fflush(stdout); diff --git a/net-p2p/btcheck/pkg-descr b/net-p2p/btcheck/pkg-descr new file mode 100644 index 000000000000..5df215fd333e --- /dev/null +++ b/net-p2p/btcheck/pkg-descr @@ -0,0 +1,6 @@ +BtCheck can check downloaded data integrity according to the given +torrent and it can also show the information stored in the torrent +file: announce trackers, list of files with their size, hash value, +creation date, comments, etc. + +WWW: https://sourceforge.net/projects/btcheck/