diff --git a/net-proxy/youtubeUnblock/Manifest b/net-proxy/youtubeUnblock/Manifest new file mode 100644 index 0000000..bd0d50a --- /dev/null +++ b/net-proxy/youtubeUnblock/Manifest @@ -0,0 +1 @@ +DIST youtubeUnblock-1.0.0-rc5.tar.gz 197486 BLAKE2B 049b746e107fd3b7de6432e3b2ac48b9b09931a9f3a8c7fd1faa5b4958c579e5e2f293cd2cdfcdbcde8bcf4d8935ad7ac97b9de71f0ca9660a3cd670786dfb5b SHA512 7f93a97dac59d5173360e022efc62071314820829bee6f0cb4f7883ac8d7a868921d3653c614826f374c714a9e2d005ed5e0fafb47c39a21cf6182d3ef283ac0 diff --git a/net-proxy/youtubeUnblock/youtubeUnblock-1.0.0_rc5.ebuild b/net-proxy/youtubeUnblock/youtubeUnblock-1.0.0_rc5.ebuild new file mode 100644 index 0000000..147bc4a --- /dev/null +++ b/net-proxy/youtubeUnblock/youtubeUnblock-1.0.0_rc5.ebuild @@ -0,0 +1,93 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P=${P/_/-} +MODULES_OPTIONAL_IUSE="+modules" + +inherit linux-mod-r1 + +DESCRIPTION="Bypasses Deep Packet Inspection (DPI) systems that rely on SNI" +HOMEPAGE="https://github.com/Waujito/youtubeUnblock" +SRC_URI="https://github.com/Waujito/${PN}/archive/refs/tags/v${PV/_/-}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="GPL-3.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="" +RDEPEND="${DEPEND}" +BDEPEND="" + +IUSE="module-src uspace" + +CONFIG_CHECK="CONFIG_NETFILTER_NETLINK_QUEUE CONFIG_NFT_QUEUE CONFIG_NF_CONNTRACK" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + default + + sed -i "s@^KERNEL_BUILDER_MAKEDIR:=.*@KERNEL_BUILDER_MAKEDIR:=/lib/modules/${KV_FULL}/build@" kmake.mk || die "Fail to set desired kernel version in the Makefile" +} + +src_compile() { + use uspace && emake PREFIX="${EPREFIX}/usr" + + local modlist=( kyoutubeUnblock=net:::kmake ) + local modargs=( + KERNELDIR=${KV_OUT_DIR} + ) + use modules && linux-mod-r1_src_compile +} + +src_install() { + use uspace && emake \ + PREFIX="${EPREFIX}/usr" \ + DESTDIR="${D}" \ + MANDIR="/usr/share/man" \ + install + + use modules && linux-mod-r1_src_install + use module-src && emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src dkms-install +} + +pkg_postinst() { + if use module-src && ! use modules; then + einfo + einfo "You have enabled the module-src USE flag without the modules USE" + einfo "flag. This means that sources are installed to" + einfo "${ROOT}/usr/src/kyoutubeUnblock instead of having the" + einfo "kernel module compiled. You will need to compile the module" + einfo "yourself. Most likely, you don't want this USE flag, and should" + einfo "rather use USE=modules" + einfo + fi + + if use modules; then + linux-mod-r1_pkg_postinst + local old new + if [[ $(uname -r) != "${KV_FULL}" ]]; then + ewarn + ewarn "You have just built kyoutubeUnblock for kernel ${KV_FULL}, yet the currently running" + ewarn "kernel is $(uname -r). If you intend to use this kyoutubeUnblock module on the currently" + ewarn "running machine, you will first need to reboot it into the kernel ${KV_FULL}, for" + ewarn "which this module was built." + ewarn + elif [[ -f /sys/module/kyoutubeUnblock/version ]] && \ + old="$(< /sys/module/kyoutubeUnblock/version)" && \ + new="$(modinfo -F version "${ROOT}/lib/modules/${KV_FULL}/net/kyoutubeUnblock.ko" 2>/dev/null)" && \ + [[ $old != "$new" ]]; then + ewarn + ewarn "You appear to have just upgraded kyoutubeUnblock from version v$old to v$new." + ewarn "However, the old version is still running on your system. In order to use the" + ewarn "new version, you will need to remove the old module and load the new one. As" + ewarn "root, you can accomplish this with the following commands:" + ewarn + ewarn " # rmmod kyoutubeUnblock" + ewarn " # modprobe kyoutubeUnblock" + ewarn + fi + fi +}