[gnome-live] Merge changes



commit f319448f1c17d3900da4da0d6b2263d88dc5d94b
Author: Zhang Sen <zh jesse gmail com>
Date:   Sun Aug 30 10:05:21 2009 +0800

    Merge changes
    
    from https://github.com/GnomeDevKit/buildbot/tree

 build-system/all-modules                         |    2 +
 build-system/blacklist                           |    7 +-
 build-system/check-pc                            |   23 +++
 build-system/clean_reqs.py                       |   54 +++++
 build-system/cron.sh                             |    3 +-
 build-system/crontab                             |    2 +-
 build-system/gnomepackage.recipe                 |  225 ++++++++++++++++++++++
 build-system/rc-files/{dot_conaryrc => conaryrc} |    0
 build-system/rc-files/{dot_rmakerc => rmakerc}   |   11 +-
 9 files changed, 320 insertions(+), 7 deletions(-)
---
diff --git a/build-system/all-modules b/build-system/all-modules
index 3e3b8cd..940911f 100644
--- a/build-system/all-modules
+++ b/build-system/all-modules
@@ -13,7 +13,9 @@ evolution
 evolution-data-server
 evolution-exchange
 evolution-webcal
+file-roller
 gcalctool
+gconf-editor
 gdm
 gedit
 gir-repository
diff --git a/build-system/blacklist b/build-system/blacklist
index 7cb8dea..8d14799 100644
--- a/build-system/blacklist
+++ b/build-system/blacklist
@@ -1,8 +1,9 @@
-evolution
-evolution-data-server
+GConf
 evolution-exchange
+glibmm
 gnome-media
-gnome-power-manager
 gnome-python
 gnome-python-desktop
+gnome-system-tools
+gtkmm
 intltool
diff --git a/build-system/check-pc b/build-system/check-pc
new file mode 100755
index 0000000..12771f3
--- /dev/null
+++ b/build-system/check-pc
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+if [ $# -lt 1 ]
+then
+    echo 'Usage: check-pc <pc-filename>'
+    exit
+fi
+
+for app in $*;
+do
+    if [ $# -gt 1 ]
+    then
+        echo "$app"
+    fi
+    pcfile=/usr/lib/pkgconfig/$app.pc
+    pkg=`conary rq --path $pcfile --context 'gnome:trunk'`
+    if [ -n "$pkg" ]
+    then
+        echo "$pkg"
+    else
+        echo "not found in gnome:trunk"
+    fi
+done
diff --git a/build-system/clean_reqs.py b/build-system/clean_reqs.py
new file mode 100755
index 0000000..cba6269
--- /dev/null
+++ b/build-system/clean_reqs.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+
+"""
+Input: some buildRequires
+Output: difference of these buildRequires again those in gnomepackage
+
+Some packages have duplicate buildRequires with gnomepackage. Removing them
+would be cleaner.
+
+Example:
+    python clean-reqs.py gtk:devel
+    python clean-reqs.py "gtk:devel"
+    python clean-reqs.py ["gtk:devel"]
+    python clean-reqs.py [ "gtk:devel", "glib:devel" ]
+    python clean-reqs.py '["gtk:devel",
+        "glib:devel"]'
+It is very permissive as to the format.
+"""
+
+import re
+import sys
+
+def main():
+    base_buildreqs = set([
+        'automake:runtime', 'dbus-glib:devel', 'dbus-glib:devellib',
+        'dbus:devel', 'docbook-dtds:data', 'expat:devel', 'file:runtime',
+        'gcc-c++:runtime', 'gettext:devel', 'gettext:runtime', 'git:runtime',
+        'glib:devel', 'glib:runtime', 'gnome-common:devel',
+        'gnome-common:runtime', 'gnome-doc-utils:devel',
+        'gnome-doc-utils:runtime', 'gtk-doc:devel', 'gtk-doc:runtime',
+        'gtk:devel', 'intltool:runtime', 'libICE:devel', 'libSM:devel',
+        'libX11:devel', 'libXau:devel', 'libXdmcp:devel', 'libXext:devel',
+        'libXi:devel', 'libXinerama:devellib', 'libXrender:devel',
+        'libXt:devel', 'libdmx:devel', 'libtool:devel', 'libtool:runtime',
+        'libxslt:runtime', 'pkgconfig:devel', 'subversion:runtime',
+        'which:runtime', 'zlib:devel'])
+
+    # merge the list into a single string
+    input = " ".join(sys.argv[1:])
+    # delete all the punctuations
+    input = re.sub('''[\[\],'"\n]''', " ", input)
+    # strip leading/trailing spaces
+    # merge sequential spaces into one
+    input = " ".join(input.strip().split())
+    # make it into a set
+    input_buildreqs = set(input.split(" "))
+
+    res = list(input_buildreqs.difference(base_buildreqs))
+    res.sort()
+    print
+    print res
+
+if __name__ == "__main__":
+    main()
diff --git a/build-system/cron.sh b/build-system/cron.sh
index ee53c9f..834e79b 100755
--- a/build-system/cron.sh
+++ b/build-system/cron.sh
@@ -1,6 +1,7 @@
 #!/bin/bash
 
-cd /home/shared/GNOME/gnome-live/dev-kit/build-system
+cd /home/shared/GNOME/gnome-live/build-system
+git pull
 ./refresh-gnome update
 ./refresh-gnome build
 sleep 300
diff --git a/build-system/crontab b/build-system/crontab
index 13ff4d0..e7647ee 100644
--- a/build-system/crontab
+++ b/build-system/crontab
@@ -3,4 +3,4 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
 MAILTO=<mail>
 HOME=/home/<user>
 
-10 21 * * * /home/shared/GNOME/gnome-live/dev-kit/build-system/cron.sh > /home/<user>/cronlog
+10 21 * * * /home/shared/GNOME/gnome-live/build-system/cron.sh > /home/<user>/cronlog 2>&1
diff --git a/build-system/gnomepackage.recipe b/build-system/gnomepackage.recipe
new file mode 100644
index 0000000..ff741ba
--- /dev/null
+++ b/build-system/gnomepackage.recipe
@@ -0,0 +1,225 @@
+#
+# Copyright (c) 2004-2007 rPath, Inc.
+# This file is distributed under the terms of the MIT License.
+# A copy is available at http://www.rpath.com/permanent/mit-license.html
+#
+
+import datetime
+subprocess=__import__('subprocess')
+
+def _getGitRevision(git_url, branch):
+    p = subprocess.Popen(["/usr/bin/git", "ls-remote", "--heads",
+                        git_url, branch],
+                        stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+                        env={"HOME": "/tmp/"})
+    p.wait()
+    data = p.stdout.read().strip()
+    if p.returncode != 0:
+        print "revision not retrieved for branch %s on %s\n" % (branch, git_url)
+        return
+
+    # data should be of the format '<revision>  refs/heads/master'
+    return data.split()[0]
+
+class GnomePackageRecipe(CPackageRecipe):
+    buildRequires = [
+'automake:runtime', 'dbus-glib:devel', 'dbus-glib:devellib', 'dbus:devel',
+'docbook-dtds:data', 'expat:devel', 'file:runtime', 'gcc-c++:runtime',
+'gettext:devel', 'gettext:runtime', 'git:runtime', 'glib:devel', 'glib:runtime',
+'gnome-common:devel', 'gnome-common:runtime', 'gnome-doc-utils:devel',
+'gnome-doc-utils:runtime', 'gtk-doc:devel', 'gtk-doc:runtime', 'gtk:devel',
+'intltool:runtime', 'libICE:devel', 'libSM:devel', 'libX11:devel',
+'libXau:devel', 'libXdmcp:devel', 'libXext:devel', 'libXi:devel',
+'libXinerama:devellib', 'libXrender:devel', 'libXt:devel', 'libdmx:devel',
+'libtool:devel', 'libtool:runtime', 'libxslt:runtime', 'pkgconfig:devel',
+'subversion:runtime', 'which:runtime', 'zlib:devel']
+
+    name = 'gnomepackage'
+    majversion = '2.27'
+    version = datetime.date.today().strftime("%Y%m%d")
+
+    extraConfig = ''
+    preConfigure = ''
+    preMake = ''
+    preMakeInstall = 'GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1'
+    makeArgs = ''
+    makeInstallArgs = ''
+    configureName = 'configure'
+
+    # set this to the URL of a source archive if the package
+    # is not on GNOME's ftp server.
+    externalArchive = None
+    svnUrl = None
+    gitUrl = None
+
+    # list to hold patches
+    patches = []
+    # optional autoGen variable to set what command to run when needing to run autogen.sh
+    autoGen = 'NOCONFIGURE=yes ./autogen.sh'
+
+    # standard GNOME docs
+    docs = []
+
+    if Use.builddocs:
+        extraConfig += ' --enable-gtk-doc'
+    else:
+        extraConfig += ' --disable-gtk-doc'
+
+    @classmethod
+    def _getVersion(cls, pkg_name,
+            git_url=None,
+            branch=None):
+        """Format version string from git.
+
+        This is just a utility method and won't do anything to the recipe itself
+        """
+        if not git_url:
+            git_url = "git://git.gnome.org/" + pkg_name
+        if not branch:
+            branch = "master"
+
+        # use UTC
+        date_part = datetime.datetime.utcnow().strftime("%y%m%d")
+        # use the first 7 characters
+        revision_part = _getGitRevision(git_url, branch)[:7]
+        return "%s+%s" % (date_part, revision_part)
+
+    def setup(r):
+        if r.__class__.__name__ == 'GnomePackageRecipe':
+            return
+
+        # this one is subtle. we don't want a pkg that loads GnomePackageRecipe to be a buildReq of itself
+        # since this turns into a lot of dep cicles inside rMake...
+        #r.clearBuildReqs('%(name)s') # doesn't work :/
+
+        r.macros.optflags = '-g -Os'
+
+        r.unpack()
+        r.configure()
+        r.make()
+        r.preInstall()
+        r.install()
+        r.postInstall()
+        r.policy()
+
+    def unpack(r):
+        '''There cases can be handled:
+
+        1. you need to use an archive instead of git snapshot, then
+        define r.externalArchive. Like this:
+            externalArchive = 'http://ftp.gnome.org/blah/blah.tar.gz'
+
+        2. you need to use other snapshots (either svn or git; bzr may be added
+        later), other than git.gnome.org, then define r.svnUrl or r.gitUrl.
+
+        3. you don't want to run 'NOCONFIGURE=yes ./autogen.sh', then define
+        r.autoGen as you like. 
+        For example your autogen.sh doesn't recognize 'NOCONFIGURE=yes':
+            autoGen = None. 
+            configureName = 'autogen.sh'
+        '''
+        if r.externalArchive:
+            r.addArchive(r.externalArchive)
+            # autogen isn't needed
+        else:
+            if r.svnUrl:
+                r.addSvnSnapshot(r.svnUrl)
+            elif r.gitUrl:
+                r.addGitSnapshot(r.gitUrl)
+            else:
+                # if it's git, then the version _must_ be date+revision
+                r.macros.revision = r.macros.version.split("+")[1]
+                r.addGitSnapshot('git://git.gnome.org/%(name)s/', tag="%(revision)s")
+
+            if r.autoGen:
+                r.Run(r.autoGen)
+
+        for patch in r.patches:
+            r.addPatch(patch)
+
+    def configure (r):
+        r.Configure(r.extraConfig,
+                    configureName = r.configureName,
+                    preConfigure = r.preConfigure)
+
+    def make (r):
+        r.Make(r.makeArgs, preMake=r.preMake)
+
+    def install(r):
+        r.MakeInstall(r.makeInstallArgs, preMake=r.preMakeInstall)
+        # this really needs to be the other way around, but we need
+        # to find a way to automate that first.
+        #r.Requires('%s:runtime' %r.macros.name,
+        #                '%(libdir)s/gnome-vfs-2.0/modules/.*',
+        #                '%(libdir)s/bonobo/.*',
+        #                '%(libdir)s/gtk-2.0/modules/.*',
+        #                '%(libdir)s/libglade/2.0/.*',
+        #                '%(libdir)s/orbit-2.0/.*')
+        r.Remove('%(libdir)s/gtk-2.0/modules/*.a',
+                 '%(libdir)s/bonobo/*.a',
+                 '%(libdir)s/libglade/2.0/*.a',
+                 allowNoMatch = True)
+
+        # Remove any autogenerated scrollkeeper cache files.
+        # Entirely disabling scrollkeeper-update when building
+        # the package is preferred, either by modifying the
+        # makefile, or passing an option to the configure script,
+        # if such an option exists.
+        r.Remove('%(localstatedir)s/lib/scrollkeeper/',
+                 '%(localstatedir)s/scrollkeeper/',
+                 recursive = True)
+
+        if r.docs:
+            r.Doc(*r.docs)
+
+        # GConf schemas should be in :data so that :lib depends on them
+        r.ComponentSpec('data', '%(sysconfdir)s/gconf/schemas/')
+
+        #  Don't ship icon caches
+        r.Remove('%(datadir)s/icons/*/icon-theme.cache', allowNoMatch = True)
+
+    def policy(r):
+        pass
+
+    def preInstall(r):
+        # save space
+        # strip unneeded translations from .mo files
+        # http://bugzilla.gnome.org/show_bug.cgi?id=474987
+        r.Run("""
+if [ -d po ] ; then
+cd po
+grep -v ".*[.]desktop[.]in[.]in$\|.*[.]server[.]in[.]in$\|.*[.]schemas[.]in$" POTFILES.in > POTFILES.keep
+mv POTFILES.keep POTFILES.in
+intltool-update --pot
+for p in *.po; do
+  echo msgmerge $p %(name)s.pot
+  msgmerge $p %(name)s.pot > $p.out
+  msgfmt -o `basename $p .po`.gmo $p.out
+done
+
+fi
+""")
+
+    def postInstall(r):
+        # save some space
+        r.Run("""
+if [ -d %(destdir)s/%(datadir)s/gnome/help/ ]; then
+   cd %(destdir)s%(datadir)s/gnome/help/;
+   for helpdir in $(ls); do
+       for f in $helpdir/C/figures/*.{png,jpg}; do
+           b="$(basename $f)"
+           echo $b
+           for d in $helpdir/*; do
+               if [ -d "$d" -a "$d" != "$helpdir/C" ]; then
+                  g="$d/figures/$b"
+                  if [ -f "$g" ]; then
+                     if cmp -s $f $g; then
+                        rm "$g"; ln -s "../../C/figures/$b" "$g"
+                     fi
+                  fi
+               fi
+           done
+       done
+    done
+fi
+""", dir = '%(destdir)s')
diff --git a/build-system/rc-files/dot_conaryrc b/build-system/rc-files/conaryrc
similarity index 100%
rename from build-system/rc-files/dot_conaryrc
rename to build-system/rc-files/conaryrc
diff --git a/build-system/rc-files/dot_rmakerc b/build-system/rc-files/rmakerc
similarity index 68%
rename from build-system/rc-files/dot_rmakerc
rename to build-system/rc-files/rmakerc
index ea99562..a51cb81 100644
--- a/build-system/rc-files/dot_rmakerc
+++ b/build-system/rc-files/rmakerc
@@ -7,7 +7,6 @@ buildLabel          gnome rpath org gnome:trunk
 resolveTroves shared-mime-info:config=foresight rpath org fl:2-devel
 
 # use gnome:trunk's, instead of from fl:2-devel; should be in group-world.recipe
-resolveTroves WebKit=gnome rpath org gnome:trunk
 resolveTroves gmime=gnome rpath org gnome:trunk
 resolveTroves DeviceKit-power=gnome rpath org gnome:trunk
 
@@ -16,7 +15,15 @@ resolveTroves gir-repository=gnome rpath org gnome:trunk
 resolveTroves mutter=gnome rpath org gnome:trunk
 resolveTroves gjs=gnome rpath org gnome:trunk
 resolveTroves gobject-introspection=gnome rpath org gnome:trunk
+resolveTroves mm-common=gnome rpath org gnome:trunk # glibmm, gtkmm
+resolveTroves automake17=gnome rpath org gnome:trunk # gtk
+
+# at-spi
+resolveTroves gail=foresight rpath org fl:2-devel
+resolveTroves system-tools-backends=foresight rpath org fl:2-devel
+
+# needed by nemiver
+resolveTroves gtksourceviewmm=foresight rpath org fl:2-devel
 
 resolveTroves group-world=gnome rpath org gnome:trunk
 resolveTroves group-world=foresight rpath org fl:2-devel
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]