gentoo-overlay/app-backup/duplicati/files/duplicati-2.0.1.11.20160408-fix-Makefile.patch

60 lines
2.8 KiB
Diff

diff --git a/Installer/Makefile/Makefile b/Installer/Makefile/Makefile
index ecbb9af..09c7feb 100644
--- a/Installer/Makefile/Makefile
+++ b/Installer/Makefile/Makefile
@@ -2,7 +2,7 @@ BUILD_TOOL=xbuild
BUILD_ARGS=/property:Platform=Any\ CPU /property:Configuration=Release
OUTPUT_ARGS=/property:OutputPath=bin/Release
SOURCE_DIR=../../.
-PACKAGE_DIR=./pkg
+PACKAGE_DIR=${D}
PKG_TARGET=$(PACKAGE_DIR)/usr/lib/duplicati
LOCALIZATION_TOOL=mono $(SOURCE_DIR)/Duplicati/Localization/bin/Release/LocalizationTool.exe
@@ -13,10 +13,6 @@ build:
$(BUILD_TOOL) $(BUILD_ARGS) "$(SOURCE_DIR)/BuildTools/UpdateVersionStamp/UpdateVersionStamp.sln"
package: build
- if [ -e "$(PACKAGE_DIR)" ]; then \
- rm -rf "$(PACKAGE_DIR)"; \
- fi
- mkdir "$(PACKAGE_DIR)"
mkdir "$(PACKAGE_DIR)/usr"
mkdir "$(PACKAGE_DIR)/usr/lib"
mkdir "$(PACKAGE_DIR)/usr/bin"
@@ -35,12 +31,12 @@ package: build
rm -rf "$(PKG_TARGET)/AlphaVSS.Common.dll"
cp -R "$(SOURCE_DIR)/Duplicati/Server/webroot" "$(PACKAGE_DIR)/usr/lib/duplicati/"
- cp "$(SOURCE_DIR)/Installer/debian help/duplicati-launcher.sh" "$(PACKAGE_DIR)/usr/bin/duplicati"
- cp "$(SOURCE_DIR)/Installer/debian help/duplicati-commandline-launcher.sh" "$(PACKAGE_DIR)/usr/bin/duplicati-cli"
- cp "$(SOURCE_DIR)/Installer/debian help/duplicati-server-launcher.sh" "$(PACKAGE_DIR)/usr/bin/duplicati-server"
- cp "$(SOURCE_DIR)/Installer/debian help/duplicati.desktop" "$(PACKAGE_DIR)/usr/share/applications/"
- cp "$(SOURCE_DIR)/Installer/debian help/duplicati.xpm" "$(PACKAGE_DIR)/usr/share/pixmaps/"
- cp "$(SOURCE_DIR)/Installer/debian help/duplicati.png" "$(PACKAGE_DIR)/usr/share/pixmaps/"
+ cp "$(SOURCE_DIR)/Installer/debian/duplicati-launcher.sh" "$(PACKAGE_DIR)/usr/bin/duplicati"
+ cp "$(SOURCE_DIR)/Installer/debian/duplicati-commandline-launcher.sh" "$(PACKAGE_DIR)/usr/bin/duplicati-cli"
+ cp "$(SOURCE_DIR)/Installer/debian/duplicati-server-launcher.sh" "$(PACKAGE_DIR)/usr/bin/duplicati-server"
+ cp "$(SOURCE_DIR)/Installer/debian/duplicati.desktop" "$(PACKAGE_DIR)/usr/share/applications/"
+ cp "$(SOURCE_DIR)/Installer/debian/duplicati.xpm" "$(PACKAGE_DIR)/usr/share/pixmaps/"
+ cp "$(SOURCE_DIR)/Installer/debian/duplicati.png" "$(PACKAGE_DIR)/usr/share/pixmaps/"
# If we edit files, we sometimes get backup files included
find "$(PACKAGE_DIR)" -type f -name \*\~ -exec rm -rf '{}' \;
@@ -58,16 +54,6 @@ package: build
chmod +x "$(PACKAGE_DIR)/usr/bin/duplicati"
chmod +x "$(PACKAGE_DIR)/usr/bin/duplicati-cli"
-
- if [ -e "duplicati.tar" ]; then \
- rm -rf "duplicati.tar"; \
- fi
- if [ -e "duplicati.tar.gz" ]; then \
- rm -rf "duplicati.tar.gz"; \
- fi
-
- tar -C "$(PACKAGE_DIR)" -cf "duplicati.tar" .
- gzip --best "duplicati.tar"
clean:
(find "$(SOURCE_DIR)" -type d -name bin -exec rm -rf "{}" \; &> /dev/null) || echo "bin cleaned"