package/libnss: also install a pkg-config file
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 21 Aug 2012 17:07:04 +0000 (19:07 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 24 Aug 2012 21:40:28 +0000 (23:40 +0200)
Some packages use pkg-config to check for libnss.

Add our own .pc file (vampirised from Debian).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libnss/libnss.mk
package/libnss/nss.pc.in [new file with mode: 0644]

index f7fd6820c4c88efa949793764d79d26102e88e5e..84fc14996db817f3397913bd94cdb8ad6fd3aefb 100644 (file)
@@ -49,6 +49,10 @@ define LIBNSS_INSTALL_STAGING_CMDS
                $(@D)/$(LIBNSS_DISTDIR)/public/nss/*
        $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \
                $(@D)/$(LIBNSS_DISTDIR)/lib/*.a
+       $(INSTALL) -D -m 0644 $(TOPDIR)/package/libnss/nss.pc.in \
+               $(STAGING_DIR)/usr/lib/pkgconfig/nss.pc
+       $(SED) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \
+               $(STAGING_DIR)/usr/lib/pkgconfig/nss.pc
 endef
 
 define LIBNSS_INSTALL_TARGET_CMDS
@@ -59,6 +63,10 @@ define LIBNSS_INSTALL_TARGET_CMDS
                $(@D)/$(LIBNSS_DISTDIR)/public/nss/*
        $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/ \
                $(@D)/$(LIBNSS_DISTDIR)/lib/*.a
+       $(INSTALL) -D -m 0644 $(TOPDIR)/package/libnss/nss.pc.in \
+               $(TARGET_DIR)/usr/lib/pkgconfig/nss.pc
+       $(SED) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \
+               $(TARGET_DIR)/usr/lib/pkgconfig/nss.pc
 endef
 
 define LIBNSS_CLEAN_CMDS
diff --git a/package/libnss/nss.pc.in b/package/libnss/nss.pc.in
new file mode 100644 (file)
index 0000000..e27783f
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include/nss
+
+Name: NSS
+Description: Mozilla Network Security Services
+Version: @VERSION@
+Requires: nspr
+Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3
+Cflags: -I${includedir}