conmon: update to 2.1.6
[feed/packages.git] / utils / slide-switch / Makefile
1 #
2 # Copyright (C) 2016, 2018-2019, 2022 Jeffery To
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=slide-switch
11 PKG_VERSION:=1.0.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=https://github.com/jefferyto/openwrt-slide-switch.git
16 PKG_MIRROR_HASH:=6afa0b444b13fc9cec23643203cfd82526007156b459a4e98b728e1b321edfbd
17 PKG_SOURCE_VERSION:=$(PKG_VERSION)
18
19 PKG_BUILD_PARALLEL:=1
20 PKG_FIXUP:=autoreconf
21 PKG_INSTALL:=1
22
23 PKG_LICENSE:=GPL-2.0-only
24 PKG_LICENSE_FILES:=COPYING
25 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/slide-switch
30 SECTION:=utils
31 CATEGORY:=Utilities
32 TITLE:=Translate switch position change to button press
33 URL:=https://github.com/jefferyto/openwrt-slide-switch
34 DEPENDS:=+jshn +jsonfilter
35 PKGARCH:=all
36 endef
37
38 define Package/slide-switch/description
39 slide-switch translates slide switch position changes into normal button
40 presses and releases for OpenWrt devices.
41 endef
42
43 define Package/slide-switch/conffiles
44 /etc/slide-switch/switch-data.json
45 endef
46
47 define Package/slide-switch/install
48 $(INSTALL_DIR) $(1)/etc/hotplug.d/button
49 $(INSTALL_DATA) \
50 $(PKG_INSTALL_DIR)/etc/hotplug.d/button/50-slide-switch \
51 $(1)/etc/hotplug.d/button
52
53 $(INSTALL_DIR) $(1)/etc/init.d
54 $(INSTALL_BIN) \
55 $(PKG_INSTALL_DIR)/etc/init.d/slide-switch \
56 $(PKG_INSTALL_DIR)/etc/init.d/zzz-slide-switch-update \
57 $(1)/etc/init.d
58
59 $(INSTALL_DIR) $(1)/usr/sbin
60 $(INSTALL_BIN) \
61 $(PKG_INSTALL_DIR)/usr/sbin/slide-switch \
62 $(1)/usr/sbin
63
64 $(INSTALL_DIR) $(1)/usr/share/slide-switch
65 $(INSTALL_DATA) \
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
69 endef
70
71 $(eval $(call BuildPackage,slide-switch))