youtubeUnblock/youtubeUnblock/Makefile
2024-08-08 17:40:57 +03:00

53 lines
1.4 KiB
Makefile

# This file is used by OpenWRT SDK buildsystem to package the application for routers.
include $(TOPDIR)/rules.mk
PKG_NAME:=youtubeUnblock
PKG_VERSION:=0.2
PKG_REV:=0c17702e9d3aafaff08c60e8e6ca9c42f17f24a1
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/Waujito/youtubeUnblock.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_REV)
include $(INCLUDE_DIR)/package.mk
define Package/youtubeUnblock
SECTION:=net
CATEGORY:=Networking
TITLE:=youtubeUnblock
URL:=https://github.com/Waujito/youtubeUnblock
MAINTAINER:=Vadim Vetrov <vetrovvd@gmail.com>
DEPENDS:=+kmod-nft-queue
endef
define Package/youtubeUnblock/description
Bypasses Googlevideo detection systems that relies on SNI
endef
define Build/Prepare
$(Build/Prepare/Default)
$(Build/Patch)
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
PATH="$(TARGET_PATH)" \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
CROSS_COMPILE_PLATFORM="$(TARGET_CROSS:-=)"
endef
define Package/youtubeUnblock/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build/youtubeUnblock $(1)/usr/bin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/youtubeUnblock.owrt $(1)/etc/init.d/youtubeUnblock
$(INSTALL_DIR) $(1)/usr/share/nftables.d/ruleset-post/
$(CP) ./files/537-youtubeUnblock.nft $(1)/usr/share/nftables.d/ruleset-post/537-youtubeUnblock.nft
endef
$(eval $(call BuildPackage,youtubeUnblock))