Fix static linux packaging
parent
bbae6e7674
commit
b4d56be43a
|
@ -47,7 +47,26 @@ PKG_ROOT="/pkg/$ARCHIVE_ROOT_NAME"
|
|||
mkdir -p /ibin
|
||||
(cd /ibin && tar xzf /influxdb-bin.tar.gz)
|
||||
|
||||
if [ "$OS" == "linux" ] || [ "$OS" == "darwin" ]; then
|
||||
if [ "$OS" == "linux" ] && [ "$STATIC" == "1" ]; then
|
||||
# Static linux packages get only the binaries and the conf file in the root directory,
|
||||
# plus the man pages in the full path.
|
||||
rm -rf "$PKG_ROOT"
|
||||
mkdir -p "$PKG_ROOT"
|
||||
|
||||
cp /ibin/* "$PKG_ROOT/"
|
||||
cp /isrc/etc/config.sample.toml "$PKG_ROOT/influxdb.conf"
|
||||
|
||||
mkdir -p "$PKG_ROOT/usr/share/man/man1"
|
||||
cp /isrc/man/*.1.gz "$PKG_ROOT/usr/share/man/man1"
|
||||
|
||||
# Creating tarball from /pkg, NOT from $PKG_ROOT, so that influxdb-$VERSION-1 directory is present in archive.
|
||||
(cd /pkg && tar czf "/out/influxdb-${VERSION}-static_${OS}_${ARCH}.tar.gz" ./*)
|
||||
|
||||
(cd /out && for f in *.tar.gz; do
|
||||
md5sum "$f" > "$f.md5"
|
||||
sha256sum "$f" > "$f.sha256"
|
||||
done)
|
||||
elif [ "$OS" == "linux" ] || [ "$OS" == "darwin" ]; then
|
||||
#############################
|
||||
####### Data packages #######
|
||||
#############################
|
||||
|
@ -91,8 +110,7 @@ if [ "$OS" == "linux" ] || [ "$OS" == "darwin" ]; then
|
|||
# Creating tarball from /pkg, NOT from $PKG_ROOT, so that influxdb-$VERSION-1 directory is present in archive.
|
||||
(cd /pkg && tar czf $BIN_GZ_NAME ./*)
|
||||
|
||||
# don't need static install packages.
|
||||
if [ "$OS" == "linux" ] && [ "$STATIC" != "1" ]; then
|
||||
if [ "$OS" == "linux" ] ; then
|
||||
# Call fpm to build .deb and .rpm packages.
|
||||
for typeargs in "-t deb" "-t rpm --depends coreutils --depends shadow-utils"; do
|
||||
FPM_NAME=$(
|
||||
|
|
Loading…
Reference in New Issue