5 kx
5 kx COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
5 kx COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
5 kx COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
5 kx COMPONENT_TARGETS += $(HARDWARE_CB1X)
5 kx COMPONENT_TARGETS += $(HARDWARE_CB2X)
5 kx COMPONENT_TARGETS += $(HARDWARE_CB3X)
5 kx COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
5 kx COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
5 kx COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
5 kx COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
385 kx COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5)
385 kx COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5B)
385 kx COMPONENT_TARGETS += $(HARDWARE_ORANGE_PI5P)
385 kx COMPONENT_TARGETS += $(HARDWARE_ROCK_5B)
5 kx COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
385 kx COMPONENT_TARGETS += $(HARDWARE_REPKA_PI3)
5 kx COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
5 kx COMPONENT_TARGETS += $(HARDWARE_POIN2)
5 kx COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
5 kx COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
5 kx COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
5 kx COMPONENT_TARGETS += $(HARDWARE_M201)
5 kx COMPONENT_TARGETS += $(HARDWARE_MXV)
5 kx COMPONENT_TARGETS += $(HARDWARE_P201)
5 kx COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
5 kx COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
5 kx COMPONENT_TARGETS += $(HARDWARE_P212)
5 kx COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
5 kx COMPONENT_TARGETS += $(HARDWARE_Q201)
5 kx COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
5 kx COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
5 kx COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
5 kx COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
5 kx COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
5 kx COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
5 kx COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
5 kx COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
5 kx COMPONENT_TARGETS += $(HARDWARE_CI20)
5 kx COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
5 kx COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
5 kx COMPONENT_TARGETS += $(HARDWARE_S824L)
5 kx COMPONENT_TARGETS += $(HARDWARE_VESNIN)
5 kx COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
5 kx COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
5 kx COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
5 kx COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
5 kx COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
5 kx COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
385 kx COMPONENT_TARGETS += $(HARDWARE_VISIONFIVE2)
5 kx COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
5 kx
5 kx
5 kx NEED_ABS_PATH = true
5 kx COMPONENT_IS_3PP = true
5 kx
5 kx
5 kx include ../../../build-system/constants.mk
5 kx
5 kx
5 kx SOURCE_REQUIRES = sources/packages/n/nfacct
5 kx
5 kx REQUIRES = net/libmnl/1.0.4
5 kx REQUIRES += net/libnetfilter_acct/1.0.3
5 kx
5 kx # ======= __END_OF_REQUIRES__ =======
5 kx
5 kx
5 kx version = 1.0.2
5 kx tar_bz2_archive = $(SRC_PACKAGE_PATH)/packages/n/nfacct/nfacct-$(version).tar.bz2
5 kx SRC_ARCHIVE = $(tar_bz2_archive)
5 kx SRC_DIR = $(TARGET_BUILD_DIR)/nfacct-$(version)
5 kx src_dir_name = nfacct-$(version)
5 kx src_done = $(TARGET_BUILD_DIR)/.source_done
5 kx
5 kx PATCHES = PATCHES
5 kx
5 kx build_dir = $(TARGET_BUILD_DIR)/build
5 kx build_target = $(TARGET_BUILD_DIR)/.build_done
5 kx install_target = $(TARGET_BUILD_DIR)/.install_done
5 kx
5 kx
5 kx ####### Targets
5 kx
5 kx PKG_GROUP = net
5 kx
5 kx #
5 kx # *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
5 kx #
5 kx NFACCT_PKG_NAME = nfacct
5 kx NFACCT_PKG_VERSION = 1.0.2
5 kx NFACCT_PKG_ARCH = $(PKGARCH)
5 kx NFACCT_PKG_DISTRO_NAME = $(DISTRO_NAME)
5 kx NFACCT_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
5 kx NFACCT_PKG_GROUP = $(PKG_GROUP)
5 kx ### |---handy-ruler-------------------------------|
5 kx NFACCT_PKG_SHORT_DESCRIPTION = accounting objects tool
5 kx NFACCT_PKG_URL = $(BUG_URL)
5 kx NFACCT_PKG_LICENSE = GPLv2
5 kx NFACCT_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(NFACCT_PKG_NAME)-pkg-description
5 kx NFACCT_PKG_DESCRIPTION_FILE_IN = $(NFACCT_PKG_NAME)-pkg-description.in
5 kx NFACCT_PKG_INSTALL_SCRIPT = $(NFACCT_PKG_NAME)-pkg-install.sh
5 kx
5 kx NFACCT_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(NFACCT_PKG_NAME)-package
5 kx
5 kx pkg_basename = $(NFACCT_PKG_NAME)-$(NFACCT_PKG_VERSION)-$(NFACCT_PKG_ARCH)-$(NFACCT_PKG_DISTRO_NAME)-$(NFACCT_PKG_DISTRO_VERSION)
5 kx
5 kx pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
5 kx pkg_certificate = $(call cert-name,$(pkg_archive))
5 kx pkg_signature = $(call sign-name,$(pkg_archive))
5 kx pkg_description = $(call desc-name,$(pkg_archive))
5 kx products = $(call pkg-files,$(pkg_archive))
5 kx
5 kx BUILD_TARGETS = $(build_target)
5 kx BUILD_TARGETS += $(install_target)
5 kx
5 kx PRODUCT_TARGETS = $(products)
5 kx
5 kx ROOTFS_TARGETS = $(pkg_archive)
5 kx
5 kx
5 kx include ../../../build-system/core.mk
5 kx
5 kx
5 kx env_sysroot = DESTDIR=$(NFACCT_PKG)
5 kx
5 kx
5 kx extra_configure_switches = --libdir=/usr/lib$(LIBSUFFIX)
5 kx extra_configure_switches += --docdir=/usr/share/doc/$(src_dir_name)
5 kx extra_configure_switches += --mandir=/usr/share/man
5 kx extra_configure_switches += --sysconfdir=/etc/conntrackd
5 kx extra_configure_switches += --enable-static=no
5 kx
5 kx
5 kx LDFLAGS += -Wl,-rpath,/lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
5 kx
5 kx TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
5 kx
5 kx
5 kx ####### Dependencies
5 kx
5 kx $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
5 kx $(UNPACK_SRC_ARCHIVE)
5 kx $(APPLY_PATCHES)
5 kx @cp -a $(CONFIG_GUESS) $(CONFIG_SUB) $(SRC_DIR)
5 kx @touch $@
5 kx
5 kx $(build_target): $(src_done)
5 kx @mkdir -p $(build_dir)
5 kx @cd $(build_dir) && $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
5 kx --prefix=/usr \
5 kx --build=$(BUILD) \
5 kx --host=$(TARGET) \
5 kx $(extra_configure_switches)
5 kx @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE)
5 kx @touch $@
5 kx
5 kx $(install_target): $(build_target)
5 kx @mkdir -p $(NFACCT_PKG)
5 kx @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
5 kx # ======= Install Documentation =======
5 kx @if [ -d $(NFACCT_PKG)/usr/share/man ]; then \
5 kx ( cd $(NFACCT_PKG)/usr/share/man ; \
5 kx for manpagedir in `find . -type d -name "man*"` ; do \
5 kx ( cd $$manpagedir ; \
5 kx for eachpage in `find . -type l -maxdepth 1` ; do \
5 kx ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
5 kx rm $$eachpage ; \
5 kx done ; \
5 kx gzip -9 *.? ; \
5 kx ) \
5 kx done \
5 kx ) \
5 kx fi
5 kx @mkdir -p $(NFACCT_PKG)/usr/doc/$(src_dir_name)
5 kx @cp -a $(SRC_DIR)/COPYING \
5 kx $(NFACCT_PKG)/usr/doc/$(src_dir_name)
5 kx @mkdir -p $(NFACCT_PKG)/usr/share/doc/$(src_dir_name)
5 kx @( cd $(SRC_DIR) ; \
5 kx cp -a COPYING \
5 kx $(NFACCT_PKG)/usr/share/doc/$(src_dir_name) ; \
5 kx )
5 kx @( cd $(SRC_DIR) ; \
5 kx if [ -r ChangeLog ]; then \
5 kx DOCSDIR=`echo $(NFACCT_PKG)/usr/share/doc/$(src_dir_name)` ; \
5 kx cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
5 kx touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
5 kx fi \
5 kx )
5 kx # ======= Install the same to $(TARGET_DEST_DIR) =======
5 kx $(call install-into-devenv, $(NFACCT_PKG))
5 kx # ======= Strip binaries =======
5 kx @( cd $(NFACCT_PKG) ; \
5 kx find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
5 kx )
5 kx ifneq ($(PATCHELF),)
5 kx # ======= Set RPATH/RUNPATH for target binaries =======
5 kx @( cd $(NFACCT_PKG)/usr/sbin ; \
5 kx for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
5 kx rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
5 kx if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
5 kx $(PATCHELF) --set-rpath $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
5 kx fi ; \
5 kx done ; \
5 kx )
5 kx endif
5 kx @touch $@
5 kx
5 kx $(NFACCT_PKG_DESCRIPTION_FILE): $(NFACCT_PKG_DESCRIPTION_FILE_IN)
5 kx @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
5 kx
5 kx $(pkg_certificate) : $(pkg_archive) ;
5 kx $(pkg_signature) : $(pkg_archive) ;
5 kx $(pkg_description) : $(pkg_archive) ;
5 kx
5 kx $(pkg_archive): $(install_target) $(NFACCT_PKG_DESCRIPTION_FILE) $(NFACCT_PKG_INSTALL_SCRIPT)
5 kx @cp $(NFACCT_PKG_DESCRIPTION_FILE) $(NFACCT_PKG)/.DESCRIPTION
5 kx @cp $(NFACCT_PKG_INSTALL_SCRIPT) $(NFACCT_PKG)/.INSTALL
5 kx @$(BUILD_PKG_REQUIRES) $(NFACCT_PKG)/.REQUIRES
5 kx @echo "pkgname=$(NFACCT_PKG_NAME)" > $(NFACCT_PKG)/.PKGINFO ; \
5 kx echo "pkgver=$(NFACCT_PKG_VERSION)" >> $(NFACCT_PKG)/.PKGINFO ; \
5 kx echo "arch=$(NFACCT_PKG_ARCH)" >> $(NFACCT_PKG)/.PKGINFO ; \
5 kx echo "distroname=$(NFACCT_PKG_DISTRO_NAME)" >> $(NFACCT_PKG)/.PKGINFO ; \
5 kx echo "distrover=$(NFACCT_PKG_DISTRO_VERSION)" >> $(NFACCT_PKG)/.PKGINFO ; \
5 kx echo "group=$(NFACCT_PKG_GROUP)" >> $(NFACCT_PKG)/.PKGINFO ; \
5 kx echo "short_description=\"$(NFACCT_PKG_SHORT_DESCRIPTION)\"" >> $(NFACCT_PKG)/.PKGINFO ; \
5 kx echo "url=$(NFACCT_PKG_URL)" >> $(NFACCT_PKG)/.PKGINFO ; \
5 kx echo "license=$(NFACCT_PKG_LICENSE)" >> $(NFACCT_PKG)/.PKGINFO
5 kx @$(PSEUDO) sh -c "cd $(NFACCT_PKG) && \
5 kx chown -R root:root . && \
5 kx $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."