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
cd -
}
function libmagic
{
SITE="ftp://ftp.astron.com/pub/file/"
VERSION="5.11"
OUTFILE="file-$VERSION.tar.gz"
URL="$SITE$OUTFILE"
echo "Downloading '$URL'..."
wget "$URL"
if [ -e "$OUTFILE" ]
then
echo "Installing libmagic / python-magic..."
tar -zxvf "$OUTFILE"
cd "file-$VERSION" && ./configure && make && $SUDO make install && cd python && $SUDO python ./setup.py install && cd ../..
$SUDO rm -rf "file-$VERSION" "$OUTFILE"
else
echo "ERROR: Failed to download '$URL'!"
echo "libmagic not installed."
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 libmagic
#{
# SITE="ftp://ftp.astron.com/pub/file/"
# VERSION="5.11"
# OUTFILE="file-$VERSION.tar.gz"
# URL="$SITE$OUTFILE"
#
# echo "Downloading '$URL'..."
# wget "$URL"
#
# if [ -e "$OUTFILE" ]
# then
# echo "Installing libmagic / python-magic..."
# tar -zxvf "$OUTFILE"
# cd "file-$VERSION" && ./configure && make && $SUDO make install && cd python && $SUDO python ./setup.py install && cd ../..
# $SUDO rm -rf "file-$VERSION" "$OUTFILE"
# else
# echo "ERROR: Failed to download '$URL'!"
# echo "libmagic not installed."
# fi
#}
function pyqtgraph
{
......@@ -186,27 +176,18 @@ case $DISTRO in
exit 1
esac
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" ]
#if [ "$(python -c 'import magic; print (magic.MAGIC_NO_CHECK_TEXT)' 2>/dev/null)" == "" ]
#then
# echo "libfuzzy not installed; building from source..."
# libfuzzy
# echo "python-magic not installed, or wrong version; building from source..."
# libmagic
#fi
# Get and build the firmware mod kit
fmk
# Install binwalk
$SUDO python setup.py install
if [ "$(python -c 'import pyqtgraph; print (pyqtgraph.__file__)' 2>/dev/null)" == "" ]
then
echo "pyqtgraph not installed; building from source..."
pyqtgraph
fi
......@@ -7,7 +7,9 @@ export exec_prefix=@exec_prefix@
export LIBDIR=@libdir@
export INSTALL_OPTIONS=@INSTALL_OPTIONS@
all: clean
.PHONY: all install clean distclean
all:
make -C miniz
make -C compress
make -C fuzzy
......@@ -17,8 +19,6 @@ install:
make -C compress install
make -C fuzzy install
.PHONY: clean distclean
clean:
make -C miniz 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