From 2fe200eeb3ea126f89f505cc3c7acbdfb4f76c2f Mon Sep 17 00:00:00 2001 From: "David I. Lehn" Date: Thu, 26 Jun 2003 07:40:13 +0000 Subject: [PATCH] add pkgconfig support Original commit message from CVS: add pkgconfig support --- ChangeLog | 2 ++ Makefile.am | 7 ++++--- configure.ac | 4 ++++ pkgconfig/.gitignore | 3 +++ pkgconfig/Makefile.am | 23 +++++++++++++++++++++++ pkgconfig/gst-python-uninstalled.pc.in | 19 +++++++++++++++++++ pkgconfig/gst-python.pc.in | 18 ++++++++++++++++++ 7 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 pkgconfig/.gitignore create mode 100644 pkgconfig/Makefile.am create mode 100644 pkgconfig/gst-python-uninstalled.pc.in create mode 100644 pkgconfig/gst-python.pc.in diff --git a/ChangeLog b/ChangeLog index b9e3ac93fa..dcdbe20ca1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * gstreamer/Makefile.am: fix up line continuations + * configure.ac, Makefile.am, pkgconfig/*: add pkgconfig support + 2003-06-11 Thomas Vander Stichele * gst-python.spec.in: fix diff --git a/Makefile.am b/Makefile.am index 0520b3a093..e4539f0ec6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ -AUTOMAKE_OPTIONS = 1.5 - -SUBDIRS = gstreamer examples +SUBDIRS = gstreamer pkgconfig examples EXTRA_DIST = \ gst-python.spec.in gst-python.spec + +snap: + $(MAKE) dist distdir=$(PACKAGE)-`date +"%Y%m%d"` diff --git a/configure.ac b/configure.ac index 7c39f315b4..349eb09aa6 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,7 @@ fi AC_SUBST(GST_LIBS) AC_SUBST(GST_CFLAGS) +AC_SUBST(GST_MAJORMINOR) dnl check for pygtk PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ) @@ -112,6 +113,9 @@ changequote([,])dnl AC_OUTPUT([ Makefile gstreamer/Makefile + pkgconfig/Makefile + pkgconfig/gst-python.pc + pkgconfig/gst-python-uninstalled.pc examples/Makefile examples/gstreamer/Makefile gst-python.spec diff --git a/pkgconfig/.gitignore b/pkgconfig/.gitignore new file mode 100644 index 0000000000..2f7735b5e6 --- /dev/null +++ b/pkgconfig/.gitignore @@ -0,0 +1,3 @@ +Makefile +Makefile.in +*.pc diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am new file mode 100644 index 0000000000..72d4965a2a --- /dev/null +++ b/pkgconfig/Makefile.am @@ -0,0 +1,23 @@ +### all of the standard pc files we need to generate +pcfiles = \ + gst-python-@GST_MAJORMINOR@.pc + +pcfiles_uninstalled = \ + gst-python-@GST_MAJORMINOR@-uninstalled.pc + +all-local: $(pcfiles) $(pcfiles_uninstalled) + +### how to generate pc files +$(pcfiles): %-@GST_MAJORMINOR@.pc: %.pc + cp $< $@ +$(pcfiles_uninstalled): %-@GST_MAJORMINOR@-uninstalled.pc: %-uninstalled.pc + cp $< $@ + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = $(pcfiles) + +EXTRA_DIST = \ + gst-python.pc.in \ + gst-python-uninstalled.pc.in + +CLEANFILES = $(pcfiles) $(pcfiles_uninstalled) diff --git a/pkgconfig/gst-python-uninstalled.pc.in b/pkgconfig/gst-python-uninstalled.pc.in new file mode 100644 index 0000000000..209f633f75 --- /dev/null +++ b/pkgconfig/gst-python-uninstalled.pc.in @@ -0,0 +1,19 @@ +# the standard variables don't make sense for an uninstalled copy +#prefix= +#exec_prefix= +#includedir=${pcfiledir}/.. +#datadir=${pcfiledir}/.. + +# you can use the --variable=pygtkincludedir argument to +# pkg-config to get this value. You might want to use this to +# install additional headers. +#gstpythonincludedir=${includedir}/gst-python-@GST_MAJORMINOR@ + +# same here. Useful when calling the code generator in addon packages. +#defsdir=${datadir}/gst-python/@GST_MAJORMINOR@/defs + +Name: gst-python uninstalled +Description: Python bindings for GStreamer, not installed +Requires: pygtk-2.0, gstreamer-@GST_MAJORMINOR@ +Version: @VERSION@ +#Cflags: -I${gstpythonincludedir} diff --git a/pkgconfig/gst-python.pc.in b/pkgconfig/gst-python.pc.in new file mode 100644 index 0000000000..ddf09f69e3 --- /dev/null +++ b/pkgconfig/gst-python.pc.in @@ -0,0 +1,18 @@ +#prefix=@prefix@ +#exec_prefix=@exec_prefix@ +#includedir=@includedir@ +#datadir=@datadir@ + +# you can use the --variable=pygtkincludedir argument to +# pkg-config to get this value. You might want to use this to +# install additional headers. +#gstpythonincludedir=${includedir}/gst-python-@GST_MAJORMINOR@ + +# same here. Useful when calling the code generator in addon packages. +#defsdir=${datadir}/gst-python/@GST_MAJORMINOR@/defs + +Name: gst-python +Description: Python bindings for GStreamer +Requires: pygtk-2.0, gstreamer-@GST_MAJORMINOR@ +Version: @VERSION@ +#Cflags: -I${gstpythonincludedir}