~ubuntu-branches/ubuntu/karmic/coccinelle/karmic

« back to all changes in this revision

Viewing changes to debian/repack.sh

  • Committer: Bazaar Package Importer
  • Author(s): Євгеній Мещеряков
  • Date: 2009-05-11 15:32:24 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090511153224-1odv41d4dkr3y80v
Tags: 0.1.8.deb-2
Use common install Makefile target for both native and bytecode
build. This hopefully fixes FTBFS on bytecode archs 

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
menhirlib/
22
22
# provided by the libsexplib-camlp4-dev package
23
23
ocamlsexp/
24
 
# generated docs
25
 
docs/options.pdf
 
24
# GFDL
 
25
docs/manual/
26
26
END
27
27
# TODO do something about globals/config.ml
28
28
        # remove some junk and autogenerated files
30
30
        find "$ORIGDIR/" -name .subdirs -print -exec rm "{}" \;
31
31
}
32
32
 
33
 
if test ! $# = 3; then exit 1; fi
34
 
 
35
 
new_version="$2"
36
 
symlink="$3"
37
 
 
38
 
tarball=`readlink "$symlink"`
39
 
 
40
 
ORIGDIR="../coccinelle-${new_version}"
 
33
if test ! $# = 1; then exit 1; fi
 
34
 
 
35
tarball="$1"
 
36
tmpdir="`mktemp -td repackXXXXXX`"
 
37
 
 
38
tar -C "$tmpdir" -xzf "$tarball"
 
39
ORIGDIR="`ls -d \"$tmpdir/coccinelle-\"*`"
 
40
archname="`basename \"$ORIGDIR\"`"
41
41
 
42
42
cleanup
43
43
 
44
44
# repack the source
45
 
rm "$symlink"
46
 
GZIP=-9 tar -czC ../ -f "../coccinelle_${new_version}.orig.tar.gz" "coccinelle-${new_version}"
47
 
rm -rf "$ORIGDIR"
 
45
GZIP=-9 tar -czC "$tmpdir" -f "result.tar.gz" "$archname"
 
46
rm -rf "$tmpdir"