From 842842c4796dffb5db21409a4436200299629100 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 27 Feb 2009 12:32:55 +0000 Subject: [PATCH] Ship a shared library. There are now two external projects using copies of this, which is rediculous --- .gitignore | 1 + Makefile.am | 3 +++ configure.ac | 17 +++++++++++++++++ devicekit-power-gobject.pc.in | 13 +++++++++++++ devkit-power-gobject/Makefile.am | 23 +++++++++++++++++++++-- 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 devicekit-power-gobject.pc.in diff --git a/.gitignore b/.gitignore index 87a3f3c..89913a3 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ intltool-merge.in intltool-merge intltool-update.in intltool-update +devicekit-power.pc xmldocs.make omf.make gtk-doc.make diff --git a/Makefile.am b/Makefile.am index 62dd58f..e53d7a6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,9 @@ EXTRA_DIST = \ HACKING \ ChangeLog +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = devicekit-power-gobject.pc + # xsltproc barfs on 'make distcheck'; disable for now DISTCHECK_CONFIGURE_FLAGS=--disable-man-pages --disable-gtk-doc diff --git a/configure.ac b/configure.ac index dbc59e6..a3960c3 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,22 @@ AM_INIT_AUTOMAKE(DeviceKit-power, 007) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE +# libtool versioning - this applies to devkit-power-gobject +# +# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details +# +# increment; +# CURRENT If the API or ABI interface has changed (reset REVISION to 0) +# REVISION If the API and ABI remains the same, but bugs are fixed. +# AGE If libpackagekit can be linked into executables which can be +# built with previous versions of this library. Don't use. +LT_CURRENT=1 +LT_REVISION=0 +LT_AGE=0 +AC_SUBST(LT_CURRENT) +AC_SUBST(LT_REVISION) +AC_SUBST(LT_AGE) + AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC @@ -151,6 +167,7 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain]) AC_OUTPUT([ Makefile +devicekit-power-gobject.pc src/Makefile tools/Makefile doc/Makefile diff --git a/devicekit-power-gobject.pc.in b/devicekit-power-gobject.pc.in new file mode 100644 index 0000000..4189a10 --- /dev/null +++ b/devicekit-power-gobject.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: devicekit-power-gobject +Description: DeviceKit-power is a system daemon for installing stuff. +Version: @VERSION@ +Requires.private: dbus-1, gthread-2.0 +Requires: glib-2.0, gobject-2.0 +Libs: -L${libdir} -ldevkit-power-gobject +Cflags: -I${includedir}/DeviceKit-power + diff --git a/devkit-power-gobject/Makefile.am b/devkit-power-gobject/Makefile.am index 303b2dc..043464e 100644 --- a/devkit-power-gobject/Makefile.am +++ b/devkit-power-gobject/Makefile.am @@ -11,9 +11,20 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" -noinst_LTLIBRARIES = \ +lib_LTLIBRARIES = \ libdevkit-power-gobject.la +libdevkit_power_includedir = $(includedir)/DeviceKit-power/devkit-power-gobject +libdevkit_power_include_HEADERS = \ + dkp-client.h \ + dkp-device.h \ + dkp-wakeups.h \ + dkp-qos-obj.h \ + dkp-history-obj.h \ + dkp-stats-obj.c \ + dkp-wakeups-obj.h \ + dkp-enum.h + libdevkit_power_gobject_la_SOURCES = \ egg-debug.c \ egg-debug.h \ @@ -37,8 +48,16 @@ libdevkit_power_gobject_la_SOURCES = \ dkp-enum.c \ dkp-enum.h -libdevkit_power_gobject_la_LIBADD = $(INTLLIBS) $(GLIB_LIBS) $(DBUS_GLIB_LIBS) +libdevkit_power_gobject_la_LIBADD = \ + $(INTLLIBS) \ + $(GLIB_LIBS) \ + $(DBUS_GLIB_LIBS) +libdevkit_power_gobject_la_LDFLAGS = \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ + -export-dynamic \ + -no-undefined \ + -export-symbols-regex '^dkp_.*' clean-local: rm -f *~