net-misc/zapret2 - 9999 (phackerlay)

Search

Install

Install this version:

emerge -a =net-misc/zapret2-9999

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =net-misc/zapret2-9999

Or alternatively:

emerge --autounmask-write -a =net-misc/zapret2-9999

Package Information

Description:
zapret
Homepage:
https://github.com/bol-van/zapret2
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
9999 8 ~amd64 ~x86 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

LUA_COMPAT=( lua5-{1..4} )
inherit lua git-r3

DESCRIPTION="zapret"
EGIT_REPO_URI="https://github.com/bol-van/zapret2.git"
HOMEPAGE="https://github.com/bol-van/zapret2"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="systemd nftables"

REQUIRED_USE="${LUA_REQUIRED_USE}"

DEPEND="
	${LUA_DEPS}
	net-libs/libnetfilter_queue
	net-firewall/ipset
	net-firewall/iptables
	dev-lang/luajit
	nftables? ( net-firewall/nftables )
	net-dns/ldns-tools
	!!net-dns/bind
	net-analyzer/openbsd-netcat
	net-misc/curl
	net-firewall/nftables
"
# bind contains mdig, which zapret also builds
# other than that, bind could have been alternative to ldns-tools

RDEPEND="${DEPEND}"


src_compile() {
	if use systemd; then
		make systemd
	else
		make
	fi

}

src_install() {
	rm -rf ${S}/nfq2/windows
	rm -rf ${S}/*install*

	dodir opt/ || die
	dodir opt/"${PN}" || die
	cp -r "${S}"/* "${ED}"/opt/"${PN}"/ || die

	dosym ${EPREFIX}${INSTALL_PREFIX}/opt/"${PN}"/binaries/my/ip2net /usr/bin/ip2net || die
	dosym ${EPREFIX}${INSTALL_PREFIX}/opt/"${PN}"/binaries/my/mdig /usr/bin/mdig || die
	dosym ${EPREFIX}${INSTALL_PREFIX}/opt/"${PN}"/binaries/my/nfqws2 /usr/bin/nfqws2 || die

	if use systemd; then
		dosym -r ${EPREFIX}${INSTALL_PREFIX}/opt/"${PN}"/init.d/systemd/* /lib/systemd/system/
	else
		dosym ${EPREFIX}${INSTALL_PREFIX}/opt/"${PN}"/init.d/openrc/zapret2 /etc/init.d/zapret2
	fi
}

pkg_pretend() {
	if use systemd; then
		ewarn Note, systemd use flag was not tested
	fi
}

USE Flags

Manage flags for this package: euse -i <flag> -p net-misc/zapret2 | euse -E <flag> -p net-misc/zapret2 | euse -D <flag> -p net-misc/zapret2

Global/Standard Flags

Inherited Eclasses

lua

Dependencies

DEPEND

	
	net-libs/libnetfilter_queue
	net-firewall/ipset
	net-firewall/iptables
	dev-lang/luajit
	nftables? ( net-firewall/nftables )
	net-dns/ldns-tools
	!!net-dns/bind
	net-analyzer/openbsd-netcat
	net-misc/curl
	net-firewall/nftables

RDEPEND

	
	net-libs/libnetfilter_queue
	net-firewall/ipset
	net-firewall/iptables
	dev-lang/luajit
	nftables? ( net-firewall/nftables )
	net-dns/ldns-tools
	!!net-dns/bind
	net-analyzer/openbsd-netcat
	net-misc/curl
	net-firewall/nftables