libid3tag: add pkg-config file 10113/head
authorAndre Heider <a.heider@gmail.com>
Mon, 30 Sep 2019 07:40:03 +0000 (09:40 +0200)
committerAndre Heider <a.heider@gmail.com>
Mon, 7 Oct 2019 18:58:56 +0000 (20:58 +0200)
Required for meson to find this library in a sane way.

Signed-off-by: Andre Heider <a.heider@gmail.com>
libs/libid3tag/Makefile
libs/libid3tag/src/id3tag.pc [new file with mode: 0644]

index e51000c278b89d02b29d1dd2f577000e52be010c..5bac257528766f1397466d76395140928bb4b48b 100644 (file)
@@ -42,6 +42,11 @@ TARGET_CFLAGS += $(FPIC)
 
 CONFIGURE_VARS += CC="$(TARGET_CC) $(TARGET_CFLAGS)"
 
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(SED) 's,@VERSION@,$(PKG_VERSION),g' $(PKG_BUILD_DIR)/id3tag.pc
+endef
+
 define Build/Configure
        $(call Build/Configure/Default, \
                --enable-shared \
@@ -56,6 +61,8 @@ define Build/InstallDev
        $(CP) $(PKG_INSTALL_DIR)/usr/include/id3tag.h $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
+       $(CP) $(PKG_BUILD_DIR)/id3tag.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libid3tag/install
diff --git a/libs/libid3tag/src/id3tag.pc b/libs/libid3tag/src/id3tag.pc
new file mode 100644 (file)
index 0000000..d31f1da
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: id3tag
+Description: ID3 tag reading library
+Requires:
+Version: @VERSION@
+Libs: -L${libdir} -lid3tag -lz
+Cflags: -I${includedir}