| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 | # This file is part of the OpenADK project. OpenADK is copyrighted# material, please see the LICENCE file in the top-level directory.include ${TOPDIR}/rules.mkPKG_NAME:=		nutPKG_VERSION:=		2.4.1PKG_RELEASE:=		1PKG_MD5SUM:=		609ebaf2123fc7171d25a6c742dd7d66PKG_DESCR:=		Network UPS ToolsPKG_SECTION:=		sysPKG_URL:=		http://www.networkupstools.orgPKG_SITES:=		http://www.networkupstools.org/source/2.4/include ${TOPDIR}/mk/package.mkifneq (${ADK_PACKAGE_NUT_SNMP},)PKG_DEPENDS+=	libnetsnmpendififneq (${ADK_PACKAGE_NUT_USB},)PKG_DEPENDS+=	libusbendififneq (${ADK_PACKAGE_NUT_SSL},)PKG_DEPENDS+=	libopensslendif$(eval $(call PKG_template,NUT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))define DRIVER_templateDRIVERS_$${ADK_PACKAGE_NUT_DRIVER_${1}}+=${2}endefDRIVERS_y:=$(eval $(call DRIVER_template,BESTUPS,bestups))$(eval $(call DRIVER_template,APCSMART,apcsmart))$(eval $(call DRIVER_template,EVERUPS,everups))$(eval $(call DRIVER_template,BELKIN,belkin))$(eval $(call DRIVER_template,MASTERGUARD,masterguard))$(eval $(call DRIVER_template,POWERCOM,powercom))$(eval $(call DRIVER_template,POWERPANEL,powerpanel))$(eval $(call DRIVER_template,CYBERPOWER,cyberpower))$(eval $(call DRIVER_template,TRIPPLITE,tripplite))$(eval $(call DRIVER_template,VICTRONUPS,victronups))$(eval $(call DRIVER_template,GENERICUPS,genericups))$(eval $(call DRIVER_template,MGE_UTALK,mge-utalk))$(eval $(call DRIVER_template,BESTUFERRUPS,bestuferrups))$(eval $(call DRIVER_template,ISBMEX,isbmex))$(eval $(call DRIVER_template,ETAPRO,etapro))$(eval $(call DRIVER_template,LIEBERT,liebert))$(eval $(call DRIVER_template,TRIPPLITESU,tripplitesu))$(eval $(call DRIVER_template,SAFENET,safenet))$(eval $(call DRIVER_template,BELKINUNV,belkinunv))$(eval $(call DRIVER_template,ONEAC,oneac))$(eval $(call DRIVER_template,METASYS,metasys))$(eval $(call DRIVER_template,BESTFCOM,bestfcom))$(eval $(call DRIVER_template,UPSCODE2,upscode2))$(eval $(call DRIVER_template,SOLIS,solis))$(eval $(call DRIVER_template,GAMATRONIC,gamatronic))$(eval $(call DRIVER_template,MEGATEC,megatec))$(eval $(call DRIVER_template,RHINO,rhino))CONFIG_DRIVERS=$(shell echo ${DRIVERS_y} | tr ' ' ',')INSTALL_DRIVERS_tmp=${DRIVERS_y}ifneq (${ADK_PACKAGE_NUT_USB},)INSTALL_DRIVERS_tmp+=	usbhid-ups tripplite_usbendififneq (${ADK_PACKAGE_NUT_SNMP},)INSTALL_DRIVERS_tmp+=	snmp-upsendifINSTALL_DRIVERS=$(shell echo ${INSTALL_DRIVERS_tmp} | tr ' ' ',')CONFIGURE_STYLE:=	gnuCONFIGURE_ARGS+=	--with-linux-hiddev=${LINUX_DIR}/include/linux/hiddev.h \			--without-cgi \			--with-drivers=${INSTALL_DRIVERS} \			--with-group=0 \			--with-user=0ifneq (${ADK_PACKAGE_NUT_SSL},)CONFIGURE_ARGS+=	--with-sslCONFIGURE_ENV+=		CPPFLAGS="${TCPPFLAGS} ${TLDFLAGS}"MAKE_FLAGS+=		SSL_CFLAGS="${TCPPFLAGS}" SSL_LDFLAGS="${TLDFLAGS} -lssl -lcrypto"endifBUILD_STYLE:=		autoALL_TARGET:=		all INSTALL_STYLE:=		autoINSTALL_TARGET:=	installifneq (${ADK_PACKAGE_NUT_USB},)ALL_TARGET+=		usbINSTALL_TARGET+=	install-usbendififneq (${ADK_PACKAGE_NUT_SNMP},)ALL_TARGET+=		snmpINSTALL_TARGET+=	install-snmpendifpost-install:	${INSTALL_DIR} ${IDIR_NUT}/usr/{s,}bin ${IDIR_NUT}/etc	${INSTALL_DIR} ${IDIR_NUT}/usr/lib	${INSTALL_BIN} ${WRKINST}/usr/sbin/ups{d,mon,sched} \		${IDIR_NUT}/usr/sbin/	${CP} ${WRKINST}/usr/lib/lib*.so* ${IDIR_NUT}/usr/lib 	${INSTALL_BIN} ${WRKINST}/usr/bin/{${INSTALL_DRIVERS}} \		${IDIR_NUT}/usr/bin/	${INSTALL_BIN} ${WRKINST}/usr/bin/ups{c,cmd,drvctl,log,rw} \		${IDIR_NUT}/usr/bin/	${INSTALL_DATA} ./files/ups{d,}.conf ${IDIR_NUT}/etc/ifneq (${ADK_PACKAGE_NUT_VARDESC},)	${INSTALL_DIR} ${IDIR_NUT}/usr/share	${INSTALL_DATA} ${WRKINST}/usr/share/cmdvartab \		${IDIR_NUT}/usr/share/endifinclude ${TOPDIR}/mk/pkg-bottom.mk
 |