mirror of
https://github.com/Cacti/spine.git
synced 2026-10-23 03:27:10 +09:00
Fixes #441 Updates copyright headers from 2004-2023/2024 to 2004-2026 across 12 source files. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
100 lines
3.8 KiB
Bash
Executable File
100 lines
3.8 KiB
Bash
Executable File
#!/bin/sh
|
|
# +-------------------------------------------------------------------------+
|
|
# | Copyright (C) 2004-2026 The Cacti Group |
|
|
# | |
|
|
# | This program is free software; you can redistribute it and/or |
|
|
# | modify it under the terms of the GNU General Public License |
|
|
# | as published by the Free Software Foundation; either version 2 |
|
|
# | of the License, or (at your option) any later version. |
|
|
# | |
|
|
# | This program is distributed in the hope that it will be useful, |
|
|
# | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
# | GNU General Public License for more details. |
|
|
# +-------------------------------------------------------------------------+
|
|
# | Cacti: The Complete RRDtool-based Graphing Solution |
|
|
# +-------------------------------------------------------------------------+
|
|
# | This code is designed, written, and maintained by the Cacti Group. See |
|
|
# | about.php and/or the AUTHORS file for specific developer information. |
|
|
# +-------------------------------------------------------------------------+
|
|
# | http://www.cacti.net/ |
|
|
# +-------------------------------------------------------------------------+
|
|
|
|
#
|
|
# ----------------------------------------------------------
|
|
# Name: bootstrap
|
|
#
|
|
# Function: build spine from scratch
|
|
#
|
|
# Description: This script will take a vanilla Spine source
|
|
# package and attempt to compile it. It will
|
|
# attempt to handle nasty things like dos2unix
|
|
# issues in all files and searching for the
|
|
# presence of required modules.
|
|
#
|
|
# It is not a replacement for the auto tools,
|
|
# but simply a supplement.
|
|
#
|
|
# ----------------------------------------------------------
|
|
|
|
# Help function
|
|
display_help () {
|
|
echo "--------------------------------------------------------------"
|
|
echo "Spine bootstrap script"
|
|
echo " Attempts to configure spine based on a 'normal' system. If you"
|
|
echo " install things in non-common locations you may have to use"
|
|
echo " the install instructions to build."
|
|
echo "--------------------------------------------------------------"
|
|
echo
|
|
}
|
|
|
|
# Check for parameters
|
|
if [ "${1}" = "--help" -o "${1}" = "-h" ]; then
|
|
display_help
|
|
exit 0
|
|
fi
|
|
|
|
echo "INFO: Starting Spine build process"
|
|
|
|
# Remove software build specific directories
|
|
echo "INFO: Removing cache directories"
|
|
rm -rf autom4te.cache .deps
|
|
|
|
# Make sure all files are unix formatted files
|
|
which dos2unix > /dev/null 2>&1
|
|
if [ $? -eq 0 ]; then
|
|
for e in $(echo "ac am c h in md mdlrc rb sh yml"); do
|
|
echo "INFO: Ensuring UNIX format for *.$e"
|
|
find . -type f -name \*.$e -exec dos2unix --d2u \{\} \; > /dev/null 2>&1
|
|
done
|
|
fi
|
|
|
|
# Prepare a build state
|
|
echo "INFO: Running auto-tools to verify buildability"
|
|
aclocal --install
|
|
libtoolize
|
|
autoheader
|
|
automake --add-missing
|
|
autoreconf --force --install
|
|
[ $? -ne 0 ] && echo "ERROR: 'autoreconf' exited with errors" && exit -1
|
|
|
|
|
|
# Provide some meaningful notes
|
|
echo "INFO: Spine bootstrap process completed"
|
|
echo ""
|
|
echo " These instructions assume the default install location for spine"
|
|
echo " of /usr/local/spine. If you choose to use another prefix, make"
|
|
echo " sure you update the commands as required for that new path."
|
|
echo ""
|
|
echo " To compile and install Spine using MySQL or MariaDB"
|
|
echo " please do the following:"
|
|
echo ""
|
|
echo " ./configure"
|
|
echo " make"
|
|
echo " make install"
|
|
echo " chown root:root /usr/local/spine/bin/spine"
|
|
echo " chmod +s /usr/local/spine/bin/spine"
|
|
echo ""
|
|
|
|
exit 0
|