X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fdtc%2Fdtc.mk;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fdtc%2Fdtc.mk;h=e094f7bf782fbca9ceeb689c8e1e18c919de8b02;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/dtc/dtc.mk b/cirros-testvm/src-cirros/buildroot-2015.05/package/dtc/dtc.mk new file mode 100644 index 0000000..e094f7b --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/dtc/dtc.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# dtc +# +################################################################################ + +DTC_VERSION = 1.4.1 +DTC_SOURCE = dtc-$(DTC_VERSION).tar.xz +DTC_SITE = https://www.kernel.org/pub/software/utils/dtc +DTC_LICENSE = GPLv2+/BSD-2c +DTC_LICENSE_FILES = README.license GPL +DTC_INSTALL_STAGING = YES +DTC_DEPENDENCIES = host-bison host-flex + +define DTC_POST_INSTALL_TARGET_RM_DTDIFF + rm -f $(TARGET_DIR)/usr/bin/dtdiff +endef + +ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y) + +DTC_LICENSE += (for the library), GPLv2+ (for the executables) +DTC_INSTALL_GOAL = install +ifeq ($(BR2_PACKAGE_BASH),) +DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF +endif + +else # $(BR2_PACKAGE_DTC_PROGRAMS) != y + +DTC_INSTALL_GOAL = install-lib + +endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y + +define DTC_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=/usr +endef + +# For staging, only the library is needed +define DTC_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr install-lib \ + install-includes +endef + +define DTC_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL) +endef + +$(eval $(generic-package))