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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
#!/bin/sh
set -e
PERL5LIB="$DESTDIR/usr/share/perl5/"
ROOT=$PWD
export PERL5LIB
echo "=========================================================================="
echo "Make $1"
echo "PERL5LIB = $PERL5LIB"
echo "DESTDIR = $DESTDIR"
echo "=========================================================================="
#--- unpacking tar.gz in proper folders
if [ "$1" = "unpack" ]; then
test -d build-area || mkdir build-area
cd tarballs
for dir in *
do
if [ -d $dir ]; then
cd $dir
for file in *.tar.gz
do
test -d ../../build-area/$dir || mkdir ../../build-area/$dir
tar -C ../../build-area/$dir -xzf $file
done
cd ..
fi
done
cd ..
fi
if [ "$1" = patch -o "$1" = unpatch ]; then
if [ "$1" = patch ]; then
action=push
else
action=pop
fi
for dir in build-area/*
do
[ -d $dir ] || continue
cd $dir
for module in *
do
name=$(echo $module | sed 's,-[^-]*$,,')
[ -d $ROOT/debian/patches/$name ] || continue
echo "Applying patches for $name:"
cd $module
[ -h patches ] || ln -s ../../../debian/patches/$name patches
QUILT_PATCHES=patches quilt --quiltrc /dev/null $action -a || test $? = 2
cd ..
done
cd ../..
done
fi
if [ "$1" = "build" ]; then
cd build-area
for dir in *
do
if [ -d $dir ]; then
cd $dir
for module in *
do
cd ../..
set -e
d=build-area/$dir/$module
dh_auto_configure -D $d
dh_auto_build -D $d
dh_auto_test -D $d
dh_auto_install -D $d
set +e
cd build-area/$dir
done
cd ..
fi
done
cd ..
fi
|