diff --git a/app-traefik-source/.gitignore b/app-traefik-source/.gitignore new file mode 100644 index 00000000..3a2ad375 --- /dev/null +++ b/app-traefik-source/.gitignore @@ -0,0 +1,2 @@ + +traefik* diff --git a/app-traefik-source/README.md b/app-traefik-source/README.md new file mode 100644 index 00000000..14c2c145 --- /dev/null +++ b/app-traefik-source/README.md @@ -0,0 +1,11 @@ +# Build Script + +This build script downloads the latest version of traefik form the +corresponding github releases page. To modify the installation version change +the `version` variable in the `build.sh`. + +# Requirements + +*Not installed by the build script.* + +* golang: 1.20.6 diff --git a/app-traefik-source/build.sh b/app-traefik-source/build.sh new file mode 100755 index 00000000..bc5e8f8d --- /dev/null +++ b/app-traefik-source/build.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +version=v2.10.3 +name=traefik +appname=${name}-${version} +tarball=${appname}.src.tar.gz + +extract=../extract.sh + +echo "Cleaning artefacts ..." +rm -rf ${tarball} ${appname} ${name} + +echo -n "Downloading ${tarball} ... " +wget -q https://github.com/traefik/traefik/releases/download/${version}/${tarball} +echo "" + +echo -n "Unpacking traefik ... " +mkdir -p ./$appname +tar xzf $tarball -C ./$appname +echo "" + +echo -n "Setting up GO env ... " +export GOPATH=~/go +export PATH=$PATH:$GOPATH/bin +echo "" + +echo -n "Building traefik ... " +make clean-webui -C ${appname} +echo "" + +pushd ${appname} + +echo "${appname}: Running GO get ..." +go get && +go mod tidy && +go generate && +go build -ldflags "-linkmode 'external' -extldflags '-pie'" -buildmode=pie \ + ./cmd/traefik + +popd +0 + +if test -f ${appname}/${name}; then + ln -s ${appname}/${name} ./${name} +fi + +echo "Extracting dependencies ..." +$extract ./${name} + +echo "Done" diff --git a/app-traefik-source/lib64/ld-linux-x86-64.so.2 b/app-traefik-source/lib64/ld-linux-x86-64.so.2 new file mode 100755 index 00000000..0d457188 Binary files /dev/null and b/app-traefik-source/lib64/ld-linux-x86-64.so.2 differ diff --git a/app-traefik-source/usr/lib/libc.so.6 b/app-traefik-source/usr/lib/libc.so.6 new file mode 100755 index 00000000..c9092ea2 Binary files /dev/null and b/app-traefik-source/usr/lib/libc.so.6 differ diff --git a/app-traefik-source/usr/lib/libresolv.so.2 b/app-traefik-source/usr/lib/libresolv.so.2 new file mode 100755 index 00000000..18ec9913 Binary files /dev/null and b/app-traefik-source/usr/lib/libresolv.so.2 differ diff --git a/app-traefik-source/usr/lib64/ld-linux-x86-64.so.2 b/app-traefik-source/usr/lib64/ld-linux-x86-64.so.2 new file mode 100755 index 00000000..0d457188 Binary files /dev/null and b/app-traefik-source/usr/lib64/ld-linux-x86-64.so.2 differ