diff --git a/utils/slide-switch/Makefile b/utils/slide-switch/Makefile index de92f3b67..c4344ecb3 100644 --- a/utils/slide-switch/Makefile +++ b/utils/slide-switch/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2016, 2018 Jeffery To +# Copyright (C) 2016, 2018-2019 Jeffery To # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=slide-switch -PKG_VERSION:=0.9.3 +PKG_VERSION:=0.9.4 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/jefferyto/openwrt-slide-switch.git -PKG_SOURCE_VERSION:=c43b6184292dc60949aa22e2b1730ced9fe34a49 +PKG_SOURCE_VERSION:=0.9.4 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(call version_abbrev,$(PKG_SOURCE_VERSION)).tar.xz -PKG_MIRROR_HASH:=9ba1b8c978d14b7b70fa61fbf14513ef508a7dbb2a75638088532e4258de6a1b +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz +PKG_MIRROR_HASH:=52a93506c994b1babf174aec8ac8aebbf94f27263125d144f6d86db001dd24d6 PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf @@ -29,33 +29,40 @@ PKG_MAINTAINER:=Jeffery To include $(INCLUDE_DIR)/package.mk define Package/slide-switch - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+jshn +jsonfilter - TITLE:=Translate switch position change to button press - URL:=https://github.com/jefferyto/openwrt-slide-switch + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Translate switch position change to button press + URL:=https://github.com/jefferyto/openwrt-slide-switch + DEPENDS:=+jshn +jsonfilter + PKGARCH:=all endef define Package/slide-switch/description slide-switch translates slide switch position changes into normal button -presses and releases for OpenWrt / LEDE devices. +presses and releases for OpenWrt devices. endef -CONFIGURE_ARGS += --with-platform=$(BOARD) - define Package/slide-switch/install $(INSTALL_DIR) $(1)/etc/hotplug.d/button - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/hotplug.d/button/50-slide-switch $(1)/etc/hotplug.d/button + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/etc/hotplug.d/button/50-slide-switch \ + $(1)/etc/hotplug.d/button + $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/init.d/zzz-slide-switch $(1)/etc/init.d - if [ -d $(PKG_INSTALL_DIR)/usr/lib/slide-switch ]; then \ - $(INSTALL_DIR) $(1)/usr/lib/slide-switch; \ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/slide-switch/* $(1)/usr/lib/slide-switch; \ - fi + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/etc/init.d/zzz-slide-switch \ + $(1)/etc/init.d + $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/slide-switch $(1)/usr/sbin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/sbin/slide-switch \ + $(1)/usr/sbin + $(INSTALL_DIR) $(1)/usr/share/slide-switch - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/slide-switch/functions.sh $(1)/usr/share/slide-switch + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/slide-switch/functions.sh \ + $(PKG_INSTALL_DIR)/usr/share/slide-switch/switch-data.json \ + $(1)/usr/share/slide-switch endef $(eval $(call BuildPackage,slide-switch))