~ubuntu-branches/ubuntu/lucid/libxml-libxml-perl/lucid

« back to all changes in this revision

Viewing changes to debian/repack.sh

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann, gregor herrmann, Damyan Ivanov
  • Date: 2008-11-29 10:43:03 UTC
  • mfrom: (1.2.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20081129104303-z1jg50ymutx3kgos
Tags: 1.69.ds-1
[ gregor herrmann ]
* New upstream release.
* Set Standards-Version to 3.8.0; add debian/README.source to document quilt
  usage.
* Add a debian/repack.sh script that creates the .ds version from the
  upstream tarball: it removes the debian/ directory and the lines
  referencing it in MANIFEST. Mention the repackaging in
  debian/README.source. Add get-orig-source target to debian/rules.
* debian/watch: extended regexp for matching upstream releases.
* Refresh patch fix_manpage_typos and add a short description.
* Set debhelper compatibility level to 7; adapt
  debian/{control,compat,rules}.
* debian/copyright: switch to new format.
* debian/control:
  - switch Vcs-Browser field to ViewSVN
  - add /me to Uploaders
  - wrap long lines
  - mention module name in long description
  - remove -1 revision from versioned build dependency
  - add ${misc:Depends} to Depends:

[ Damyan Ivanov ]
* add no_linking_with_libm.patch, avoiding unneeded linkage with libm

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Repackage upstream source, removing shipped debian/ directory
 
3
# should be called as "repack.sh --upstream-source <ver> <downloaded file>
 
4
# (for example, via uscan)
 
5
 
 
6
set -e
 
7
set -u
 
8
 
 
9
VER="$2"
 
10
FILE="$3"
 
11
DVER="${VER}.ds"
 
12
PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'`
 
13
 
 
14
REPACK_DIR="$PKG-$VER.orig" # DevRef § 6.7.8.2
 
15
 
 
16
echo -e "\nRepackaging $FILE\n"
 
17
 
 
18
DIR=`mktemp -d ./tmpRepackXXXXXX`
 
19
trap "rm -rf \"$DIR\"" QUIT INT EXIT
 
20
 
 
21
# Create an extra directory to cope with rootless tarballs
 
22
UP_BASE="$DIR/unpack"
 
23
mkdir "$UP_BASE"
 
24
tar xzf "$FILE" -C "$UP_BASE"
 
25
 
 
26
if [ `ls -1 "$UP_BASE" | wc -l` -eq 1 ]; then
 
27
        # Tarball does contain a root directory
 
28
        UP_BASE="$UP_BASE/`ls -1 "$UP_BASE"`"
 
29
fi
 
30
 
 
31
## Here we remove the upstream debian directory and delete all of the 
 
32
## occurences about debian in the MANIFEST file.
 
33
rm -vr $UP_BASE/debian
 
34
sed '/^debian/d' $UP_BASE/MANIFEST> $UP_BASE/MANIFEST.no-debian
 
35
mv $UP_BASE/MANIFEST.no-debian $UP_BASE/MANIFEST
 
36
## End
 
37
 
 
38
mv "$UP_BASE" "$DIR/$REPACK_DIR"
 
39
 
 
40
# Using a pipe hides tar errors!
 
41
tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR"
 
42
gzip -9 < "$DIR/repacked.tar" > "$DIR/repacked.tar.gz"
 
43
 
 
44
 
 
45
mv "$DIR/repacked.tar.gz" "$FILE"
 
46
 
 
47
echo "*** $FILE repackaged"
 
48
 
 
49
prename --verbose --force "s/$VER/$DVER/" $FILE