Hi,

attached is a patch that adds pkgconfig support for (k)powersave. That
enables clients like kpowersave to correctly depend on the correct
versions and they can take advantage of the easy to use
PKG_CHECK_MODULES macro.
For now I created a pkgconfig file for each of the three libs,
libpowersave, libpowersave_dbus and libpowersave_hal.

Imho it would make sense to merge these three libs into one. This would
make it easier to handle and I can't imagine a use case where an
application would only use one of the libs selectively. Besides they are
so small that you wouldn't gain much by splitting the lib.
Is there a particular reason to split up the libraries?

Cheers,
Michael

P.S.: Both are created against the current SVN
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(Revision 1970)
+++ src/Makefile.am	(Arbeitskopie)
@@ -32,7 +32,7 @@
 			schemes.cpp dbusPowersave.cpp infodialog.cpp info_Dialog.ui \
 			detaileddialog.cpp detailed_Dialog.ui
 kpowersave_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -module -avoid-version
-kpowersave_la_LIBADD = $(LIB_KIO) @PACKAGE_LIBS@ -ldbus-qt-1 -lpowersave -lpowersave_dbus -lXss -lXext
+kpowersave_la_LIBADD = $(LIB_KIO) @PACKAGE_LIBS@ -ldbus-qt-1 -lXss -lXext
 
 # this is where the desktop file will go 
 xdg_apps_DATA = kpowersave.desktop
Index: configure.in.in
===================================================================
--- configure.in.in	(Revision 1970)
+++ configure.in.in	(Arbeitskopie)
@@ -56,7 +56,7 @@
 # check for headers
 AC_CHECK_HEADERS(powerlib.h,, [AC_MSG_ERROR([You need to install powersave-devel.])])
 
-pkg_modules="dbus-1 >= 0.33, hal >= 0.5.4"
+pkg_modules="dbus-1 >= 0.33, hal >= 0.5.4, powersave >= 0.12.1 powersave-dbus >= 0.12.1"
 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
 
 AC_SUBST(PACKAGE_CFLAGS)
Index: powersave.pc.in
===================================================================
--- powersave.pc.in	(Revision 0)
+++ powersave.pc.in	(Revision 0)
@@ -0,0 +1,12 @@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+
+Name: powersave
+Description: power management library
+Version: @VERSION@
+Requires.private: dbus-1 hal
+
+Libs: -L${libdir} -lpowersave
+Cflags: -I${includedir}
Index: powersave-hal.pc.in
===================================================================
--- powersave-hal.pc.in	(Revision 0)
+++ powersave-hal.pc.in	(Revision 0)
@@ -0,0 +1,12 @@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+
+Name: powersave
+Description: power management library (hal)
+Version: @VERSION@
+Requires.private: dbus-1 hal
+
+Libs: -L${libdir} -lpowersave_hal
+Cflags: -I${includedir}
Index: configure.ac
===================================================================
--- configure.ac	(Revision 1970)
+++ configure.ac	(Arbeitskopie)
@@ -172,6 +172,9 @@
 # user has not explicitly enabled docs
 
 AC_CONFIG_FILES([Makefile
+		powersave.pc
+		powersave-dbus.pc
+		powersave-hal.pc
 		daemon/Makefile
 		libpower/Makefile
 		user_binary/Makefile
Index: Makefile.am
===================================================================
--- Makefile.am	(Revision 1970)
+++ Makefile.am	(Arbeitskopie)
@@ -11,3 +11,5 @@
 	  contrib	\
 	  helpertools
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = powersave.pc powersave-dbus.pc powersave-hal.pc
Index: powersave-dbus.pc.in
===================================================================
--- powersave-dbus.pc.in	(Revision 0)
+++ powersave-dbus.pc.in	(Revision 0)
@@ -0,0 +1,12 @@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+
+Name: powersave
+Description: power management library (dbus interface)
+Version: @VERSION@
+Requires.private: dbus-1
+
+Libs: -L${libdir} -lpowersave_dbus
+Cflags: -I${includedir}

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
powersave-devel mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-devel

Reply via email to