Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 2020 20:26:32 +0000 (UTC)
From:      Dmitri Goutnik <dmgk@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r531555 - in head/net: . hblock hblock/files
Message-ID:  <202004122026.03CKQWFq036485@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dmgk
Date: Sun Apr 12 20:26:31 2020
New Revision: 531555
URL: https://svnweb.freebsd.org/changeset/ports/531555

Log:
  New port: net/hblock
  
  POSIX-compliant shell script, designed for Unix-like systems,
  gets a list of domains that serve ads, tracking scripts and
  malware from multiple sources and creates a hosts file that
  prevents your system from connecting to them.
  
  WWW: https://github.com/hectorm/hblock
  
  PR:		242466
  Submitted by:	Lewis Cook <vulcan@wired.sh>

Added:
  head/net/hblock/
  head/net/hblock/Makefile   (contents, props changed)
  head/net/hblock/distinfo   (contents, props changed)
  head/net/hblock/files/
  head/net/hblock/files/patch-hblock   (contents, props changed)
  head/net/hblock/pkg-descr   (contents, props changed)
Modified:
  head/net/Makefile

Modified: head/net/Makefile
==============================================================================
--- head/net/Makefile	Sun Apr 12 20:23:56 2020	(r531554)
+++ head/net/Makefile	Sun Apr 12 20:26:31 2020	(r531555)
@@ -241,6 +241,7 @@
     SUBDIR += haproxy18
     SUBDIR += haproxy19
     SUBDIR += haproxy21
+    SUBDIR += hblock
     SUBDIR += hexinject
     SUBDIR += hinfo
     SUBDIR += hlmaster

Added: head/net/hblock/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/hblock/Makefile	Sun Apr 12 20:26:31 2020	(r531555)
@@ -0,0 +1,37 @@
+# $FreeBSD$
+
+PORTNAME=	hblock
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.1.5
+CATEGORIES=	net
+
+MAINTAINER=	vulcan@wired.sh
+COMMENT=	Adblocker using automatically generated hosts file
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
+
+RUN_DEPENDS=	ca_root_nss>0:security/ca_root_nss
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	hectorm
+
+NO_ARCH=	yes
+NO_BUILD=	yes
+
+PLIST_FILES=	bin/${PORTNAME}
+PORTDOCS=	README.md
+
+OPTIONS_DEFINE=	DOCS
+
+post-patch:
+	@${REINPLACE_CMD} -e '/hosts/!s|/etc|${PREFIX}/etc|g' ${WRKSRC}/${PORTNAME}
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>

Added: head/net/hblock/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/hblock/distinfo	Sun Apr 12 20:26:31 2020	(r531555)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1586119738
+SHA256 (hectorm-hblock-v2.1.5_GH0.tar.gz) = e06cca83d5f11565abdcde1924c294ef8c628833834be411531a5c4a893d1bfe
+SIZE (hectorm-hblock-v2.1.5_GH0.tar.gz) = 400446

Added: head/net/hblock/files/patch-hblock
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/hblock/files/patch-hblock	Sun Apr 12 20:26:31 2020	(r531555)
@@ -0,0 +1,18 @@
+Remove curl/wget and use base system fetch instead.
+
+--- hblock.orig	2020-02-22 10:40:05 UTC
++++ hblock
+@@ -138,12 +138,7 @@ fetchUrl() {
+ 	if [ "${1#file://}" != "${1:?}" ]; then cat -- "${1#file://}"
+ 	else
+ 		userAgent='Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0'
+-		if exists curl; then curl -fsSL -A "${userAgent:?}" -- "${1:?}";
+-		elif exists wget; then wget -qO- -U "${userAgent:?}" -- "${1:?}";
+-		else
+-			logError 'Either wget or curl are required for this script'
+-			exit 1
+-		fi
++		fetch -qo - --user-agent="${userAgent:?}" -- "${1:?}";
+ 	fi
+ }
+ 

Added: head/net/hblock/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/hblock/pkg-descr	Sun Apr 12 20:26:31 2020	(r531555)
@@ -0,0 +1,6 @@
+POSIX-compliant shell script, designed for Unix-like systems,
+gets a list of domains that serve ads, tracking scripts and
+malware from multiple sources and creates a hosts file that
+prevents your system from connecting to them.
+
+WWW: https://github.com/hectorm/hblock



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004122026.03CKQWFq036485>