tweak Makefile, only build package variants when they are selected, replace DESCRIPTION:= with Package/*/description
git-svn-id: svn://svn.openwrt.org/openwrt/packages@8488 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
7d6343ea21
commit
7ae072d5da
@ -11,76 +11,98 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=monit
|
||||
PKG_VERSION:=4.9
|
||||
PKG_RELEASE:=1
|
||||
PKG_MD5SUM:=bcbaab776a54d1e34e3a057c925de9ca
|
||||
|
||||
PKG_SOURCE_URL:=http://www.tildeslash.com/monit/dist/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=http://www.tildeslash.com/monit/dist/
|
||||
PKG_MD5SUM:=bcbaab776a54d1e34e3a057c925de9ca
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/monit
|
||||
define Package/monit/Default
|
||||
SECTION:=admin
|
||||
CATEGORY:=Administration
|
||||
DEPENDS:=+libpthread +libopenssl
|
||||
TITLE:=System services monitoring utility, with SSL support
|
||||
DESCRIPTION:=An utility for monitoring services on a Unix system\\\
|
||||
This package is built with SSL support.\\\
|
||||
DEPENDS:= +libpthread
|
||||
TITLE:=System services monitoring utility
|
||||
URL:=http://www.tildeslash.com/monit
|
||||
endef
|
||||
|
||||
define Package/monit/conffiles
|
||||
/etc/monitrc
|
||||
define Package/monit/Default/description
|
||||
An utility for monitoring services on a Unix system
|
||||
endef
|
||||
|
||||
define Package/monit
|
||||
$(call Package/monit/Default)
|
||||
DEPENDS+= +libopenssl
|
||||
TITLE+= (with SSL support)
|
||||
endef
|
||||
|
||||
define Package/monit/description
|
||||
$(call Package/monit/Default/description)
|
||||
This package is built with SSL support.
|
||||
endef
|
||||
|
||||
define Package/monit-nossl
|
||||
SECTION:=admin
|
||||
CATEGORY:=Administration
|
||||
TITLE:=System services monitoring utility, without SSL support
|
||||
DESCRIPTION:=An utility for monitoring services on a Unix system.\\\
|
||||
This package is built without SSL support.\\\
|
||||
URL:=http://www.tildeslash.com/monit
|
||||
$(call Package/monit/Default)
|
||||
TITLE+= (without SSL support)
|
||||
endef
|
||||
|
||||
define Package/monit/conffiles
|
||||
define Package/monit-nossl/description
|
||||
$(call Package/monit/Default/description)
|
||||
This package is built without SSL support.
|
||||
endef
|
||||
|
||||
|
||||
define Build/Template
|
||||
|
||||
$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
|
||||
-$(MAKE) -C $(PKG_BUILD_DIR) clean
|
||||
$(call Build/Configure/Default,$(3))
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)
|
||||
( cd $(PKG_BUILD_DIR); mv -f monit monit-$(2) )
|
||||
touch $$@
|
||||
|
||||
$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
|
||||
|
||||
define Package/monit$(1)/conffiles
|
||||
/etc/monitrc
|
||||
endef
|
||||
|
||||
define Package/$(1)/install
|
||||
$(INSTALL_DIR) $$(1)/etc
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $$(1)/etc/
|
||||
$(INSTALL_DIR) $$(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/monit.init $$(1)/etc/init.d/monit
|
||||
$(INSTALL_DIR) $$(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/monit-$(2) $$(1)/usr/sbin/monit
|
||||
endef
|
||||
|
||||
endef
|
||||
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default,--with-ssl \
|
||||
--with-ssl-dir="$(STAGING_DIR)/usr" \
|
||||
)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)
|
||||
mv $(PKG_BUILD_DIR)/monit $(PKG_BUILD_DIR)/monit-ssl
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) clean
|
||||
$(call Build/Configure/Default,--without-ssl)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
clean all
|
||||
mv $(PKG_BUILD_DIR)/monit $(PKG_BUILD_DIR)/monit-nossl
|
||||
endef
|
||||
|
||||
define Package/monit/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/monit-ssl $(1)/usr/sbin/monit
|
||||
endef
|
||||
ifneq ($(SDK)$(CONFIG_PACKAGE_monit),)
|
||||
define Build/with-ssl
|
||||
$(call Build/Template,monit,with-ssl, \
|
||||
--with-ssl \
|
||||
--with-ssl-dir="$(STAGING_DIR)/usr" \
|
||||
)
|
||||
endef
|
||||
endif
|
||||
$(eval $(Build/with-ssl))
|
||||
|
||||
define Package/monit-nossl/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/monit-nossl $(1)/usr/sbin/monit
|
||||
endef
|
||||
ifneq ($(SDK)$(CONFIG_PACKAGE_monit-nossl),)
|
||||
define Build/without-ssl
|
||||
$(call Build/Template,monit-nossl,without-ssl, \
|
||||
--without-ssl \
|
||||
)
|
||||
endef
|
||||
endif
|
||||
$(eval $(Build/without-ssl))
|
||||
|
||||
$(eval $(call BuildPackage,monit))
|
||||
$(eval $(call BuildPackage,monit-nossl))
|
||||
|
Loading…
x
Reference in New Issue
Block a user