diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-06-04 11:12:14 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-06-04 11:12:14 (GMT) |
commit | 47356c60f8590676405dff76e487eca4a823a420 (patch) | |
tree | 464a38ee3b21b1ff747e239419c97f034bafb8db | |
parent | 73521615d760c4c8afbdf05f7ac372ce3a6c7c62 (diff) |
Modernize build scripts a bit
-rwxr-xr-x | autogen.sh | 21 | ||||
-rwxr-xr-x | build-snapshot.py | 49 | ||||
-rwxr-xr-x | build-snapshot.sh | 12 | ||||
-rw-r--r-- | configure.ac (renamed from configure.in) | 0 |
4 files changed, 51 insertions, 31 deletions
@@ -1,20 +1,3 @@ #!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -PKG_NAME="artwork" - -(test -f $srcdir/README) || { - echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" - echo " top-level $PKG_NAME directory" - exit 1 -} - -which gnome-autogen.sh || { - echo "You need to install gnome-common from the GNOME CVS" - exit 1 -} - -REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh +autoreconf -i +./configure "$@" diff --git a/build-snapshot.py b/build-snapshot.py new file mode 100755 index 0000000..d6e684d --- /dev/null +++ b/build-snapshot.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +# Copyright (C) 2007, Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +import os +import sys +import re + +def get_name_and_version(): + f = open('configure.ac', 'r') + config = f.read() + f.close() + + exp = 'AC\_INIT\(\[\w+\]\,\[([0-9.]+)\]\,\[\w*\]\,\[(\w+)' + match = re.search(exp, config) + if not match: + print 'Cannot find the package name and version.' + sys.exit(0) + + return [ match.group(2), match.group(1) ] + + +[ name, version ] = get_name_and_version() + +cmd = 'git-show-ref --hash=10 refs/heads/master' +alphatag = os.popen(cmd).readline().strip() + +tarball = '%s-%s-git%s.tar.bz2' % (name, version, alphatag) + +os.spawnlp(os.P_WAIT, 'make', 'make', 'distcheck') + +os.rename('%s-%s.tar.bz2' % (name, version), tarball) + +if os.environ.has_key('SNAPSHOT_DEST'): + os.spawnlp(os.P_WAIT, 'scp', 'scp', tarball, os.environ['SNAPSHOT_DEST']) diff --git a/build-snapshot.sh b/build-snapshot.sh deleted file mode 100755 index e26e12a..0000000 --- a/build-snapshot.sh +++ /dev/null @@ -1,12 +0,0 @@ -VERSION=0.33 -DATE=`date +%Y%m%d` -RELEASE=2.19 -TARBALL=olpc-artwork-$VERSION-$RELEASE.${DATE}git.tar.gz - -rm olpc-artwork-$VERSION.tar.gz - -make distcheck - -mv olpc-artwork-$VERSION.tar.gz $TARBALL -scp $TARBALL mpg@devserv.devel.redhat.com:~ -rm $TARBALL diff --git a/configure.in b/configure.ac index 405afa3..405afa3 100644 --- a/configure.in +++ b/configure.ac |