mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
70
package/apcupsd/Config.in
Normal file
70
package/apcupsd/Config.in
Normal file
@@ -0,0 +1,70 @@
|
||||
config BR2_PACKAGE_APCUPSD
|
||||
bool "apcupsd"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
A daemon for controlling APC UPSes.
|
||||
|
||||
http://www.apcupsd.org/
|
||||
|
||||
if BR2_PACKAGE_APCUPSD
|
||||
|
||||
config BR2_PACKAGE_APCUPSD_APCSMART
|
||||
bool "apcsmart"
|
||||
help
|
||||
Compile APC SmartUPS serial driver
|
||||
|
||||
config BR2_PACKAGE_APCUPSD_DUMB
|
||||
bool "dumb"
|
||||
help
|
||||
Compile dumb UPS driver
|
||||
|
||||
config BR2_PACKAGE_APCUPSD_MODBUS
|
||||
bool "modbus"
|
||||
help
|
||||
Compile MODBUS driver code
|
||||
|
||||
config BR2_PACKAGE_APCUPSD_MODBUS_USB
|
||||
bool "modbus usb"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
|
||||
select BR2_PACKAGE_LIBUSB
|
||||
select BR2_PACKAGE_LIBUSB_COMPAT
|
||||
select BR2_PACKAGE_APCUPSD_MODBUS
|
||||
help
|
||||
Compile MODBUS/USB driver code
|
||||
|
||||
comment "modbus usb support needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
config BR2_PACKAGE_APCUPSD_NET
|
||||
bool "net"
|
||||
help
|
||||
Compile networking driver for slaves
|
||||
|
||||
config BR2_PACKAGE_APCUPSD_PCNET
|
||||
bool "pcnet"
|
||||
help
|
||||
Compile PCNET driver code
|
||||
|
||||
config BR2_PACKAGE_APCUPSD_SNMP
|
||||
bool "snmp"
|
||||
help
|
||||
Compile SNMP driver
|
||||
|
||||
config BR2_PACKAGE_APCUPSD_USB
|
||||
bool "usb"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
|
||||
select BR2_PACKAGE_LIBUSB
|
||||
select BR2_PACKAGE_LIBUSB_COMPAT
|
||||
help
|
||||
Compile USB UPS code
|
||||
|
||||
comment "usb support needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
endif
|
||||
|
||||
comment "apcupsd needs a toolchain w/ C++, threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
|
||||
6
package/apcupsd/apcupsd.hash
Normal file
6
package/apcupsd/apcupsd.hash
Normal file
@@ -0,0 +1,6 @@
|
||||
# From https://sourceforge.net/projects/apcupsd/files/apcupsd%20-%20Stable/3.14.14/
|
||||
md5 cc8f5ced77f38906a274787acb9bc980 apcupsd-3.14.14.tar.gz
|
||||
sha1 f027fa141c929371fe860443b6d911ef3a3606fb apcupsd-3.14.14.tar.gz
|
||||
# Locally computed:
|
||||
sha256 db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867 apcupsd-3.14.14.tar.gz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
81
package/apcupsd/apcupsd.mk
Normal file
81
package/apcupsd/apcupsd.mk
Normal file
@@ -0,0 +1,81 @@
|
||||
################################################################################
|
||||
#
|
||||
# apcupsd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
APCUPSD_VERSION = 3.14.14
|
||||
APCUPSD_SITE = http://downloads.sourceforge.net/project/apcupsd/apcupsd%20-%20Stable/$(APCUPSD_VERSION)
|
||||
APCUPSD_LICENSE = GPL-2.0
|
||||
APCUPSD_LICENSE_FILES = COPYING
|
||||
APCUPSD_CONF_OPTS = --disable-test
|
||||
|
||||
ifneq ($(BR2_PACKAGE_APCUPSD_MODBUS_USB)$(BR2_PACKAGE_APCUPSD_USB),)
|
||||
APCUPSD_CONF_ENV += ac_cv_path_usbcfg=$(STAGING_DIR)/usr/bin/libusb-config
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
APCUPSD_DEPENDENCIES += host-pkgconf
|
||||
APCUPSD_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libusb`"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_APCUPSD_APCSMART),y)
|
||||
APCUPSD_CONF_OPTS += --enable-apcsmart
|
||||
else
|
||||
APCUPSD_CONF_OPTS += --disable-apcsmart
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_APCUPSD_DUMB),y)
|
||||
APCUPSD_CONF_OPTS += --enable-dumb
|
||||
else
|
||||
APCUPSD_CONF_OPTS += --disable-dumb
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_APCUPSD_MODBUS_USB),y)
|
||||
APCUPSD_CONF_OPTS += --enable-modbus-usb
|
||||
APCUPSD_DEPENDENCIES = libusb libusb-compat
|
||||
else
|
||||
APCUPSD_CONF_OPTS += --disable-modbus-usb
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_APCUPSD_MODBUS),y)
|
||||
APCUPSD_CONF_OPTS += --enable-modbus
|
||||
else
|
||||
APCUPSD_CONF_OPTS += --disable-modbus
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_APCUPSD_NET),y)
|
||||
APCUPSD_CONF_OPTS += --enable-net
|
||||
else
|
||||
APCUPSD_CONF_OPTS += --disable-net
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_APCUPSD_PCNET),y)
|
||||
APCUPSD_CONF_OPTS += --enable-pcnet
|
||||
else
|
||||
APCUPSD_CONF_OPTS += --disable-pcnet
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_APCUPSD_SNMP),y)
|
||||
APCUPSD_CONF_OPTS += --enable-snmp
|
||||
else
|
||||
APCUPSD_CONF_OPTS += --disable-snmp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_APCUPSD_USB),y)
|
||||
APCUPSD_CONF_OPTS += --enable-usb
|
||||
APCUPSD_DEPENDENCIES = libusb libusb-compat
|
||||
else
|
||||
APCUPSD_CONF_OPTS += --disable-usb
|
||||
endif
|
||||
|
||||
define APCUPSD_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/platforms
|
||||
endef
|
||||
|
||||
define APCUPSD_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) install
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/platforms DESTDIR=$(TARGET_DIR) install
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user