2 # Copyright (C) 2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=slide-switch
15 PKG_SOURCE_URL
:=https
://github.com
/jefferyto
/openwrt-slide-switch.git
16 PKG_SOURCE_VERSION
:=9171c2ea9cc9cbfb6f27b7bc25a535c8c35ee534
17 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
25 PKG_LICENSE_FILES
:=COPYING
26 PKG_MAINTAINER
:=Jeffery To
<jeffery.to@gmail.com
>
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/slide-switch
33 DEPENDS
:=+jshn
+jsonfilter
34 TITLE
:=Translate switch position changes into normal button presses
35 URL
:=https
://github.com
/jefferyto
/openwrt-slide-switch
38 define Package
/slide-switch
/description
39 slide-switch translates slide switch position changes into normal button
40 presses and releases for OpenWrt
/ LEDE devices.
43 CONFIGURE_ARGS
+= --with-platform
=$(BOARD
)
45 define Package
/slide-switch
/install
46 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/button
47 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/hotplug.d
/button
/50-slide-switch
$(1)/etc
/hotplug.d
/button
48 $(INSTALL_DIR
) $(1)/etc
/init.d
49 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/etc
/init.d
/zzz-slide-switch
$(1)/etc
/init.d
50 if
[ -d
$(PKG_INSTALL_DIR
)/usr
/lib
/slide-switch
]; then \
51 $(INSTALL_DIR
) $(1)/usr
/lib
/slide-switch
; \
52 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/slide-switch
/* $(1)/usr
/lib
/slide-switch
; \
54 $(INSTALL_DIR
) $(1)/usr
/sbin
55 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/slide-switch
$(1)/usr
/sbin
56 $(INSTALL_DIR
) $(1)/usr
/share
/slide-switch
57 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/slide-switch
/functions.sh
$(1)/usr
/share
/slide-switch
60 $(eval
$(call BuildPackage
,slide-switch
))