update to conform more to other modules fix spec file, the bindings build and work, yay !

Original commit message from CVS:
update to conform more to other modules
fix spec file, the bindings build and work, yay !
parent 7a17f8aa
......@@ -3,4 +3,4 @@ AUTOMAKE_OPTIONS = 1.5
SUBDIRS = gstreamer examples
EXTRA_DIST = \
gst-python.spec.in
gst-python.spec.in gst-python.spec
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
PROJECT=gst-python
TEST_TYPE=-d
FILE=gstreamer
DIE=0
test -z "$AUTOMAKE" && AUTOMAKE=automake
test -z "$ACLOCAL" && ACLOCAL=aclocal
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile gnome-xml."
echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.4.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
package=gst-python
srcfile=gstreamer/gstreamer.c
# a quick cvs co if necessary to alleviate the pain - may remove this
# when developers get a clue ;)
if test ! -d common;
then
echo "+ getting common/ from cvs"
cvs co common
fi
# source helper functions
if test ! -e common/gst-autogen.sh;
then
echo There is something wrong with your source tree.
echo You are missing common/gst-autogen.sh
exit 1
fi
test $TEST_TYPE $FILE || {
echo "You must run this script in the top-level $PROJECT directory"
exit 1
}
. common/gst-autogen.sh
CONFIGURE_DEF_OPT='--enable-maintainer-mode'
autogen_options $@
echo -n "+ check for build tools"
if test ! -z $NOCHECK; then echo " skipped"; else echo; fi
version_check "autoconf" "$AUTOCONF autoconf autoconf-2.53 autoconf-2.52" \
"ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
version_check "automake" "$AUTOMAKE automake automake-1.6 automake-1.5" \
"ftp://ftp.gnu.org/pub/gnu/automake/" 1 5 || DIE=1
version_check "libtool" "" \
"ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
version_check "pkg-config" "" \
"http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
die_check $DIE
autoconf_2_52d_check || DIE=1
aclocal_check || DIE=1
autoheader_check || DIE=1
die_check $DIE
# if no arguments specified then this will be printed
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
echo "+ checking for autogen.sh options"
echo " This autogen script will automatically run ./configure as:"
echo " ./configure $CONFIGURE_DEF_OPT"
echo " To pass any additional options, please specify them on the $0"
echo " command line."
fi
case $CC in
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
esac
toplevel_check $srcfile
if test -z "$ACLOCAL_FLAGS"; then
acdir=`$ACLOCAL --print-ac-dir`
m4list="glib-2.0.m4 gtk-2.0.m4 gettext.m4"
acdir=`$aclocal --print-ac-dir`
m4list="glib-2.0.m4 gtk-2.0.m4"
for file in $m4list
do
......@@ -76,26 +76,33 @@ if test -z "$ACLOCAL_FLAGS"; then
done
fi
#echo "Running gettextize... Ignore non-fatal messages."
# Hmm, we specify --force here, since otherwise things dont'
# get added reliably, but we don't want to overwrite intl
# while making dist.
#echo "no" | gettextize --copy --force
$ACLOCAL $ACLOCAL_FLAGS
# optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
tool_run "$aclocal" "-I common/m4 $ACLOCAL_FLAGS"
tool_run "libtoolize" "--copy --force"
tool_run "$autoheader"
# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
echo timestamp > stamp-h.in 2> /dev/null
tool_run "$autoconf"
# run libtoolize ...
libtoolize --force --copy
$AUTOMAKE --add-missing --copy $am_opt
autoheader
autoconf
cd $ORIGDIR
case $CC in
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
esac
tool_run "$automake" "-a -c $am_opt"
$srcdir/configure --enable-maintainer-mode "$@"
test -n "$NOCONFIGURE" && {
echo "+ skipping configure stage for package $package, as requested."
echo "+ autogen.sh done."
exit 0
}
echo
echo "Now type 'make' to compile $PROJECT."
echo "+ running configure ... "
test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
echo
./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
echo " configure failed"
exit 1
}
echo "Now type 'make' to compile $package."
common @ 9a3a505f
Subproject commit ed429334bba35b10172ba97d9b3795b75a65b388
Subproject commit 9a3a505fcc52865de0bedbb3ee1ce0a6dcc9a025
-*- mode: m4 -*-
AC_PREREQ(2.54)
AC_INIT
AC_CANONICAL_TARGET
dnl the gnome-python version number
m4_define(gst_python_major_version, 0)
m4_define(gst_python_minor_version, 1)
m4_define(gst_python_micro_version, 0)
m4_define(gst_python_version, gst_python_major_version.gst_python_minor_version.gst_python_micro_version)
AS_VERSION(gst-python, GST_PYTHON_VERSION, 0, 1, 0, 0)
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
dnl required versions of other packages
m4_define(pygtk_required_version, 1.99.14)
m4_define(glib_required_version, 2.0.0)
m4_define(gtk_required_version, 2.0.0)
m4_define(gstreamer_required_version, 0.6.0)
m4_define(gstreamer_majorminor, 0.6)
AC_INIT(gst-python, gst_python_version,
[http://gstreamer.net/])
dnl AC_CONFIG_SRCDIR([gnome/uimodule.c])
AC_CONFIG_SRCDIR([gstreamer/gstreamermodule.c])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
dnl Add parameters for aclocal
ACLOCAL="$ACLOCAL -I common/m4 $ACLOCAL_FLAGS"
dnl put the ACLOCAL flags in the makefile
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
dnl required versions of other packages
AC_SUBST(PYGTK_REQ, 1.99.14)
AC_SUBST(GLIB_REQ, 2.0.0)
AC_SUBST(GTK_REQ, 2.0.0)
AC_SUBST(GST_REQ, 0.6.0)
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
......@@ -38,6 +31,7 @@ minver = (2,2,0,'final',0)
if sys.version_info < minver:
sys.exit(1)
sys.exit(0)"
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
AC_MSG_RESULT(okay)
......@@ -46,8 +40,29 @@ else
fi
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
dnl check for GStreamer
dnl start with 0.7
GST_MAJORMINOR=0.7
PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
HAVE_GSTREAMER=yes,HAVE_GSTREAMER=no)
dnl try 0.6
if test "x$HAVE_GSTREAMER" = "xno"; then
GST_MAJORMINOR=0.6
PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
HAVE_GSTREAMER=yes,HAVE_GSTREAMER=no)
fi
dnl Give error and exit if we don't have gstreamer
if test "x$HAVE_GSTREAMER" = "xno"; then
AC_MSG_ERROR(you need gstreamer development packages installed !)
fi
AC_SUBST(GST_LIBS)
AC_SUBST(GST_CFLAGS)
dnl check for pygtk
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= pygtk_required_version)
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ)
AC_SUBST(PYGTK_CFLAGS)
AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
if test "x$PYGTK_CODEGEN" = xno; then
......@@ -64,37 +79,21 @@ PYGTK_H2DEF=`$PKG_CONFIG --variable=datadir pygtk-2.0`/pygtk/2.0/codegen/h2def.p
AC_SUBST(PYGTK_H2DEF)
AC_MSG_RESULT($PYGTK_H2DEF)
dnl required version substitutions for use in the spec file
PYGTK_VERSION=pygtk_required_version
GTK_VERSION=gtk_required_version
AC_SUBST(PYGTK_VERSION)
AC_SUBST(GLIB_VERSION)
AC_SUBST(GTK_VERSION)
dnl check for glib
AM_PATH_GLIB_2_0(glib_required_version,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)],$extra_mods)
dnl check to make sure we can find gtk
AM_PATH_GTK_2_0(gtk_required_version,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)],$extra_mods)
dnl check to make sure we can find gstreamer
PKG_CHECK_MODULES(GST, gstreamer-gstreamer_majorminor >= gstreamer_required_version, HAVE_GST="yes", HAVE_GST="no")
#dnl check for glib
#AM_PATH_GLIB_2_0(glib_required_version,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)],$extra_mods)
#
#dnl check to make sure we can find gtk
#AM_PATH_GTK_2_0(gtk_required_version,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)],$extra_mods)
AC_MSG_CHECKING(for gstreamer include dir)
GST_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gstreamer-gstreamer_majorminor`
GST_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gstreamer-$GST_MAJORMINOR`
AC_SUBST(GST_INCLUDEDIR)
AC_MSG_RESULT($GST_INCLUDEDIR)
if test "x$GST_INCLUDEDIR" = "x"; then
AC_MSG_ERROR(no gstreamer include dir found)
fi
if test "x$HAVE_GST" = "xno"; then
AC_MSG_ERROR(need GStreamer gstreamer_required_version)
fi
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_LIBS)
dnl add debugging options ...
changequote(,)dnl
if test "x$GCC" = xyes; then
......@@ -109,11 +108,11 @@ if test "x$GCC" = xyes; then
esac
fi
changequote([,])dnl
dnl
AC_CONFIG_FILES(
AC_OUTPUT([
Makefile
gstreamer/Makefile
examples/Makefile
examples/gstreamer/Makefile
gst-python.spec)
AC_OUTPUT
gst-python.spec
])
%define pygtk_ver @PYGTK_VERSION@
%define gstversion %(pkg-config --modversion gstreamer)
Summary: The sources for the Python GStreamer extension module.
Name: gst-python
Version: @VERSION@
Release: 2
Source: http://gstreamer.net/ blah_blah_blah /gst-python-%{version}.tar.gz
Copyright: LGPL
Group: Development/Languages
BuildRoot: /var/tmp/gst--python-root
Packager: David I. Lehn <dlehn@users.sourceforge.net>
BuildRequires: pygtk2-devel = %{pygtk_ver}
BuildRequires: python2-devel
BuildRequires: gtk2-devel >= @GTK_VERSION@
BuildRequires: libgnomecanvas-devel >= @LIBGNOMECANVAS_VERSION@
BuildRequires: libgnome-devel >= @LIBGNOME_VERSION@
Name: gstreamer-python
Version: @VERSION@
Release: 1
Summary: Python bindings for GStreamer.
Group: Development/Languages
License: LGPL
URL: http://gstreamer.net/
Vendor: GStreamer Backpackers Team <package@gstreamer.net>
Source: http://gstreamer.net/releases/gst-python/gst-python-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%define _pygtk @PYGTK_REQ@
Requires: python2
Requires: pygtk2 >= %_pygtk
Requires: gstreamer >= 0.6.2
BuildRequires: pkgconfig
BuildRequires: pygtk2-devel = %_pygtk
BuildRequires: python2-devel
%description
The gst-python package contains the source packages for the
GStreamer Python bindings.
%package gst-python
Version: %{version}
Summary: Python bindings for GStreamer.
Group: Development/Languages
Requires: gnome-python2 = %{version}
Requires: gtk2 >= @GTK_VERSION@
Requires: gstreamer >= %{gstversion}
%description gst-python
This module contains a wrapper that allows GStreamer applications
to be written in Python.
%prep
%setup -q -n gst-python-%{version}
export PYTHON=/usr/bin/python2.2
# export PYTHON=/usr/bin/python2.2
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix}
%build
......@@ -42,15 +33,24 @@ make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%makeinstall
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog README NEWS examples/gstreamer
%dir %{_prefix}/lib/python?.?/site-packages/gstreamer/
%{_prefix}/lib/python?.?/site-packages/gstreamer/__init__.*
%{_prefix}/lib/python?.?/site-packages/gstreamer/_gstreamermodule.so
%dir %{_libdir}/python?.?/site-packages/gstreamer
%{_libdir}/python?.?/site-packages/gstreamer/__init__.*
%{_libdir}/python?.?/site-packages/_gstreamermodule.so
%changelog
* Wed Jun 11 2003 Thomas Vander Stichele <thomas at apestaart dot org>
- Update
* Sat Mar 23 2002 David I. Lehn <dlehn@vt.edu>
- new gst-python package based on pygtk and gconf binding packages
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment