summaryrefslogtreecommitdiff
path: root/packages/wide-dhcpv6/build-wide.sh
blob: 9476c272ee363ae23e7b3607b97736a3d6e0fdf5 (plain)
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
#!/bin/sh
CWD=$(pwd)
set -e

WIDE_SRC=wide-dhcpv6

if [ ! -d ${WIDE_SRC} ]; then
    echo "Source directory does not exists, please 'git clone'"
    exit 1
fi


PATCH_DIR=${CWD}/patches
if [ -d $PATCH_DIR ]; then
    for patch in $(ls ${PATCH_DIR})
    do
        echo "I: Apply patch: ${patch} to main repository"
        cp ${PATCH_DIR}/${patch} ${WIDE_SRC}/debian/patches/
        echo ${patch} >> ${WIDE_SRC}/debian/patches/series
    done
fi

cd ${WIDE_SRC}

echo "I: Apply workaround for cfparse.y make target"
rm y.tab.h

echo "I: Build Debian Package"
dpkg-buildpackage -uc -us -tc -b