improve weavetools build

- use the more idiomatic `configure --disable-shared && make` instead
  of `configure && make LDFLAGS=-static`. This only works for
  libtool-based builds, so not ethtool.
- check that we really have built static executables
This commit is contained in:
Matthias Radestock committed 2015-01-18 18:27:30 +00:00
1 parent 719efd0ac4
commit ebe48f5e58
1 file changed
+14 -6
+14 -6
View File
@@ -7,6 +7,14 @@ apt-get -y install curl make pkg-config gcc bison flex
BASEDIR=$(dirname $0)
mkdir -p "$BASEDIR"/bin
copy_exe() {
if ldd $1 >/dev/null 2>&1 ; then
echo "ERROR: $1 was not linked statically." 2>&1
exit 1
fi
cp $1 "$BASEDIR"/bin/
}
# ethtool
ETHTOOL=ethtool-3.16
@@ -14,8 +22,8 @@ ETHTOOL=ethtool-3.16
rm -rf $ETHTOOL
curl -s -S https://www.kernel.org/pub/software/network/ethtool/$ETHTOOL.tar.gz | tar xvz
(cd $ETHTOOL; ./configure LDFLAGS=-static; make)
cp $ETHTOOL/ethtool "$BASEDIR"/bin/
(cd $ETHTOOL; ./configure LDFLAGS=-static && make)
copy_exe $ETHTOOL/ethtool
# conntrack
@@ -30,12 +38,12 @@ fetch() {
for PACKAGE in $PACKAGES; do
fetch $PACKAGE
(cd $PACKAGE; ./configure && make LDFLAGS=-static install)
(cd $PACKAGE; ./configure --disable-shared && make install)
done
fetch $CONNTRACK
(cd $CONNTRACK; ./configure && make LDFLAGS=-static && rm -f src/conntrack && make LDFLAGS=-all-static)
cp $CONNTRACK/src/conntrack "$BASEDIR"/bin/
(cd $CONNTRACK; ./configure --disable-shared && make && rm -f src/conntrack && make LDFLAGS=-all-static)
copy_exe $CONNTRACK/src/conntrack
# curl
@@ -45,7 +53,7 @@ rm -rf $CURL
curl -s -S http://curl.haxx.se/download/$CURL.tar.gz | tar xvz
(cd $CURL; ./configure --without-ssl --disable-shared && make && rm src/curl && make LDFLAGS=-all-static)
cp $CURL/src/curl "$BASEDIR"/bin/
copy_exe $CURL/src/curl
#