From eb72858b5b9ef600e0c393c71ee730ec59d1b99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Wed, 30 Dec 2020 10:30:09 +0100 Subject: [PATCH] hBlock: bump (#5535) --- net-firewall/hblock/hblock-2.1.6.recipe | 34 ------------------ net-firewall/hblock/hblock-3.1.1.recipe | 47 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 34 deletions(-) delete mode 100644 net-firewall/hblock/hblock-2.1.6.recipe create mode 100644 net-firewall/hblock/hblock-3.1.1.recipe diff --git a/net-firewall/hblock/hblock-2.1.6.recipe b/net-firewall/hblock/hblock-2.1.6.recipe deleted file mode 100644 index 218912d89..000000000 --- a/net-firewall/hblock/hblock-2.1.6.recipe +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY="Host file based adblocker with automatic update functionality" -DESCRIPTION="This POSIX-compliant shell script, designed for Unix-like \ -systems, gets a list of domains that serve ads, trhblocking scripts and malware \ -from multiple sources and creates a hosts file (alternative formats are also \ -supported) that prevents your system from connecting to them." -HOMEPAGE="https://github.com/hectorm/hblock" -COPYRIGHT="2020 Héctor Molinero Fernández" -LICENSE="MIT" -REVISION="1" -SOURCE_URI="https://github.com/hectorm/hblock/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="47fb10ac91b54ec41d1880184eb683c7bfc62f74b19c45ec2044745f8c58f139" - -ARCHITECTURES="any" - -PROVIDES=" - hblock = $portVersion - cmd:hblock - " -REQUIRES=" - haiku - " - -PATCH() -{ - # Replacing hardcoded path for the hosts file - hostsfile="`finddir B_SYSTEM_SETTINGS_DIRECTORY`/network/hosts" - sed -i 's,/etc/hosts',$hostsfile, hblock -} - -INSTALL() -{ - mkdir -p $binDir - cp hblock $binDir -} diff --git a/net-firewall/hblock/hblock-3.1.1.recipe b/net-firewall/hblock/hblock-3.1.1.recipe new file mode 100644 index 000000000..20364ce5c --- /dev/null +++ b/net-firewall/hblock/hblock-3.1.1.recipe @@ -0,0 +1,47 @@ +SUMMARY="An adblocker that creates a hosts file from automatically downloaded sources" +DESCRIPTION="hBlock is a POSIX-compliant shell script that gets a list of domains that serve \ +ads, tracking scripts and malware from multiple sources and creates a hosts \ +file, among other formats, that prevents your system from connecting to them." +HOMEPAGE="https://github.com/hectorm/hblock" +COPYRIGHT="2020 Héctor Molinero Fernández" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/hectorm/hblock/archive/v${portVersion:?}.tar.gz" +CHECKSUM_SHA256="7d87002c8ba13b72b4614fd2e528dfee816ea632ddee7f49be7cc463b43b6c3c" + +ARCHITECTURES="any" + +PROVIDES=" + hblock = ${portVersion:?} + cmd:hblock + " +REQUIRES=" + haiku + cmd:curl + " + +BUILD_PREREQUIRES=" + cmd:install + cmd:make + cmd:sed + " + +PATCH() +{ + # Replace hardcoded paths. + bSystemEtcDirectory=$(finddir B_SYSTEM_ETC_DIRECTORY) + bSystemSettingsDirectory=$(finddir B_SYSTEM_SETTINGS_DIRECTORY) + sed -i \ + -e "s|\"\${ETCDIR?}/hosts\"|\"${bSystemSettingsDirectory:?}/network/hosts\"|" \ + -e "s|'/etc'|'${bSystemEtcDirectory:?}'|" \ + ./hblock + sed -i \ + -e "s|,/etc/hosts|,${bSystemSettingsDirectory:?}/network/hosts|" \ + -e "s|,/etc/|,${bSystemEtcDirectory:?}/|" \ + ./hblock.1 +} + +INSTALL() +{ + make install prefix="${prefix:?}" bindir="${binDir:?}" mandir="${manDir:?}" +}