File: generate-ubuntu-source

package info (click to toggle)
gpodder 2.20.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,228 kB
  • sloc: python: 16,951; makefile: 183; ansic: 140; sh: 97
file content (39 lines) | stat: -rw-r--r-- 991 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# Generate Ubuntu derivations of a normal Debian package source
# 2009-09-23 Thomas Perl

SOURCEFILE=$1
VERSION=`echo $SOURCEFILE | sed -e 's/[^_]*_\(.*\)-[^-]*\.dsc/\1/g'`
FOLDER=`echo $SOURCEFILE | sed -e 's/\([^_]*\)_.*/\1/g'`-${VERSION}

# See https://wiki.ubuntu.com/DevelopmentCodeNames
UBUNTU_RELEASES="jaunty karmic lucid maverick natty"

echo "SOURCEFILE = $SOURCEFILE"
echo "VERSION    = $VERSION"
echo "FOLDER     = $FOLDER"

for DIST in $UBUNTU_RELEASES; do
    dpkg-source -x $SOURCEFILE
    cd $FOLDER

    VERSION=`dpkg-parsechangelog | awk '/^Version: / {print $2}'`
    NEW_VERSION=${VERSION}~${DIST}0

    dch --distribution ${DIST} \
        --force-bad-version --preserve \
        --newversion ${NEW_VERSION} "Automatic build for ${DIST}"

    dpkg-buildpackage -S -sa -us -uc
    cd ..
    rm -rf $FOLDER
done

debsign *.changes

echo
echo " If signing (as oppposed to singing) went well, do this now:"
echo
echo "       dput ppa:thp/gpodder *.changes"
echo