package/libid3tag: add .pc file and install to staging hook
authorJörg Krause <joerg.krause@embedded.rocks>
Mon, 5 Nov 2018 18:27:01 +0000 (19:27 +0100)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 27 Nov 2018 22:33:13 +0000 (23:33 +0100)
The MPD project dropped autotools support in version 0.21.x in favor of
meson. While adapting the package to the meson build infrastructure, the
recognition of libid3tag failed, as only pkg-config is used to detect
the library. Note, that the version bump of the mpd package to 0.21.x is
not submitted, yet.

To help finding the build system to detect libid3tag with pkg-config
properly, add a .pc file and install it to staging.

This is exactly what Debian and Fedora do as well.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/libid3tag/id3tag.pc [new file with mode: 0644]
package/libid3tag/libid3tag.mk

diff --git a/package/libid3tag/id3tag.pc b/package/libid3tag/id3tag.pc
new file mode 100644 (file)
index 0000000..845eb32
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: id3tag
+Description: ID3 tag reading library
+Version: 0.15.1b
+Requires:
+Libs: -L${libdir} -lid3tag
+Cflags: -I${includedir}
index 951ae09c772a000d4487bb24ac597f4ce8eb4b54..24342186cce60a5deab50cf93d568b554b4975c7 100644 (file)
@@ -12,4 +12,11 @@ LIBID3TAG_INSTALL_STAGING = YES
 LIBID3TAG_DEPENDENCIES = zlib
 LIBID3TAG_LIBTOOL_PATCH = NO
 
+define LIBID3TAG_INSTALL_STAGING_PC
+       $(INSTALL) -D package/libid3tag/id3tag.pc \
+               $(STAGING_DIR)/usr/lib/pkgconfig/id3tag.pc
+endef
+
+LIBID3TAG_POST_INSTALL_STAGING_HOOKS += LIBID3TAG_INSTALL_STAGING_PC
+
 $(eval $(autotools-package))