mosquitto: minor recipe cleanups

- Passing prefix, mandir and localedir via the Make command line
   allows patching of config.mk to be dropped.

 - The variable PREFIX isn't used anywhere in the mosquitto 1.4.15
   Makefiles, so doesn't need to be passed on the Make command line.
   That means the default do_compile() from base.bbclass can be used
   and the recipe specific do_compile() can be dropped.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Andre McCurdy
2018-06-27 15:25:52 -07:00
committed by Khem Raj
parent 00d5219d65
commit d56219b411
2 changed files with 13 additions and 46 deletions
@@ -1,35 +0,0 @@
From 0be38301249d797ec1f59071cc868ceda6d4720a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
Date: Tue, 12 Apr 2016 12:50:32 +0100
Subject: [PATCH 1/2] config.mk: allow prefix / mandir / localedir from
environment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We want to control them using OE environment variables.
Upstream-Status: Inappropriate [embedded-specific]
Signed-off-by: André Draszik <andre.draszik@jci.com>
---
config.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/config.mk b/config.mk
index 71f17e5..81d9702 100644
--- a/config.mk
+++ b/config.mk
@@ -249,7 +249,7 @@ ifeq ($(WITH_DOCS),yes)
endif
INSTALL?=install
-prefix=/usr/local
-mandir=${prefix}/share/man
-localedir=${prefix}/share/locale
+prefix?=/usr/local
+mandir?=${prefix}/share/man
+localedir?=${prefix}/share/locale
STRIP?=strip
--
2.15.1
@@ -11,7 +11,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \
DEPENDS = "uthash"
SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \
file://0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch \
file://0002-uthash-remove-in-tree-version.patch \
file://mosquitto.service \
file://mosquitto.init \
@@ -27,20 +26,23 @@ PACKAGECONFIG ??= "ssl uuid"
PACKAGECONFIG[dns-srv] = ",,c-ares"
PACKAGECONFIG[ssl] = ",,openssl"
PACKAGECONFIG[uuid] = ",,util-linux"
EXTRA_OEMAKE = "${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \
STRIP=/bin/true \
WITH_DOCS=no \
${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)}"
export LIB_SUFFIX="${@d.getVar('baselib', True).replace('lib', '')}"
EXTRA_OEMAKE = " \
prefix=${prefix} \
mandir=${mandir} \
localedir=${localedir} \
${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)} \
STRIP=/bin/true \
WITH_DOCS=no \
"
do_compile() {
oe_runmake PREFIX=${prefix}
}
export LIB_SUFFIX = "${@d.getVar('baselib', True).replace('lib', '')}"
do_install() {
oe_runmake install DESTDIR=${D}
oe_runmake 'DESTDIR=${D}' install
install -d ${D}${libdir}
install -m 0644 lib/libmosquitto.a ${D}${libdir}/