install pre-compiled tools to /usr/lib/ARCH/patchimage/

This commit is contained in:
Christopher Roy Bratusek 2016-08-06 11:03:39 +02:00
parent d9032f5107
commit 6f3d9763a5
5 changed files with 50 additions and 25 deletions

View File

@ -4,11 +4,27 @@ all:
install:
mkdir -p $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/usr/share/patchimage/
cp -rv data database override patches scripts tools $(DESTDIR)/usr/share/patchimage/
cp -rv data database patches scripts $(DESTDIR)/usr/share/patchimage/
install -m755 patchimage.sh $(DESTDIR)/usr/bin/patchimage
if [ $(shell uname -m) = x86_64 ]; then \
mkdir -p $(DESTDIR)/usr/lib/x86_64-linux-gnu/patchimage/tools ; \
mkdir -p $(DESTDIR)/usr/lib/x86_64-linux-gnu/patchimage/override ; \
cp -rv tools/*.64 tools/unp tools/ucat tools/gdown.pl tools/ignore_3dstool.txt \
$(DESTDIR)/usr/lib/x86_64-linux-gnu/patchimage/tools ; \
cp -rv override/linux64 $(DESTDIR)/usr/lib/x86_64-linux-gnu/patchimage/override ; \
else mkdir -p $(DESTDIR)/usr/lib/i386-linux-gnu/patchimage/tools ; \
mkdir -p $(DESTDIR)/usr/lib/i386-linux-gnu/patchimage/override ; \
cp -rv tools/*.32 tools/unp tools/ucat tools/gdown.pl tools/ignore_3dstool.txt \
$(DESTDIR)/usr/lib/i386-linux-gnu/patchimage/tools ; \
cp -rv override/linux32 $(DESTDIR)/usr/lib/i386-linux-gnu/patchimage/override ; \
fi
uninstall:
rm -rf $(DESTDIR)/usr/share/patchimage
rm -f $(DESTDIR)/usr/bin/patchimage
if [ $(shell uname -m) = x86_64 ]; then \
rm -rf $(DESTDIR)/usr/lib/x86_64-linux-gnu/patchimage ; \
else rm -rf $(DESTDIR)/usr/lib/i386-linux-gnu/patchimage ; \
fi
clean:

View File

@ -1,9 +1,13 @@
usr/share/patchimage/tools/3dstool.64
usr/share/patchimage/tools/applyppf3.64
usr/share/patchimage/tools/ctrtool.64
usr/share/patchimage/tools/titledumper.64
usr/share/patchimage/tools/uips.64
usr/share/patchimage/tools/wit.64
usr/share/patchimage/tools/wszst.64
usr/share/patchimage/tools/xdelta3.64
usr/share/patchimage/override/linux64
usr/lib/x86_64-linux-gnu/patchimage/tools/gdown.pl
usr/lib/x86_64-linux-gnu/patchimage/tools/ignore_3dstool.txt
usr/lib/x86_64-linux-gnu/patchimage/tools/ucat
usr/lib/x86_64-linux-gnu/patchimage/tools/unp
usr/lib/x86_64-linux-gnu/patchimage/tools/3dstool.64
usr/lib/x86_64-linux-gnu/patchimage/tools/applyppf3.64
usr/lib/x86_64-linux-gnu/patchimage/tools/ctrtool.64
usr/lib/x86_64-linux-gnu/patchimage/tools/titledumper.64
usr/lib/x86_64-linux-gnu/patchimage/tools/uips.64
usr/lib/x86_64-linux-gnu/patchimage/tools/wit.64
usr/lib/x86_64-linux-gnu/patchimage/tools/wszst.64
usr/lib/x86_64-linux-gnu/patchimage/tools/xdelta3.64
usr/lib/x86_64-linux-gnu/patchimage/override/linux64

View File

@ -1,9 +1,13 @@
usr/share/patchimage/tools/3dstool.32
usr/share/patchimage/tools/applyppf3.32
usr/share/patchimage/tools/ctrtool.32
usr/share/patchimage/tools/titledumper.32
usr/share/patchimage/tools/uips.32
usr/share/patchimage/tools/wit.32
usr/share/patchimage/tools/wszst.32
usr/share/patchimage/tools/xdelta3.32
usr/share/patchimage/override/linux32
usr/lib/i386-linux-gnu/patchimage/tools/gdown.pl
usr/lib/i386-linux-gnu/patchimage/tools/ignore_3dstool.txt
usr/lib/i386-linux-gnu/patchimage/tools/ucat
usr/lib/i386-linux-gnu/patchimage/tools/unp
usr/lib/i386-linux-gnu/patchimage/tools/3dstool.32
usr/lib/i386-linux-gnu/patchimage/tools/applyppf3.32
usr/lib/i386-linux-gnu/patchimage/tools/ctrtool.32
usr/lib/i386-linux-gnu/patchimage/tools/titledumper.32
usr/lib/i386-linux-gnu/patchimage/tools/uips.32
usr/lib/i386-linux-gnu/patchimage/tools/wit.32
usr/lib/i386-linux-gnu/patchimage/tools/wszst.32
usr/lib/i386-linux-gnu/patchimage/tools/xdelta3.32
usr/lib/i386-linux-gnu/patchimage/override/linux32

View File

@ -3,7 +3,3 @@ usr/share/patchimage/data
usr/share/patchimage/database
usr/share/patchimage/patches
usr/share/patchimage/scripts
usr/share/patchimage/tools/gdown.pl
usr/share/patchimage/tools/ignore_3dstool.txt
usr/share/patchimage/tools/ucat
usr/share/patchimage/tools/unp

View File

@ -22,8 +22,13 @@ else
export PATCHIMAGE_SCRIPT_DIR=/usr/share/patchimage/scripts
export PATCHIMAGE_PATCH_DIR=/usr/share/patchimage/patches
export PATCHIMAGE_DATA_DIR=/usr/share/patchimage/data
export PATCHIMAGE_TOOLS_DIR=/usr/share/patchimage/tools
export PATCHIMAGE_OVERRIDE_DIR=/usr/share/patchimage/override
if [[ $(uname -m) == "x86_64" ]]; then
export PATCHIMAGE_TOOLS_DIR=/usr/lib/x86_64-linux-gnu/patchimage/tools
export PATCHIMAGE_OVERRIDE_DIR=/usr/lib/x86_64-linux-gnu/patchimage/override
else
export PATCHIMAGE_TOOLS_DIR=/usr/lib/i386-linux-gnu/patchimage/tools
export PATCHIMAGE_OVERRIDE_DIR=/usr/lib/i386-linux-gnu/patchimage/override
fi
export PATCHIMAGE_DATABASE_DIR=/usr/share/patchimage/database
fi