source: trunk/make/zabbix/zabbix.mk @ 14411

Letzte Änderung dieser Datei seit 14411 war 14411, erstellt von er13 vor 3 Monaten

package Makefiles:

  • use PKG_ADD_EXTRA_FLAGS macro introduced in r14374 as much as possible
Dateigröße: 2.3 KB
Zeile 
1$(call PKG_INIT_BIN, 2.4.6)
2$(PKG)_SOURCE:=$(pkg)-$($(PKG)_VERSION).tar.gz
3$(PKG)_SOURCE_MD5:=06ad8d5808a0eddf2b9f0a256b6a5fde
4$(PKG)_SITE:=@SF/$(pkg)
5
6# sender & get should actually be installed to 'bin' and not 'sbin'... but in order to simplify the Makefile we install them all to 'sbin'
7$(PKG)_BINARIES_ALL           :=            agentd            server             proxy             sender             get
8$(PKG)_BINARIES_BUILD_SUBDIRS := src/zabbix_agent/ src/zabbix_server/ src/zabbix_proxy/ src/zabbix_sender/ src/zabbix_get/
9
10$(PKG)_BINARIES               := $(call PKG_SELECTED_SUBOPTIONS,$($(PKG)_BINARIES_ALL))
11$(PKG)_BINARIES_BUILD_DIR     := $(addprefix $($(PKG)_DIR)/,$(join $($(PKG)_BINARIES_BUILD_SUBDIRS),$($(PKG)_BINARIES_ALL:%=zabbix_%)))
12$(PKG)_BINARIES_TARGET_DIR    := $($(PKG)_BINARIES:%=$($(PKG)_DEST_DIR)/usr/sbin/zabbix_%)
13$(PKG)_EXCLUDED               += $(addprefix $($(PKG)_DEST_DIR)/usr/sbin/zabbix_,$(filter-out $($(PKG)_BINARIES),$($(PKG)_BINARIES_ALL)))
14$(PKG)_CATEGORY:=Unstable
15
16$(PKG)_DEPENDS_ON += sqlite
17ifeq ($(strip $(FREETZ_TARGET_UCLIBC_0_9_28)),y)
18$(PKG)_DEPENDS_ON += iconv
19endif
20
21$(PKG)_REBUILD_SUBOPTS += FREETZ_TARGET_IPV6_SUPPORT
22
23$(PKG)_PATCH_POST_CMDS += $(call PKG_ADD_EXTRA_FLAGS,(C|LD)FLAGS)
24
25$(PKG)_CONFIGURE_OPTIONS += $(if $(FREETZ_TARGET_IPV6_SUPPORT),--enable-ipv6,--disable-ipv6)
26$(PKG)_CONFIGURE_OPTIONS += --disable-java
27$(PKG)_CONFIGURE_OPTIONS += --enable-agent
28$(PKG)_CONFIGURE_OPTIONS += --enable-server
29$(PKG)_CONFIGURE_OPTIONS += --with-sqlite3="$(TARGET_TOOLCHAIN_STAGING_DIR)/usr"
30$(PKG)_CONFIGURE_OPTIONS += --enable-proxy
31
32$(PKG)_MAKE_FLAGS := ARCH=linux
33$(PKG)_MAKE_FLAGS += AR="$(TARGET_AR)"
34$(PKG)_MAKE_FLAGS += RANLIB="$(TARGET_RANLIB)"
35$(PKG)_MAKE_FLAGS += EXTRA_CFLAGS="-ffunction-sections -fdata-sections"
36$(PKG)_MAKE_FLAGS += EXTRA_LDFLAGS="-Wl,--gc-sections"
37
38$(PKG_SOURCE_DOWNLOAD)
39$(PKG_UNPACKED)
40$(PKG_CONFIGURED_CONFIGURE)
41
42$($(PKG)_BINARIES_BUILD_DIR): $($(PKG)_DIR)/.configured
43    $(SUBMAKE) -C $(ZABBIX_DIR) $(ZABBIX_MAKE_FLAGS)
44
45$(foreach binary,$($(PKG)_BINARIES_BUILD_DIR),$(eval $(call INSTALL_BINARY_STRIP_RULE,$(binary),/usr/sbin)))
46
47$(pkg):
48
49$(pkg)-precompiled: $($(PKG)_BINARIES_TARGET_DIR)
50
51$(pkg)-clean:
52    -$(SUBMAKE) -C $(ZABBIX_DIR) clean
53    -$(RM) $(ZABBIX_DIR)/.configured
54
55$(pkg)-uninstall:
56    $(RM) $(ZABBIX_DEST_DIR)/usr/sbin/zabbix_*
57
58$(PKG_FINISH)
Hinweis: Hilfe zum Repository-Browser finden Sie in TracBrowser.