################################################################################
#
# blinddooropener
#
################################################################################

BLINDDOOROPENER_VERSION = $(shell git ls-remote https://git.SDNsupport.nl:4000/H1502/H1502_blind_door_opener.git master | awk '{print$$1}')
BLINDDOOROPENER_SITE = https://git.SDNsupport.nl:4000/H1502/H1502_blind_door_opener.git
#BLINDDOOROPENER_SITE = ~/Blind_SIP_door_opener
BLINDDOOROPENER_SITE_METHOD = git
BLINDDOOROPENER_LICENSE = GPL
BLINDDOOROPENER_DEPENDENCIES = dcron linphone

define BLINDDOOROPENER_BUILD_CMDS
	$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
endef

define BLINDDOOROPENER_INSTALL_TARGET_CMDS
	$(INSTALL) -D -m 0755 $(@D)/blinddooropener $(TARGET_DIR)/bin
	$(INSTALL) -D -m 0755 $(@D)/checkdooropener $(TARGET_DIR)/etc
	$(INSTALL) -D -m 0755 $(@D)/SIPprtg $(TARGET_DIR)/etc
endef

define BLINDDOOROPENER_INSTALL_INIT_SYSV
	$(INSTALL) -D -m 0755 $(@D)/S25Sip $(TARGET_DIR)/etc/init.d
	$(INSTALL) -D -m 0755 $(@D)/S26SipCron $(TARGET_DIR)/etc/init.d
	$(INSTALL) -D -m 0755 $(@D)/S95PrtgCron $(TARGET_DIR)/etc/init.d
endef

$(eval $(generic-package))
