~ubuntu-branches/debian/sid/cheese/sid

« back to all changes in this revision

Viewing changes to autogen.sh

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2011-07-17 21:04:16 UTC
  • mfrom: (15.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20110717210416-nt5qi659qei7a2yy
Tags: 3.0.1-2
* debian/control.in:
  - Change gir1.2-cheese-3.0 Section to libs
  - Make library packages depend against cheese-common package
  - Make cheese package recommends against hicolor-icon-theme
  - Move gst Dependency to libcheese package
* debian/patches/0002-fix-linking.patch: Add missing library to fix linking
* debian/watch:
  - Switch to .bz2 tarballs.
  - Bump version to 3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Run this to generate all the initial makefiles, etc.
 
3
 
 
4
srcdir=`dirname $0`
 
5
test -z "$srcdir" && srcdir=.
 
6
 
 
7
PKG_NAME="cheese"
 
8
REQUIRED_VALA_VERSION=0.9.2
 
9
 
 
10
(test -f $srcdir/src/cheese-main.vala) || {
 
11
    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
 
12
    echo " top-level $PKG_NAME directory"
 
13
    exit 1
 
14
}
 
15
 
 
16
which gnome-autogen.sh || {
 
17
    echo "You need to install gnome-common"
 
18
    exit 1
 
19
}
 
20
 
 
21
# Usage:
 
22
#     compare_versions MIN_VERSION ACTUAL_VERSION
 
23
# returns true if ACTUAL_VERSION >= MIN_VERSION
 
24
compare_versions() {
 
25
    ch_min_version=$1
 
26
    ch_actual_version=$2
 
27
    ch_status=0
 
28
    IFS="${IFS=         }"; ch_save_IFS="$IFS"; IFS="."
 
29
    set $ch_actual_version
 
30
    for ch_min in $ch_min_version; do
 
31
        ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
 
32
        if [ -z "$ch_min" ]; then break; fi
 
33
        if [ -z "$ch_cur" ]; then ch_status=1; break; fi
 
34
        if [ $ch_cur -gt $ch_min ]; then break; fi
 
35
        if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
 
36
    done
 
37
    IFS="$ch_save_IFS"
 
38
    return $ch_status
 
39
}
 
40
 
 
41
which valac || {
 
42
    echo "**Error**: You must have valac >= $REQUIRED_VALA_VERSION installed to build $PKG_NAME"
 
43
    exit 1
 
44
}
 
45
 
 
46
# Vala version check
 
47
test -z "$VALAC" && VALAC=valac
 
48
VALA_VERSION=`$VALAC --version | cut -d" " -f2`
 
49
echo $VALA_VERSION
 
50
 
 
51
if ! compare_versions $REQUIRED_VALA_VERSION $VALA_VERSION; then
 
52
    echo "**Error**: You must have valac >= $REQUIRED_VALA_VERSION installed to build $PKG_NAME, you have $VALA_VERSION"
 
53
    exit 1
 
54
fi
 
55
 
 
56
. gnome-autogen.sh