Generate pkg-config file
authorAhmet Artu Yildirim <ahmet@artulab.com>
Sun, 25 Dec 2022 09:59:56 +0000 (01:59 -0800)
committerAhmet Artu Yildirim <ahmet@artulab.com>
Sun, 25 Dec 2022 10:00:15 +0000 (02:00 -0800)
.gitignore
AUTHORS
ChangeLog
build-debug.sh [deleted file]
build-release.sh [deleted file]
configure.ac
libprogbuf.pc.in [new file with mode: 0644]
scripts/clean.sh
src/Makefile.am

index dbba428..c9f7431 100644 (file)
@@ -33,6 +33,7 @@ src/check_progbuf.log
 src/check_progbuf.trs
 src/progbuf.lo
 src/test-suite.log
+src/libprogbuf.pc
 test-driver
 stamp-h1
 .vscode/
diff --git a/AUTHORS b/AUTHORS
index e8431ea..6ae4afa 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1 +1 @@
-Ahmet Artu Yildirim
+- Ahmet Artu Yildirim (ahmet@artulab.com)
index 9f72435..509a4aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+- (2022-12-25) Generate pkg-config file
 - (2022-12-24) Add a script to generate a ChangeLog file
 - (2022-12-23) Add getter and setter to support nested message
 - (2022-12-23) Add a unit test for raw getter and setter functions
diff --git a/build-debug.sh b/build-debug.sh
deleted file mode 100755 (executable)
index e70a968..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-./configure CPPFLAGS=-DDEBUG CFLAGS="-g -O0" && make
diff --git a/build-release.sh b/build-release.sh
deleted file mode 100755 (executable)
index 5bb11df..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-./configure && make
index a29fb11..2f9fde5 100644 (file)
@@ -3,11 +3,17 @@ AM_INIT_AUTOMAKE([-Wall -Werror gnu])
 AC_PROG_CC
 AM_PROG_AR
 LT_INIT
+
+PKG_PROG_PKG_CONFIG
+PKG_INSTALLDIR
+
 PKG_CHECK_MODULES([CHECK], [check])
+
 AC_CONFIG_MACRO_DIRS([m4])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([
  Makefile
  src/Makefile
+ src/libprogbuf.pc:libprogbuf.pc.in
 ])
 AC_OUTPUT
diff --git a/libprogbuf.pc.in b/libprogbuf.pc.in
new file mode 100644 (file)
index 0000000..1ddb4ae
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+Name: libprogbuf
+Description: Library to serialize structured data in a programmatic way.
+Version: 1.0.0
+Libs: -L${libdir} -lprogbuf
+Cflags: -I${includedir}/libprogbuf
index 18ff4c4..66866b6 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-rm -rf aclocal.m4 config.sub configure depcomp m4 ar-lib compile config.guess config.h install-sh test-driver Makefile Makefile.in autom4te.cache config.h.in ltmain.sh missing libtool config.status config.log INSTALL stamp-h1 src/Makefile.in src/.libs src/.deps src/*.o src/Makefile src/libprogbuf.la src/progbuf.lo src/check_progbuf build config.h.in~
+rm -rf aclocal.m4 config.sub configure depcomp m4 ar-lib compile config.guess config.h install-sh test-driver Makefile Makefile.in autom4te.cache config.h.in ltmain.sh missing libtool config.status config.log INSTALL stamp-h1 src/Makefile.in src/.libs src/.deps src/*.o src/Makefile src/libprogbuf.la src/progbuf.lo src/check_progbuf src/test-suite.log src/libprogbuf_la-progbuf.lo src/check_progbuf.log src/check_progbuf.trs src/libprogbuf.pc build config.h.in~
index 9fe2ea1..fc65b31 100644 (file)
@@ -1,8 +1,10 @@
 lib_LTLIBRARIES = libprogbuf.la
 libprogbuf_la_SOURCES = progbuf.c
-libprogbuf_la_LDFLAGS = -version-info 0:1:0
+libprogbuf_la_LDFLAGS = -version-info 1:0:0
 libprogbuf_la_CFLAGS = -Wall -Wextra -Wpedantic -Werror
-include_HEADERS = progbuf.h
+
+pkginclude_HEADERS = progbuf.h
+pkgconfig_DATA = libprogbuf.pc
 
 noinst_PROGRAMS = check_progbuf
 TESTS = check_progbuf