]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
package/tzdata: fix installation commands
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 18 Nov 2014 18:38:27 +0000 (19:38 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 18 Nov 2014 20:50:05 +0000 (21:50 +0100)
If the destination directory already exists (e.g. because of a re-run or
a custom skeleton), then the zoneinfo files will be installed in a
sub-directory of where we are trying to install them.

Fix that by creating the destination directory and copying the content
of the source directory.

Also fix the host install commands to match what we do in the target
install commands.

Reported-by: Martin Dorwig <dorwig@tetronik.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/tzdata/tzdata.mk

index 47e29c0cc5dedb78f6692b1ced654cf860d85f83..d0aa8570b3f8b259657fe8c94320a4aa8efc5eb1 100644 (file)
@@ -26,8 +26,8 @@ TZDATA_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME))
 TZDATA_EXTRACT_CMDS =
 
 define TZDATA_INSTALL_TARGET_CMDS
-       $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share
-       cp -a $(HOST_DIR)/usr/share/zoneinfo $(TARGET_DIR)/usr/share/zoneinfo
+       $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/zoneinfo
+       cp -a $(HOST_DIR)/usr/share/zoneinfo/* $(TARGET_DIR)/usr/share/zoneinfo
        cd $(TARGET_DIR)/usr/share/zoneinfo;    \
        for zone in posix/*; do                 \
            ln -sfn "$${zone}" "$${zone##*/}";  \
@@ -59,7 +59,7 @@ define HOST_TZDATA_BUILD_CMDS
 endef
 
 define HOST_TZDATA_INSTALL_CMDS
-       mkdir -p $(HOST_DIR)/usr/share/zoneinfo
+       $(INSTALL) -d -m 0755 $(HOST_DIR)/usr/share/zoneinfo
        cp -a $(@D)/_output/* $(@D)/*.tab $(HOST_DIR)/usr/share/zoneinfo
 endef