diff --git a/README.md b/README.md index dd50baf..1e0bfb5 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Glorytun package for OpenWrt Add this line in your `feeds.conf.default`: - $ src-git glortun https://github.com/angt/glorytun-openwrt.git + src-git glorytun https://github.com/angt/glorytun-openwrt.git Or install in `package`: diff --git a/glorytun/Makefile b/glorytun/Makefile index 678933c..173088f 100644 --- a/glorytun/Makefile +++ b/glorytun/Makefile @@ -4,10 +4,12 @@ PKG_NAME:=glorytun PKG_VERSION:=0.0.2 PKG_RELEASE:=2 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/angt/glorytun.git +PKG_SOURCE_VERSION:=286f54aed469af30bd8bd53f3a7bf793fef97037 + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/angt/glorytun/releases/download/v$(PKG_VERSION) -PKG_CAT:=zcat -PKG_MD5SUM:=8535648ac8c5d075a0a7e7c4a13419f3 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk @@ -25,6 +27,16 @@ define Package/glorytun/description endef TARGET_CFLAGS += -std=c99 +TARGET_CFLAGS += -D_GNU_SOURCE + +define Package/glorytun/conffiles +/etc/config/glorytun +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); ./autogen.sh --host=$(GNU_TARGET_NAME) --target=$(GNU_TARGET_NAME); cd -); + $(call Build/Configure/Default,$CONFIGURE_ARGS) +endef define Package/glorytun/install $(INSTALL_DIR) $(1)/usr/sbin