diff --git a/trojan-go/Makefile b/trojan-go/Makefile index 586649c..4e28714 100644 --- a/trojan-go/Makefile +++ b/trojan-go/Makefile @@ -7,15 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=trojan-go PKG_VERSION:=0.8.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/p4gefau1t/trojan-go.git -PKG_SOURCE_VERSION:=d051cf4c8852d708769ca1c4e514306a88da830b -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/p4gefau1t/trojan-go/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=a335006813067f70763596c41ddf09454b151899b356661b055eb9113ec3081b -PKG_CONFIG_DEPENDS := \ +PKG_CONFIG_DEPENDS:= \ CONFIG_TROJAN_GO_COMPRESS_GOPROXY \ CONFIG_TROJAN_GO_COMPRESS_UPX @@ -24,11 +22,13 @@ PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 GO_PKG:=github.com/p4gefau1t/trojan-go -GO_PKG_TAG:=-tags full +GO_PKG_BUILD_PKG:=$$(GO_PKG) + +GO_PKG_TAGS:=full GO_PKG_LDFLAGS:=-s -w GO_PKG_LDFLAGS_X:= \ $(GO_PKG)/constant.Version=$(PKG_VERSION) \ - $(GO_PKG)/constant.Commit=$(PKG_SOURCE_VERSION) + $(GO_PKG)/constant.Commit=v$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk @@ -36,7 +36,8 @@ include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk define Package/$(PKG_NAME) SECTION:=net CATEGORY:=Network - DEPENDS:=$(GO_ARCH_DEPENDS) + SUBMENU:=Web Servers/Proxies + DEPENDS:=$$(GO_ARCH_DEPENDS) TITLE:=An unidentifiable mechanism that helps you bypass GFW. It's compatible with original trojan with experimental features. URL:=https://github.com/p4gefau1t/trojan-go endef @@ -61,27 +62,14 @@ endef ifeq ($(CONFIG_TROJAN_GO_COMPRESS_GOPROXY),y) export GO111MODULE=on export GOPROXY=https://goproxy.io -#export GOPROXY=https://mirrors.aliyun.com/goproxy/ endif -define Build/Prepare - tar -zxvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1 -endef - define Build/Compile - $(eval GO_PKG_BUILD_PKG:=$(GO_PKG)) - $(call GoPackage/Build/Configure) - $(call GoPackage/Build/Compile,$(GO_PKG_TAG)) + $(call GoPackage/Build/Compile) ifeq ($(CONFIG_TROJAN_GO_COMPRESS_UPX),y) $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/$(PKG_NAME) endif endef -define Package/$(PKG_NAME)/install - $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME) -endef - $(eval $(call GoBinPackage,$(PKG_NAME))) $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/trojan-plus/Makefile b/trojan-plus/Makefile index aa64efb..5120ab7 100644 --- a/trojan-plus/Makefile +++ b/trojan-plus/Makefile @@ -8,19 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=trojan-plus PKG_VERSION:=10.0.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/peter-tank/trojan-plus.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_DATE:=2020-09-06 PKG_SOURCE_VERSION:=a6394cdd718669b0c7491493a78e61f6f0f899b3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_MIRROR_HASH:=2d37d09fe6d39d7981116ad387706f58f2b30b74a34e27fc5608f267dacc9208 -CMAKE_INSTALL:=1 -PKG_BUILD_PARALLEL:=0 +PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=openssl PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILE:=LICENSE PKG_MAINTAINER:=Trojan-Plus-Group include $(INCLUDE_DIR)/package.mk @@ -51,18 +51,19 @@ CMAKE_OPTIONS += \ -DBoost_DEBUG=ON \ -DBoost_NO_BOOST_CMAKE=ON -define Package/$(PKG_NAME) +define Package/trojan-plus SECTION:=net CATEGORY:=Network TITLE:=An unidentifiable mechanism that helps you bypass GFW. It's compatible with original trojan with experimental features. URL:=https://github.com/Trojan-Plus-Group/trojan-plus - DEPENDS:=+libpthread +libstdcpp +libopenssl \ + DEPENDS:= \ + +libpthread +libstdcpp +libopenssl \ +boost +boost-system +boost-program_options endef -define Package/$(PKG_NAME)/install +define Package/trojan-plus/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trojan $(1)/usr/sbin/$(PKG_NAME) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trojan $(1)/usr/sbin/trojan-plus endef -$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,trojan-plus)) diff --git a/trojan/Makefile b/trojan/Makefile index c86941d..d16dd51 100644 --- a/trojan/Makefile +++ b/trojan/Makefile @@ -8,19 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=trojan PKG_VERSION:=1.16.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/trojan-gfw/trojan.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=8606b7110fe79f8ab02d60c897f87ffb0a9b23f0 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/trojan-gfw/trojan/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=86cdb2685bb03a63b62ce06545c41189952f1ec4a0cd9147450312ed70956cbc -CMAKE_INSTALL:=1 -PKG_BUILD_PARALLEL:=0 +PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=openssl PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILE:=LICENSE PKG_MAINTAINER:=GreaterFire include $(INCLUDE_DIR)/package.mk @@ -56,7 +54,8 @@ define Package/trojan CATEGORY:=Network TITLE:=An unidentifiable mechanism that helps you bypass GFW URL:=https://github.com/trojan-gfw/trojan - DEPENDS:=+libpthread +libstdcpp +libopenssl \ + DEPENDS:= \ + +libpthread +libstdcpp +libopenssl \ +boost +boost-system +boost-program_options +boost-date_time endef