shared-mime-info: convert old-style hook to new-style hook
We don't want to use 'make DESTDIR=$(TARGET_DIR) install' as we only want the MIME database to be installed on the target. So we simply override the target installation command. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
da07989b17
commit
b4cb198b97
@ -8,7 +8,7 @@ SHARED_MIME_INFO_SOURCE = shared-mime-info-$(SHARED_MIME_INFO_VERSION).tar.bz2
|
||||
SHARED_MIME_INFO_SITE = http://freedesktop.org/~hadess
|
||||
|
||||
SHARED_MIME_INFO_INSTALL_STAGING = YES
|
||||
SHARED_MIME_INFO_INSTALL_TARGET = NO
|
||||
SHARED_MIME_INFO_INSTALL_TARGET = YES
|
||||
|
||||
SHARED_MIME_INFO_AUTORECONF = NO
|
||||
SHARED_MIME_INFO_CONF_ENV = XMLLINT=$(HOST_DIR)/usr/bin/xmllint
|
||||
@ -21,14 +21,13 @@ HOST_SHARED_MIME_INFO_DEPENDENCIES = host-pkg-config host-intltool
|
||||
HOST_SHARED_MIME_INFO_CONF_OPT = \
|
||||
--disable-update-mimedb
|
||||
|
||||
define SHARED_MIME_INFO_INSTALL_TARGET_CMDS
|
||||
$(HOST_MAKE_ENV) $(SHARED_MIME_INFO_HOST_BINARY) $(STAGING_DIR)/usr/share/mime
|
||||
$(INSTALL) -D $(STAGING_DIR)/usr/share/mime/mime.cache $(TARGET_DIR)/usr/share/mime/mime.cache
|
||||
endef
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,shared-mime-info))
|
||||
$(eval $(call AUTOTARGETS,package,shared-mime-info,host))
|
||||
|
||||
# shared-mime-info for the host
|
||||
SHARED_MIME_INFO_HOST_BINARY:=$(HOST_DIR)/usr/bin/update-mime-database
|
||||
|
||||
# update the shared-mime-info database in the target
|
||||
$(SHARED_MIME_INFO_HOOK_POST_INSTALL):
|
||||
$(HOST_MAKE_ENV) $(SHARED_MIME_INFO_HOST_BINARY) $(STAGING_DIR)/usr/share/mime
|
||||
$(INSTALL) -D $(STAGING_DIR)/usr/share/mime/mime.cache $(TARGET_DIR)/usr/share/mime/mime.cache
|
||||
touch $@
|
||||
|
Loading…
Reference in New Issue
Block a user