[PATCH] [client] Install libply-boot-client library and headers

Scott James Remnant scott at ubuntu.com
Tue Mar 2 07:16:33 PST 2010


When communicating with Plymouth from another process, it's
inconvenient to have to keep spawning the plymouth client binary
and keeping track of it - not to mention slow.

It's far cleaner to be able to link to the same boot client code
that the plymouth binary does, and communicate directly.

Place that code in a new libply-boot-client library, and install
the headers along with it.
---
 configure.ac                     |    1 +
 src/client/Makefile.am           |   21 +++++++++++++++++++++
 src/client/ply-boot-client.pc.in |   10 ++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 src/client/ply-boot-client.pc.in

diff --git a/configure.ac b/configure.ac
index 6ecb628..6ade4c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,7 @@ AC_OUTPUT([Makefile
            src/plugins/controls/Makefile
            src/plugins/controls/label/Makefile
            src/Makefile
+           src/client/ply-boot-client.pc
            src/client/Makefile
            src/viewer/Makefile
            src/tests/Makefile
diff --git a/src/client/Makefile.am b/src/client/Makefile.am
index 8dde0f8..9487901 100644
--- a/src/client/Makefile.am
+++ b/src/client/Makefile.am
@@ -17,6 +17,26 @@ plymouth_SOURCES = \
                       $(srcdir)/ply-boot-client.c                             \
                       $(srcdir)/plymouth.c
 
+lib_LTLIBRARIES = libply-boot-client.la
+
+libply_boot_clientdir = $(includedir)/plymouth-1/ply-boot-client
+libply_boot_client_HEADERS = \
+                      $(srcdir)/../ply-boot-protocol.h                        \
+		      ply-boot-client.h
+
+libply_boot_client_la_CFLAGS = $(PLYMOUTH_CFLAGS)
+libply_boot_client_la_LIBADD = $(PLYMOUTH_LIBS) ../libply/libply.la
+libply_boot_client_la_LDFLAGS = -export-symbols-regex '^[^_].*' \
+		-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+		-no-undefined
+libply_boot_client_la_SOURCES = \
+                      $(srcdir)/../ply-boot-protocol.h                        \
+                      $(srcdir)/ply-boot-client.h                             \
+                      $(srcdir)/ply-boot-client.c
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ply-boot-client.pc
+
 if WITH_RHGB_COMPAT_LINK
 install-data-hook:
 	(mkdir -p $(DESTDIR)$(bindir) && cd $(DESTDIR)$(bindir) && ln -sf ../../bin/plymouth rhgb-client)
@@ -26,4 +46,5 @@ uninstall-hook:
 	-rmdir -p $(DESTDIR)$(bindir)/rhgb-client >& /dev/null
 endif
 
+EXTRA_DIST = ply-boot-client.pc.in
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/client/ply-boot-client.pc.in b/src/client/ply-boot-client.pc.in
new file mode 100644
index 0000000..d9984b0
--- /dev/null
+++ b/src/client/ply-boot-client.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Plymouth
+Description: Client Library for Boot Splash
+Version: @VERSION@
+Libs: -L${libdir} -lply -lply-boot-client
+Cflags: -I${includedir}/plymouth-1/ply -I${includedir}/plymouth-1/ply-boot-client
-- 
1.6.3.3



More information about the plymouth mailing list