[Pm-utils] [PATCH] pkg-config file to support 3rd party programs
Dan Nicholson
dbn.lists at gmail.com
Wed Feb 6 10:32:35 PST 2008
A pkg-config file has been added to allow 3rd party programs to find out
about the user's pm-utils installation. This means they can make an
informed decision about where to install a sleep hook, for instance.
---
I think this is especially important since Victor's patch to make the
directories build-time configurable. With this patch, other packages
(e.g., NetworkManager and PackageKit) can figure out where to install
hooks intelligently.
$ sleepdir="$(pkg-config --variable=pm_sysconfdir pm-utils)/sleep.d"
.gitignore | 1 +
Makefile.am | 3 +++
configure.in | 1 +
pm-utils.pc.in | 11 +++++++++++
4 files changed, 16 insertions(+), 0 deletions(-)
create mode 100644 pm-utils.pc.in
diff --git a/.gitignore b/.gitignore
index 62ce4ad..fe813da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ ltmain.sh
missing
mkinstalldirs
install-sh
+pm-utils.pc
stamp-h
stamp-h1
stamp-h.in
diff --git a/Makefile.am b/Makefile.am
index 81bc418..6f5145a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,7 @@
SUBDIRS = pm man src
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = pm-utils.pc
+
clean-local :
rm -f *~
diff --git a/configure.in b/configure.in
index b59ad9d..4a85af8 100644
--- a/configure.in
+++ b/configure.in
@@ -31,6 +31,7 @@ dnl - Makefiles, etc.
dnl ---------------------------------------------------------------------------
AC_OUTPUT([
Makefile
+pm-utils.pc
man/Makefile
src/Makefile
pm/Makefile
diff --git a/pm-utils.pc.in b/pm-utils.pc.in
new file mode 100644
index 0000000..668ef29
--- /dev/null
+++ b/pm-utils.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+sysconfdir=@sysconfdir@
+
+pm_libdir=${libdir}/pm-utils
+pm_sysconfdir=${sysconfdir}/pm
+
+Name: pm-utils
+Description: Power management scripts for suspend and hibernate
+Version: @PACKAGE_VERSION@
--
1.5.3.2
More information about the Pm-utils
mailing list