| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
: <<=cut |
| 4 |
=pod |
| 5 |
|
| 6 |
=head1 NAME |
| 7 |
|
| 8 |
repack.stub - script to repack upstream tarballs from uscan |
| 9 |
|
| 10 |
=head1 INSTRUCTIONS |
| 11 |
|
| 12 |
put this in debian/repack.stub and add "debian sh debian/repack.stub" to |
| 13 |
the end of the line in debian/watch. you will also need to add a version |
| 14 |
mangle to debian/watch. |
| 15 |
|
| 16 |
then create a debian/repack.local. this is a shell script that is |
| 17 |
sourced under "set -e", so be careful to check returns codes. |
| 18 |
|
| 19 |
=head1 FUNCTIONS |
| 20 |
|
| 21 |
=over 4 |
| 22 |
|
| 23 |
=item rm |
| 24 |
|
| 25 |
rm is replaced by a function that does some magic ("rm -rv" by default), but also changes MANIFEST if $MANIFEST is 1 |
| 26 |
|
| 27 |
=item mv |
| 28 |
|
| 29 |
mv is replaced by a function that just does mv (by default), but also changes MANIFEST if $MANIFEST is 1 |
| 30 |
|
| 31 |
=item requires_version |
| 32 |
|
| 33 |
requires_version is there for future usage for requiring certain versions of the script |
| 34 |
|
| 35 |
=back |
| 36 |
|
| 37 |
=head1 VARIABLES |
| 38 |
|
| 39 |
=over 4 |
| 40 |
|
| 41 |
=item SUFFIX |
| 42 |
|
| 43 |
defaults to +dfsg |
| 44 |
|
| 45 |
what to append to the upstream version |
| 46 |
|
| 47 |
=item RM_OPTS |
| 48 |
|
| 49 |
defaults to -vrf |
| 50 |
|
| 51 |
options to pass to rm |
| 52 |
|
| 53 |
=item MANIFEST |
| 54 |
|
| 55 |
defaults to 0, set to 1 to turn on. |
| 56 |
|
| 57 |
this will manipulate MANIFEST files in CPAN tarballs. |
| 58 |
|
| 59 |
=item UP_BASE |
| 60 |
|
| 61 |
this is the directory where the upstream source is. |
| 62 |
|
| 63 |
=back |
| 64 |
|
| 65 |
=head1 COPYRIGHT AND LICENSE |
| 66 |
|
| 67 |
Copyright 2009, Ryan Niebur <[email protected]> |
| 68 |
|
| 69 |
This program is free software; you can redistribute it and/or modify it |
| 70 |
under the same terms as Perl itself. |
| 71 |
|
| 72 |
=cut |
| 73 |
|
| 74 |
if [ -z "$REPACK_SH" ]; then |
| 75 |
if [ -x /usr/share/pkg-perl-tools/repack.sh ]; then |
| 76 |
REPACK_SH='/usr/share/pkg-perl-tools/repack.sh' |
| 77 |
elif [ -f ../../scripts/repack.sh ]; then |
| 78 |
REPACK_SH=../../scripts/repack.sh |
| 79 |
fi |
| 80 |
if [ -z "$REPACK_SH" ] && which repack.sh > /dev/null; then |
| 81 |
REPACK_SH=$(which repack.sh) |
| 82 |
fi |
| 83 |
fi |
| 84 |
|
| 85 |
if [ ! -f "$REPACK_SH" ]; then |
| 86 |
echo "Couldn't find a repack.sh. please put it in your PATH, put it at ../../scripts/repack.sh, or put it somewhere else and set the REPACK_SH variable" |
| 87 |
echo "You can get it from https://anonscm.debian.org/cgit/pkg-perl/packages/pkg-perl-tools.git/plain/scripts/repack.sh" |
| 88 |
exit 1 |
| 89 |
fi |
| 90 |
|
| 91 |
exec "$REPACK_SH" "$@" |