a1b630779f
Fixes: http://autobuild.buildroot.net/results/1c6/1c69c77d7b378f6f76790fb5ca0078d0db0c40f8 devmem2 is a single C file that is downloaded as-is, and we patch it. We also use that file as the license file. Thus, the file when it is downloaded has a specific hash, but when saved by legal-info, it has a different hash. However, we can't store two different hashes for the same _filename_ with different content. So, we extract the license file as a pre-patch hook, and store it in a separate file, for which we can now add a hash. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
31 lines
770 B
Makefile
31 lines
770 B
Makefile
################################################################################
|
|
#
|
|
# devmem2
|
|
#
|
|
################################################################################
|
|
|
|
DEVMEM2_SITE = http://free-electrons.com/pub/mirror
|
|
DEVMEM2_SOURCE = devmem2.c
|
|
DEVMEM2_VERSION = 1
|
|
DEVMEM2_LICENSE = GPL-2.0+
|
|
DEVMEM2_LICENSE_FILES = devmem2.c.license
|
|
|
|
define DEVMEM2_EXTRACT_CMDS
|
|
cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/
|
|
endef
|
|
|
|
define DEVMEM2_EXTRACT_LICENSE
|
|
head -n 38 $(@D)/devmem2.c >$(@D)/devmem2.c.license
|
|
endef
|
|
DEVMEM2_PRE_PATCH_HOOKS += DEVMEM2_EXTRACT_LICENSE
|
|
|
|
define DEVMEM2_BUILD_CMDS
|
|
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) devmem2
|
|
endef
|
|
|
|
define DEVMEM2_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -D $(@D)/devmem2 $(TARGET_DIR)/sbin/devmem2
|
|
endef
|
|
|
|
$(eval $(generic-package))
|