~ubuntu-branches/ubuntu/utopic/libva/utopic

« back to all changes in this revision

Viewing changes to debian/libva-get-orig-source

  • Committer: Package Import Robot
  • Author(s): Sebastian Ramacher
  • Date: 2014-05-10 16:15:54 UTC
  • mfrom: (3.2.13 sid)
  • Revision ID: package-import@ubuntu.com-20140510161554-pcfzyscl3eec3ji7
Tags: 1.3.1-1
* New upstream release.
  - Fix black video output with i965 driver and certain versions of X.org.
    (Closes: #743701)
* debian/rules: Install upstream changelog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
# This script is used to download the upstream source for libva and
4
 
# generate it into an orig source tarball for Debian.
5
 
 
6
 
# Common variables used to ease maintenance of this script
7
 
LIBVA_VERSION="1.0.8"
8
 
LIBVA_TARBALL="libva-$LIBVA_VERSION.tar.gz"
9
 
LIBVA_ORIG_TARBALL="libva_$LIBVA_VERSION.orig.tar.gz"
10
 
USAGE="\n\
11
 
This script is used to generate the orig tarball used in building\n\
12
 
Debian packages for libva-$LIBVA_VERSION.\n\
13
 
Usage: libva-get-orig-source [OPTION]\n\
14
 
\n\
15
 
 -h, --help                 Display this help message.\n"
16
 
 
17
 
while [ "$#" -gt "0" ]
18
 
do
19
 
    case "$1" in
20
 
        -h|--help|*)
21
 
            echo "${USAGE}"
22
 
            exit 1
23
 
            ;;
24
 
    esac
25
 
done
26
 
 
27
 
make_current_tarball() {
28
 
    # Download the tarball if it's not available in the current directory
29
 
    [ -f $LIBVA_TARBALL ] || \
30
 
        wget -c http://cgit.freedesktop.org/libva/snapshot/$LIBVA_TARBALL
31
 
 
32
 
    # Extract tarball and run 'autoreconf -vif'
33
 
    echo "Extracting tarball and running 'autoreconf -vif'"
34
 
    tar -zxf $LIBVA_TARBALL
35
 
    cd libva-$LIBVA_VERSION
36
 
    autoreconf -vif
37
 
    cd ..
38
 
 
39
 
    # Remove temp files and other cruft from source tarball
40
 
    # The find command snippet here was taken from debhelper's dh_clean command
41
 
    # with some modification to delete more unneeded files.
42
 
    echo "Removing temp files and other cruft from source tarball"
43
 
    find libva-$LIBVA_VERSION \( \( -type f -a \
44
 
        \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
45
 
        -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
46
 
        -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
47
 
        -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
48
 
        -o -name config.status -o -name config.cache -o -name config.log \
49
 
        \) -exec rm -f "{}" \; \) -o \
50
 
        \( -type d -a -name autom4te.cache -prune -exec rm -rf "{}" \; \) \)
51
 
    rm libva-$LIBVA_VERSION/.gitignore
52
 
    rm libva-$LIBVA_VERSION/.cvsignore
53
 
    rm -rf libva-$LIBVA_VERSION/debian
54
 
 
55
 
    # Remove empty directories
56
 
    echo "Removing empty directories"
57
 
    find libva-$LIBVA_VERSION -type d -empty -delete
58
 
 
59
 
    # Repack tarball to final orig tarball
60
 
    echo "Creating orig tarball"
61
 
    tar --exclude-vcs -zcf "$LIBVA_ORIG_TARBALL" "libva-$LIBVA_VERSION/"
62
 
}
63
 
 
64
 
make_current_tarball