package/mender: use MENDER_PKGDIR to access local files
authorMirza Krak <mirza.krak@northern.tech>
Mon, 20 Aug 2018 13:09:12 +0000 (15:09 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 21 Oct 2018 14:07:10 +0000 (16:07 +0200)
Utilize the predefined variable MENDER_PKGDIR which points to the
directory containing mender.mk and Config.in, along with the local
files.

One benefit is also that it works when BR2_EXTERNAL is used, which
makes it easier to "backport" this to an older external tree.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/mender/mender.mk

index 9275426a7be3596550e69c7c9e545238c6eeafa4..37a99c1f18a780f977e6dea73f9d93b7fb9257ef 100644 (file)
@@ -38,10 +38,9 @@ define MENDER_INSTALL_CONFIG_FILES
        $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/mender/scripts
        echo -n "2" > $(TARGET_DIR)/etc/mender/scripts/version
 
-       $(INSTALL) -D -m 0644 package/mender/mender.conf \
+       $(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/mender.conf \
                $(TARGET_DIR)/etc/mender/mender.conf
-
-       $(INSTALL) -D -m 0644 package/mender/server.crt \
+       $(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/server.crt \
                $(TARGET_DIR)/etc/mender/server.crt
 
        $(INSTALL) -D -m 0755 $(@D)/support/mender-device-identity \
@@ -55,7 +54,7 @@ endef
 MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_CONFIG_FILES
 
 define MENDER_INSTALL_INIT_SYSTEMD
-       $(INSTALL) -D -m 0644 package/mender/mender.service \
+       $(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/mender.service \
                $(TARGET_DIR)/usr/lib/systemd/system/mender.service
        mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
        ln -fs ../../../../usr/lib/systemd/system/mender.service \