RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs                       Email:  pkarl...@rpm5.org
  Module: rpm                              Date:   01-Apr-2011 07:16:21
  Branch: rpm-5_4                          Handle: 2011040105161902

  Added files:              (Branch: rpm-5_4)
    rpm/macros              gstreamer.in
    rpm/scripts             gstreamer.sh
  Modified files:           (Branch: rpm-5_4)
    rpm                     CHANGES Makefile.am configure.ac
    rpm/lib                 rpmfc.c
    rpm/macros              macros.in

  Log:
    add classifiers for gstreamer plugins & dep generator. (a bit dirty
    for now.. :/)

  Summary:
    Revision    Changes     Path
    1.3501.2.89 +1  -0      rpm/CHANGES
    2.263.2.2   +2  -2      rpm/Makefile.am
    2.472.2.11  +3  -2      rpm/configure.ac
    1.75.2.3    +10 -0      rpm/lib/rpmfc.c
    1.1.2.2     +12 -0      rpm/macros/gstreamer.in
    1.39.2.10   +5  -1      rpm/macros/macros.in
    1.1.2.2     +71 -0      rpm/scripts/gstreamer.sh
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.3501.2.88 -r1.3501.2.89 CHANGES
  --- rpm/CHANGES       1 Apr 2011 02:12:07 -0000       1.3501.2.88
  +++ rpm/CHANGES       1 Apr 2011 05:16:20 -0000       1.3501.2.89
  @@ -1,4 +1,5 @@
   5.4.0 -> 5.4.1:
  +    - proyvind: rpmfc: add classifiers for gstreamer plugins & dep generator.
       - proyvind: use pythoneggs.py for python deps generated by internal 
generator.
       - proyvind: rpmfc: enable ruby file classifier & internal dep generator.
       - devzero2000: misread the review, repost as the original patch
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.263.2.1 -r2.263.2.2 Makefile.am
  --- rpm/Makefile.am   25 Jan 2011 14:42:45 -0000      2.263.2.1
  +++ rpm/Makefile.am   1 Apr 2011 05:16:19 -0000       2.263.2.2
  @@ -112,8 +112,8 @@
   
   pkgcfgdir =  $(pkglibdir)/macros.d
   pkgcfg_DATA = \
  -     macros/cmake macros/java macros/libtool macros/mandriva macros/mono \
  -     macros/perl macros/pkgconfig macros/php macros/python macros/ruby \
  +     macros/cmake macros/gstreamer macros/java macros/libtool 
macros/mandriva \
  +     macros/mono macros/perl macros/pkgconfig macros/php macros/python 
macros/ruby \
        macros/selinux macros/tcl
   
   noinst_HEADERS = build.h debug.h system.h
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.472.2.10 -r2.472.2.11 configure.ac
  --- rpm/configure.ac  25 Mar 2011 16:22:42 -0000      2.472.2.10
  +++ rpm/configure.ac  1 Apr 2011 05:16:19 -0000       2.472.2.11
  @@ -508,6 +508,7 @@
   AC_PATH_PROG(__GIT, git, %{_bindir}/git, $MYPATH)
   AC_PATH_PROG(__GPG, gpg2, %{_bindir}/gpg2, $MYPATH)
   AC_PATH_PROG(__GSR, gsr, %{_bindir}/gsr, $MYPATH)
  +AC_PATH_PROG(__GST_INSPECT, gst-inspect-0.10, %{_bindir}/gst-inspect-0.10, 
$MYPATH)
   AC_PATH_PROG(__GZIP, gzip, /bin/gzip, $MYPATH)
   AC_PATH_PROG(__HG, hg, %{_bindir}/hg, $MYPATH)
   AC_PATH_PROG(__ID, id, /usr/bin/id, $MYPATH)
  @@ -2316,8 +2317,8 @@
       scripts/Makefile
       rpmdb/DB_CONFIG
       macros/macros macros/macros.rpmbuild
  -    macros/cmake macros/java macros/libtool macros/mandriva macros/mono
  -    macros/perl macros/pkgconfig macros/php macros/python macros/ruby
  +    macros/cmake macros/gstreamer macros/java macros/libtool macros/mandriva
  +    macros/mono macros/perl macros/pkgconfig macros/php macros/python 
macros/ruby
       macros/selinux macros/tcl
       doc/Makefile
       doc/manual/Makefile doc/fr/Makefile doc/ja/Makefile doc/ko/Makefile
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfc.c
  ============================================================================
  $ cvs diff -u -r1.75.2.2 -r1.75.2.3 rpmfc.c
  --- rpm/lib/rpmfc.c   1 Apr 2011 03:21:13 -0000       1.75.2.2
  +++ rpm/lib/rpmfc.c   1 Apr 2011 05:16:21 -0000       1.75.2.3
  @@ -878,6 +878,12 @@
   #endif
            xx = rpmfcHelper(fc, 'R', "ruby");
       } else
  +    if ((fc->fcolor->vals[fc->ix] & (RPMFC_MODULE|RPMFC_LIBRARY)) &&
  +         strstr(fn, "/gstreamer")) {
  +     xx = rpmfcHelper(fc, 'P', "gstreamer");
  +     /* XXX: currently of no use, but for the sake of consistency... */
  +     xx = rpmfcHelper(fc, 'R', "gstreamer");
  +    }
   
   /*@-observertrans@*/
       defaultdocdir = _free(defaultdocdir) ;
  @@ -1041,6 +1047,10 @@
                        (fn = rindex(fn, '.')) && !strcmp(fn, ".gemspec"))
                        fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
                }
  +             /* XXX: lacking better, more generic classifier... */
  +             else if (!strncmp(fn, "/gstreamer", sizeof("/gstreamer")-1) &&
  +                     fc->fcolor->vals[fc->ix] & RPMFC_LIBRARY)
  +                 fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT);
            }
        }
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros/gstreamer.in
  ============================================================================
  $ cvs diff -u -r0 -r1.1.2.2 gstreamer.in
  --- /dev/null 2011-04-01 07:15:27.000000000 +0200
  +++ gstreamer.in      2011-04-01 07:16:21.286554028 +0200
  @@ -0,0 +1,12 @@
  +# Gstreamer specific macro definitions.
  +# To make use of these macros insert the following line into your spec file:
  +# %{load:%{_usrlibrpm}/macros.d/gstreamer}
  +
  +%__gst_inspect               @__GST_INSPECT
  +
  +# Path to scripts to autogenerate gstreamer package dependencies,
  +#
  +# Note: Used if _use_internal_dependency_generator is non-zero. The
  +# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
  +%__gstreamer_provides        %{_rpmhome}/gstreamer.sh --provides 
--gst-inspect %__gst_inspect
  +#%__gstreamer_requires       %{_rpmhome}/gstreamer.sh --requires
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros/macros.in
  ============================================================================
  $ cvs diff -u -r1.39.2.9 -r1.39.2.10 macros.in
  --- rpm/macros/macros.in      31 Mar 2011 07:38:39 -0000      1.39.2.9
  +++ rpm/macros/macros.in      1 Apr 2011 05:16:21 -0000       1.39.2.10
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.39.2.9 2011/03/31 07:38:39 devzero2000 Exp $
  +# $Id: macros.in,v 1.39.2.10 2011/04/01 05:16:21 pkarlsen Exp $
   #
   # This is a global RPM configuration file. All changes made here will
   # be lost when the rpm package is upgraded. Any per-system configuration
  @@ -952,6 +952,10 @@
   %{load:%{_usrlibrpm}/macros.d/cmake}
   
   #------------------------------------------------------------------------
  +# gstreamer(...) configuration.
  +%{load:%{_usrlibrpm}/macros.d/gstreamer}
  +
  +#------------------------------------------------------------------------
   # perl(...) configuration
   %{load:%{_usrlibrpm}/macros.d/perl}
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/gstreamer.sh
  ============================================================================
  $ cvs diff -u -r0 -r1.1.2.2 gstreamer.sh
  --- /dev/null 2011-04-01 07:15:27.000000000 +0200
  +++ gstreamer.sh      2011-04-01 07:16:20.976539533 +0200
  @@ -0,0 +1,71 @@
  +#!/bin/sh
  +#
  +# Script to install in:
  +# /usr/lib/rpm/redhat/find-provides.d
  +#
  +# Transform GStreamer auto install info into RPM provides
  +#
  +# Author: Bastien Nocera <had...@hadess.net>
  +# Based on other provides scripts from RPM
  +#
  +
  +[ $# -ge 1 ] || {
  +    cat > /dev/null
  +    exit 0
  +}
  +
  +filelist=`grep -e '.so$' | sed "s/['\"]/\\\&/g"`
  +provides=0
  +gst_inspect=$(which gst-inspect 2>/dev/null)
  +
  +# --- Alpha does not mark 64bit dependencies•
  +case `uname -m` in
  +  alpha*)    mark64="" ;;
  +  *)         mark64="()(64bit)" ;;
  +esac
  +
  +solist=$(echo $filelist | grep "libgst" | \
  +     xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1 )
  +
  +function getmark()
  +{
  +     lib64=`if file -L $1 2>/dev/null | \
  +             grep "ELF 64-bit" >/dev/null; then echo -n "$mark64"; fi`
  +}
  +
  +function libdir()
  +{
  +     buildlibdir=`dirname $1`
  +     buildlibdir=`dirname $buildlibdir`
  +}
  +
  +while [ "$#" -ne 0 ]; do
  +    case $1 in
  +     -P|--provides)
  +         provides=1
  +         ;;
  +     --gst-inspect)
  +         shift
  +         gst_inspect=$1
  +         ;;
  +    esac
  +    shift
  +done
  +
  +if [ -z "$gst_inspect" ]; then
  +    exit 1
  +fi
  +
  +if [ $provides -eq 1 ]; then
  +    for so in $solist ; do
  +     getmark $so
  +     libdir $so
  +     LD_LIBRARY_PATH=$buildlibdir $gst_inspect 
--print-plugin-auto-install-info --rpm $so 2> /dev/null | while read line ; do
  +         echo -n "$line";
  +         echo -n "$lib64"
  +         echo
  +     done
  +    done
  +fi
  +exit 0
  +
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to