diff mbox series

package/tinycbor: override prefix at build time as well

Message ID 20240417161915.727361-1-peter@korsgaard.com
State Accepted
Headers show
Series package/tinycbor: override prefix at build time as well | expand

Commit Message

Peter Korsgaard April 17, 2024, 4:19 p.m. UTC
To ensure the correct prefix is used in the generated tinycbor.pc instead of
/usr/local:

>>> tinycbor 0.6.0 Building
..
sed > tinycbor.pc < tinycbor.pc.in \
        -e 's,@prefix@,/usr/local,' \
        -e 's,@exec_prefix@,/usr/local,' \
        -e 's,@libdir@,/usr/local/lib,' \
        -e 's,@includedir@,/usr/local/include,' \
        -e 's,@version@,0.6.0,'
>>> tinycbor 0.6.0 Installing to staging directory
..
install -m 644 tinycbor.pc /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/tinycbor.pc

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/tinycbor/tinycbor.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Peter Korsgaard April 25, 2024, 5:21 p.m. UTC | #1
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > To ensure the correct prefix is used in the generated tinycbor.pc instead of
 > /usr/local:

 >>>> tinycbor 0.6.0 Building
 > ..
 > sed > tinycbor.pc < tinycbor.pc.in \
 >         -e 's,@prefix@,/usr/local,' \
 >         -e 's,@exec_prefix@,/usr/local,' \
 >         -e 's,@libdir@,/usr/local/lib,' \
 >         -e 's,@includedir@,/usr/local/include,' \
 >         -e 's,@version@,0.6.0,'
 >>>> tinycbor 0.6.0 Installing to staging directory
 > ..
 > install -m 644 tinycbor.pc /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/pkgconfig/tinycbor.pc

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed, thanks.
diff mbox series

Patch

diff --git a/package/tinycbor/tinycbor.mk b/package/tinycbor/tinycbor.mk
index cad50e633b..d2fb583e67 100644
--- a/package/tinycbor/tinycbor.mk
+++ b/package/tinycbor/tinycbor.mk
@@ -16,7 +16,7 @@  ifeq ($(BR2_PACKAGE_CJSON),y)
 TINYCBOR_DEPENDENCIES += cjson
 endif
 
-TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) DISABLE_WERROR=1 V=1
+TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) DISABLE_WERROR=1 V=1 prefix=/usr
 
 ifeq ($(BR2_STATIC_LIBS),y)
 TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=0
@@ -34,12 +34,12 @@  endef
 
 define TINYCBOR_INSTALL_STAGING_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \
-		DESTDIR=$(STAGING_DIR) prefix=/usr install
+		DESTDIR=$(STAGING_DIR) install
 endef
 
 define TINYCBOR_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \
-		DESTDIR=$(TARGET_DIR) prefix=/usr install
+		DESTDIR=$(TARGET_DIR) install
 endef
 
 $(eval $(generic-package))