kumquat-buildroot/package/bandwidthd/bandwidthd.mk
Nathaniel Roach f1b07c06fa bandwidthd: Add systemd unit file and install it to run at startup.
Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-11 20:44:52 +01:00

45 lines
1.3 KiB
Makefile

################################################################################
#
# bandwidthd
#
################################################################################
BANDWIDTHD_VERSION = v2.0.1-auto-r11
BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION))
# Specified as "any version of the GPL that is current as of your
# download" by upstream.
BANDWIDTHD_LICENSE = GPL
BANDWIDTHD_DEPENDENCIES = gd libpng libpcap host-pkgconf
BANDWIDTHD_AUTORECONF = YES
BANDWIDTHD_CONF_OPTS += --with-pcap-config=$(STAGING_DIR)/usr/bin/pcap-config
ifeq ($(BR2_PACKAGE_BANDWIDTHD_POSTGRESQL),y)
BANDWIDTHD_DEPENDENCIES += postgresql
BANDWIDTHD_CONF_OPTS += --with-postgresql-logging=true
else
BANDWIDTHD_CONF_OPTS += --with-postgresql-logging=false
endif
ifeq ($(BR2_PACKAGE_BANDWIDTHD_SQLITE3),y)
BANDWIDTHD_DEPENDENCIES += sqlite
BANDWIDTHD_CONF_OPTS += --with-sqlite-storage=true
else
BANDWIDTHD_CONF_OPTS += --with-sqlite-storage=false
endif
define BANDWIDTHD_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/bandwidthd/bandwidthd.service \
$(TARGET_DIR)/usr/lib/systemd/system/bandwidthd.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf /usr/lib/systemd/system/bandwidthd.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/bandwidthd.service
endef
$(eval $(autotools-package))