2 # Copyright (C) 2016, 2018-2019, 2022 Jeffery To
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_MIRROR_HASH
:=6afa0b444b13fc9cec23643203cfd82526007156b459a4e98b728e1b321edfbd
17 PKG_SOURCE_VERSION
:=$(PKG_VERSION
)
23 PKG_LICENSE
:=GPL-2.0
-only
24 PKG_LICENSE_FILES
:=COPYING
25 PKG_MAINTAINER
:=Jeffery To
<jeffery.to@gmail.com
>
27 include $(INCLUDE_DIR
)/package.mk
29 define Package
/slide-switch
32 TITLE
:=Translate switch position change to button press
33 URL
:=https
://github.com
/jefferyto
/openwrt-slide-switch
34 DEPENDS
:=+jshn
+jsonfilter
38 define Package
/slide-switch
/description
39 slide-switch translates slide switch position changes into normal button
40 presses and releases for OpenWrt devices.
43 define Package
/slide-switch
/conffiles
44 /etc
/slide-switch
/switch-data.json
47 define Package
/slide-switch
/install
48 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/button
50 $(PKG_INSTALL_DIR
)/etc
/hotplug.d
/button
/50-slide-switch \
51 $(1)/etc
/hotplug.d
/button
53 $(INSTALL_DIR
) $(1)/etc
/init.d
55 $(PKG_INSTALL_DIR
)/etc
/init.d
/slide-switch \
56 $(PKG_INSTALL_DIR
)/etc
/init.d
/zzz-slide-switch-update \
59 $(INSTALL_DIR
) $(1)/usr
/sbin
61 $(PKG_INSTALL_DIR
)/usr
/sbin
/slide-switch \
64 $(INSTALL_DIR
) $(1)/usr
/share
/slide-switch
66 $(PKG_INSTALL_DIR
)/usr
/share
/slide-switch
/functions.sh \
67 $(PKG_INSTALL_DIR
)/usr
/share
/slide-switch
/switch-data.json \
68 $(1)/usr
/share
/slide-switch
71 $(eval
$(call BuildPackage
,slide-switch
))