iopsys-feed/obuspa/Makefile
Andreas Gnau d2b9140468 treewide: Add PKG_MIRROR_HASH:=skip to pkgs downloaded from git
OpenWrt 21.02 will redownload from git over and over if PKG_MIRROR_HASH
is not set. Set it to skip to prevent it from happening.
2021-03-15 10:57:13 +01:00

61 lines
1.4 KiB
Makefile

#
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=3.0.0.22
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d6759c812789f040c0bea186bab9d2d89ff76e3f
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/obuspa
SECTION:=utils
CATEGORY:=Utilities
TITLE:=USP agent
DEPENDS:=+libopenssl +libcurl +libsqlite3 +libubox +libubus +uspd +libmosquitto
endef
define Package/obuspa/description
OB-USP-AGENT is a system daemon providing a User Services Platform (USP) Agent.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/obuspa/* $(PKG_BUILD_DIR)/
endef
endif
define Package/obuspa/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/obuspa
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspa $(1)/usr/sbin/
$(INSTALL_BIN) ./files/etc/init.d/obuspa $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/config/obuspa $(1)/etc/config/
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-obuspa $(1)/etc/hotplug.d/iface/
endef
$(eval $(call BuildPackage,obuspa))