buildrootschalter/package/canfestival/canfestival.mk
Yann E. MORIN 6d3630cff0 package/canfestival: switch to using 'hg' to download
Currently, the canfestival package downloads a archive generated by the
remote Mercurial server.

This has the unfortuante side-effect of downloading an archive name just
after the revision string, without the package name in it. So, users do
have this archive in their BR2_DL_DIR: 7740ac6fdedc.tar.bz2

Switch to doing an hg clone to download canfestival, so we end up with a
properly named archive. Also expand the hash to the full-lenght hash
rather than the shorten one used when asking the remote server to
generate the archive.

[Thomas: fix typo in commit log.]

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-04-18 14:44:09 +02:00

60 lines
1.8 KiB
Makefile

################################################################################
#
# canfestival
#
################################################################################
CANFESTIVAL_VERSION = 7740ac6fdedc23e1ed6908d3d7db54833c88572b
CANFESTIVAL_SITE = http://dev.automforge.net/CanFestival-3
CANFESTIVAL_SITE_METHOD = hg
CANFESTIVAL_LICENSE = LGPLv2.1+
CANFESTIVAL_LICENSE_FILES = COPYING LICENCE
CANFESTIVAL_INSTALL_STAGING = YES
CANFESTIVAL_INSTALLED-y = src drivers
CANFESTIVAL_INSTALLED-$(BR2_PACKAGE_CANFESTIVAL_INSTALL_EXAMPLES) += examples
# Canfestival provides and used some python modules and scripts only compliant
# with python2.
CANFESTIVAL_DEPENDENCIES = host-python
# canfestival uses its own hand-written build-system. Though there is
# a configure script, it does not use the autotools, so, we use the
# generic-package infrastructure.
define CANFESTIVAL_CONFIGURE_CMDS
cd $(@D) && \
$(TARGET_CONFIGURE_OPTS) ./configure \
--target=unix \
--arch=$(BR2_ARCH) \
--timers=unix \
--binutils=$(TARGET_CROSS) \
--cc="$(TARGET_CC)" \
--cxx="$(TARGET_CC)" \
--ld="$(TARGET_CC)" \
--prefix=/usr \
--can=$(BR2_PACKAGE_CANFESTIVAL_DRIVER) \
$(call qstrip,$(BR2_PACKAGE_CANFESTIVAL_ADDITIONAL_OPTIONS))
endef
define CANFESTIVAL_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all \
PYTHON=$(HOST_DIR)/usr/bin/python2
endef
define CANFESTIVAL_INSTALL_TARGET_CMDS
for d in $(CANFESTIVAL_INSTALLED-y) ; do \
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d install \
PYTHON=$(HOST_DIR)/usr/bin/python2 \
DESTDIR=$(TARGET_DIR) || exit 1 ; \
done
endef
define CANFESTIVAL_INSTALL_STAGING_CMDS
for d in $(CANFESTIVAL_INSTALLED-y) ; do \
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d install \
PYTHON=$(HOST_DIR)/usr/bin/python2 \
DESTDIR=$(STAGING_DIR) || exit 1 ; \
done
endef
$(eval $(generic-package))