forked from acassen/keepalived
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcloudwan-build.sh
More file actions
executable file
·47 lines (43 loc) · 1.05 KB
/
cloudwan-build.sh
File metadata and controls
executable file
·47 lines (43 loc) · 1.05 KB
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
#!/bin/sh
PACKAGE=`pwd`
PACKAGE=`basename $PACKAGE`
VERSION=1.0-1
PKGDIR=${PACKAGE}_${VERSION}
if [ -z $PACKAGE_COMMIT ]; then
PACKAGE_COMMIT=`git rev-parse HEAD`
fi
if [ ! -f /usr/bin/automake ]; then
echo "Error: no automake. Run: sudo apt-get install -y automake" 1>&2
exit 1
fi
if [ ! -f Makefile.in ]; then
./build_setup
./configure
fi
make
for dir in out deb
do
mkdir -p $dir || exit 1
cd $dir
done
mkdir -p $PKGDIR || exit 1
mkdir -p $PKGDIR/DEBIAN || exit 1
mkdir -p $PKGDIR/etc || exit 1
mkdir -p $PKGDIR/etc/keepalived || exit 1
mkdir -p $PKGDIR/usr || exit 1
mkdir -p $PKGDIR/usr/sbin || exit 1
if [ ! -f $PKGDIR/usr/sbin/keepalived ]; then
ln ../../bin/keepalived $PKGDIR/usr/sbin
fi
cat <<EOF > $PKGDIR/DEBIAN/control
Package: esi-keepalived
Version: $VERSION
Section: base
Priority: required
Architecture: amd64
Maintainer: NTT Innovation Institute, Inc. <support@ntti3.com>
Description: esi-keepalived
Keepalived 2.0.7 modified for ESI
Commit: $PACKAGE_COMMIT
EOF
dpkg-deb --build $PKGDIR