Browse Source

Update Makefile

1./etc/config下的配置文件都是uci的配置文件,所以建议将shadowsocks.json置于/etc/shadowsocks.json
2.PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION),为两个版本设置不同的编译目录,否则当同时编译两个版本时出错
3.优化安装脚本
pull/50/head
南浦月 10 years ago
parent
commit
82d6d2f772
1 changed files with 8 additions and 8 deletions
  1. 16
      openwrt/Makefile

16
openwrt/Makefile

@ -11,9 +11,10 @@ PKG_SOURCE_VERSION:=69f8bd61c096337abb34a9e64534865d08022957
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=Max Lv <max.c.lv@gmail.com> PKG_MAINTAINER:=Max Lv <max.c.lv@gmail.com>
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -46,7 +47,7 @@ endef
Package/shadowsocks-libev-polarssl/description=$(Package/shadowsocks-libev/description) Package/shadowsocks-libev-polarssl/description=$(Package/shadowsocks-libev/description)
define Package/shadowsocks-libev/conffiles define Package/shadowsocks-libev/conffiles
/etc/config/shadowsocks.json
/etc/shadowsocks.json
endef endef
ifeq ($(BUILD_VARIANT),polarssl) ifeq ($(BUILD_VARIANT),polarssl)
@ -54,12 +55,11 @@ ifeq ($(BUILD_VARIANT),polarssl)
endif endif
define Package/shadowsocks-libev/install define Package/shadowsocks-libev/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ss-local
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ss-redir
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ss-tunnel
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_CONF) ./files/shadowsocks.json $(1)/etc
$(INSTALL_BIN) ./files/shadowsocks.init $(1)/etc/init.d/shadowsocks $(INSTALL_BIN) ./files/shadowsocks.init $(1)/etc/init.d/shadowsocks
$(INSTALL_CONF) ./files/shadowsocks.json $(1)/etc/config/shadowsocks.json
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-{local,redir,tunnel} $(1)/usr/bin
endef endef
Package/shadowsocks-libev-polarssl/install=$(Package/shadowsocks-libev/install) Package/shadowsocks-libev-polarssl/install=$(Package/shadowsocks-libev/install)

Loading…
Cancel
Save