浏览代码

package/libid3tag: add .pc file and install to staging hook

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>
(cherry picked from commit d6b68e6b6a81985ff5bcb9836d0d02c1fbed3e47)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Jörg Krause 6 年之前
父节点
当前提交
e695a22a9c
共有 2 个文件被更改,包括 18 次插入0 次删除
  1. 11 0
      package/libid3tag/id3tag.pc
  2. 7 0
      package/libid3tag/libid3tag.mk

+ 11 - 0
package/libid3tag/id3tag.pc

@@ -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}

+ 7 - 0
package/libid3tag/libid3tag.mk

@@ -15,4 +15,11 @@ LIBID3TAG_DEPENDENCIES = zlib
 # is able to properly behave in the face of a missing C++ compiler.
 LIBID3TAG_AUTORECONF = YES
 
+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))