Add sndio.pc file for pkg-config, mostly from brad@
authorratchov <ratchov@openbsd.org>
Wed, 28 Apr 2021 19:12:53 +0000 (19:12 +0000)
committerratchov <ratchov@openbsd.org>
Wed, 28 Apr 2021 19:12:53 +0000 (19:12 +0000)
ok and help from espie@

lib/libsndio/Makefile
lib/libsndio/sndio.pc [new file with mode: 0644]

index c5134fa..acc3968 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.14 2020/02/26 13:53:58 ratchov Exp $
+#      $OpenBSD: Makefile,v 1.15 2021/04/28 19:12:53 ratchov Exp $
 
 LIB=   sndio
 MAN=   sio_open.3 mio_open.3 sioctl_open.3 sndio.7
@@ -10,4 +10,10 @@ COPTS+=      -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wundef
 
 VERSION_SCRIPT=        ${.CURDIR}/Symbols.map
 
+PC_FILES=sndio.pc
+
+beforeinstall:
+       ${INSTALL} ${INSTALL_COPY} -o root -g ${SHAREGRP} \
+           -m ${SHAREMODE} ${.CURDIR}/${PC_FILES} ${DESTDIR}/usr/lib/pkgconfig/
+
 .include <bsd.lib.mk>
diff --git a/lib/libsndio/sndio.pc b/lib/libsndio/sndio.pc
new file mode 100644 (file)
index 0000000..4e3de11
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: sndio
+Description: sndio library
+Version: 1.7.0
+Requires:
+Libs: -L${libdir} -lsndio
+Cflags: -I${includedir}