package/duktape: add and install a duktape.pc file
authorAdam Duskett <aduskett@gmail.com>
Mon, 5 Jul 2021 05:40:56 +0000 (22:40 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 17 Jul 2021 08:10:06 +0000 (10:10 +0200)
Most distributions include a duktape.pc file bundled with the duktape
development package. As the duktape source does not include a .pc file,
add one to the package/duktape directory and install it to the staging
directory. This is used by the polkit duktape patch later in the series.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/duktape/duktape.mk
package/duktape/duktape.pc.in [new file with mode: 0644]

index aadd609248be6c7c4db7c3c7fa8e1014a49b3186..89a6e451f59cf03e8cd1d330efeb494254a003ca 100644 (file)
@@ -19,6 +19,10 @@ endef
 define DUKTAPE_INSTALL_STAGING_CMDS
        $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f Makefile.sharedlibrary \
                INSTALL_PREFIX=$(STAGING_DIR)/usr install
+       $(INSTALL) -D -m 0644 $(DUKTAPE_PKGDIR)/duktape.pc.in \
+               $(STAGING_DIR)/usr/lib/pkgconfig/duktape.pc
+       $(SED) 's/@VERSION@/$(DUKTAPE_VERSION)/g;' \
+               $(STAGING_DIR)/usr/lib/pkgconfig/duktape.pc
 endef
 
 define DUKTAPE_INSTALL_TARGET_CMDS
diff --git a/package/duktape/duktape.pc.in b/package/duktape/duktape.pc.in
new file mode 100644 (file)
index 0000000..eaef5f6
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: duktape
+Description: Embeddable Javascript engine
+Version: @VERSION@
+Libs: -L${libdir} -lduktape
+Cflags: -I${includedir}/