Commit 2d653a91 by devttys0

Updating build/install tools

parent d3a03b2d
PYTHON="python"
SRC_C_DIR="./src/C"
.PHONY: all install build dependencies clean uninstall
all: install
install: build
make -c $(SRC_C_DIR) install
$(PYTHON) ./setup.py install
build:
make -C $(SRC_C_DIR)
$(PYTHON) ./setup.py build
dependencies:
./deps.sh
clean:
make -C $(SRC_C_DIR) clean
$(PYTHON) ./setup.py clean
distclean: clean
make -C $(SRC_C_DIR) distclean
rm -f Makefile
uninstall:
make -C $(SRC_C_DIR) uninstall
$(PYTHON) ./setup.py uninstall
#!/bin/sh
cd ./src/C/ && ./configure && cd - && cp Makefile.in Makefile
...@@ -35,37 +35,27 @@ function fmk ...@@ -35,37 +35,27 @@ function fmk
cd - cd -
} }
function libmagic #function libmagic
{ #{
SITE="ftp://ftp.astron.com/pub/file/" # SITE="ftp://ftp.astron.com/pub/file/"
VERSION="5.11" # VERSION="5.11"
OUTFILE="file-$VERSION.tar.gz" # OUTFILE="file-$VERSION.tar.gz"
URL="$SITE$OUTFILE" # URL="$SITE$OUTFILE"
#
echo "Downloading '$URL'..." # echo "Downloading '$URL'..."
wget "$URL" # wget "$URL"
#
if [ -e "$OUTFILE" ] # if [ -e "$OUTFILE" ]
then # then
echo "Installing libmagic / python-magic..." # echo "Installing libmagic / python-magic..."
tar -zxvf "$OUTFILE" # tar -zxvf "$OUTFILE"
cd "file-$VERSION" && ./configure && make && $SUDO make install && cd python && $SUDO python ./setup.py install && cd ../.. # cd "file-$VERSION" && ./configure && make && $SUDO make install && cd python && $SUDO python ./setup.py install && cd ../..
$SUDO rm -rf "file-$VERSION" "$OUTFILE" # $SUDO rm -rf "file-$VERSION" "$OUTFILE"
else # else
echo "ERROR: Failed to download '$URL'!" # echo "ERROR: Failed to download '$URL'!"
echo "libmagic not installed." # echo "libmagic not installed."
fi # fi
} #}
function libfuzzy
{
VERSION="ssdeep-2.10"
cd ./C
tar -zxvf $VERSION.tar.gz && cd $VERSION && ./configure && make && $SUDO make install
cd ..
rm -rf $VERSION
cd ..
}
function pyqtgraph function pyqtgraph
{ {
...@@ -186,27 +176,18 @@ case $DISTRO in ...@@ -186,27 +176,18 @@ case $DISTRO in
exit 1 exit 1
esac esac
if [ "$(python -c 'import magic; print (magic.MAGIC_NO_CHECK_TEXT)' 2>/dev/null)" == "" ] #if [ "$(python -c 'import magic; print (magic.MAGIC_NO_CHECK_TEXT)' 2>/dev/null)" == "" ]
then
echo "python-magic not installed, or wrong version; building from source..."
libmagic
fi
if [ "$(python -c 'import pyqtgraph; print (pyqtgraph.__file__)' 2>/dev/null)" == "" ]
then
echo "pyqtgraph not installed; building from source..."
pyqtgraph
fi
#if [ "$(python -c 'import ctypes.util; print (ctypes.util.find_library("fuzzy"))')" == "None" ]
#then #then
# echo "libfuzzy not installed; building from source..." # echo "python-magic not installed, or wrong version; building from source..."
# libfuzzy # libmagic
#fi #fi
# Get and build the firmware mod kit # Get and build the firmware mod kit
fmk fmk
# Install binwalk if [ "$(python -c 'import pyqtgraph; print (pyqtgraph.__file__)' 2>/dev/null)" == "" ]
$SUDO python setup.py install then
echo "pyqtgraph not installed; building from source..."
pyqtgraph
fi
...@@ -7,7 +7,9 @@ export exec_prefix=@exec_prefix@ ...@@ -7,7 +7,9 @@ export exec_prefix=@exec_prefix@
export LIBDIR=@libdir@ export LIBDIR=@libdir@
export INSTALL_OPTIONS=@INSTALL_OPTIONS@ export INSTALL_OPTIONS=@INSTALL_OPTIONS@
all: clean .PHONY: all install clean distclean
all:
make -C miniz make -C miniz
make -C compress make -C compress
make -C fuzzy make -C fuzzy
...@@ -17,8 +19,6 @@ install: ...@@ -17,8 +19,6 @@ install:
make -C compress install make -C compress install
make -C fuzzy install make -C fuzzy install
.PHONY: clean distclean
clean: clean:
make -C miniz clean make -C miniz clean
make -C compress clean make -C compress clean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment