noddos: Noddos v0.5.0 with mDNS / DNS-SD support
[feed/packages.git] / utils / slide-switch / Makefile
1 #
2 # Copyright (C) 2016 OpenWrt.org
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:=0.9.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_SOURCE_VERSION:=9171c2ea9cc9cbfb6f27b7bc25a535c8c35ee534
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19
20 PKG_BUILD_PARALLEL:=1
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23
24 PKG_LICENSE:=GPL-2.0
25 PKG_LICENSE_FILES:=COPYING
26 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/slide-switch
31 SECTION:=utils
32 CATEGORY:=Utilities
33 DEPENDS:=+jshn +jsonfilter
34 TITLE:=Translate switch position change to button press
35 URL:=https://github.com/jefferyto/openwrt-slide-switch
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 / LEDE devices.
41 endef
42
43 CONFIGURE_ARGS += --with-platform=$(BOARD)
44
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; \
53 fi
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
58 endef
59
60 $(eval $(call BuildPackage,slide-switch))