From f80b741faeb1716f273443e75c55bc74c0f407e2 Mon Sep 17 00:00:00 2001 From: mazbrili Date: Wed, 17 Oct 2018 21:55:14 +0700 Subject: [PATCH] LuckyBackup: new recipe (#3183) --- .../additional-files/luckybackup.rdef.in | 36 +++++++ .../luckybackup/luckybackup-0.4.9.recipe | 99 +++++++++++++++++++ .../patches/luckybackup-0.4.9.patchset | 84 ++++++++++++++++ 3 files changed, 219 insertions(+) create mode 100644 app-backup/luckybackup/additional-files/luckybackup.rdef.in create mode 100644 app-backup/luckybackup/luckybackup-0.4.9.recipe create mode 100644 app-backup/luckybackup/patches/luckybackup-0.4.9.patchset diff --git a/app-backup/luckybackup/additional-files/luckybackup.rdef.in b/app-backup/luckybackup/additional-files/luckybackup.rdef.in new file mode 100644 index 000000000..a2ff93f08 --- /dev/null +++ b/app-backup/luckybackup/additional-files/luckybackup.rdef.in @@ -0,0 +1,36 @@ + +resource app_flags B_MULTIPLE_LAUNCH; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_FINAL, + internal = 0, + short_info = "LuckyBackup", + long_info = "@LONG_INFO@" +}; + +resource app_signature "@APP_SIGNATURE@"; + +resource file_types message { + "types" = "application/x-bak" +}; + +resource vector_icon { + $"6E636966080500040071020006043D88273D8827BED4133ED4134B1000C6104F" + $"411942E78597C3FFE1032288FF203BAC020006033B9EE13B9EE1BB9EE13B9EE1" + $"47C3854A3E7A0097C3FF3FE3ECFFFF3369FF020006023C3D533CC875BF1DC53E" + $"81FA4B2B164702C13A33A2FFD43369FF050005FF05FF050604EB4B2B512E4B2B" + $"524C49545D495D495C45020A524C5250524C5242524252BC5E4228C482B82BBE" + $"10B4F1BA33B62736262E2AB6CFB8BEB6CFB8BEB5EAB98F26BC8E26BADB26BC8E" + $"253D253D254031402E45BCE0BA943C3FBBCBBCACC084C20740493F48C3F9C78F" + $"0607FF3E524C5250524C5242524252BC5E4228C482B82BBE10B4F1BA33B62736" + $"262E2AB6CFB8BE3E3CBDE8BE5EBFFFBDF14A504A50534D0206382E382EC045BA" + $"6EC3B448C353BEF1C3B2BEC23A2CC151B9C33A2C3A2C3A2CBAAEB66FB71EB87E" + $"B85AB6D1B86EB788382EBA61B77B382E0209382E382EB89AB69726BC8E26B85F" + $"26BC8E253D253D25403042B809C16BBAECBF89343CBA36BFAB36383F443E3EBF" + $"CFC418474EC15CC5214D4FC3BE4AC3BE4A4ABF8E382EC085BA8F382E060A0101" + $"00000A0001011001178400040A020102000A040104000A030103000A070000" +}; diff --git a/app-backup/luckybackup/luckybackup-0.4.9.recipe b/app-backup/luckybackup/luckybackup-0.4.9.recipe new file mode 100644 index 000000000..e3da37b73 --- /dev/null +++ b/app-backup/luckybackup/luckybackup-0.4.9.recipe @@ -0,0 +1,99 @@ +SUMMARY="A powerful, fast and reliable backup & sync tool" +DESCRIPTION="An application that backs-up and/or synchronizes any directories \ +with the power of rsync. It is simple to use, fast (transfers over only \ +changes made and not all data), safe (keeps your data safe by checking all \ +declared directories before proceeding in any data manipulation), reliable and \ +fully customizable." +COPYRIGHT="2008-2017 Loukas Avgeriou" +LICENSE="GNU GPL v3" +REVISION="1" +HOMEPAGE="http://luckybackup.sourceforge.net" +SOURCE_URI="https://downloads.sourceforge.net/luckybackup/luckybackup-$portVersion.tar.gz" +CHECKSUM_SHA256="c161e98a11de5ad0a32a8e060e3fd45695a93ea3adf0581764a6b5d32e8da23b" +PATCHES="luckybackup-$portVersion.patchset" +ADDITIONAL_FILES="luckybackup.rdef.in" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +if [ "$targetArchitecture" = x86_gcc2 ]; then +SECONDARY_ARCHITECTURES="x86" +fi + +PROVIDES=" + luckybackup$secondaryArchSuffix = $portVersion + app:LuckyBackup = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Network$secondaryArchSuffix + lib:libQt5WebKit$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:librsync$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libGL$secondaryArchSuffix + devel:libQt5Core$secondaryArchSuffix + devel:libQt5Gui$secondaryArchSuffix + devel:libQt5Network$secondaryArchSuffix + devel:libQt5WebKit$secondaryArchSuffix + devel:libQt5Widgets$secondaryArchSuffix + devel:librsync$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:qmake$secondaryArchSuffix >= 5 + " + +PATCH() +{ + sed -i \ + -e "s|^\(documentation\.paff =\).*|\1 $docDir|" \ + -e "s|^\(documentation\.path =\).*|\1 $dataDir/luckybackup|" \ + -e "s|^\(translations\.path =\).*|\1 $dataDir/luckybackup|" \ + -e "s|^\(manpage\.path =\).*|\1 $manDir/man8|" \ + -e "s|^\(license\.path =\).*|\1 $dataDir/luckybackup|" \ + luckybackup.pro +} + +BUILD() +{ + qmake luckybackup.pro + make $jobArgs +} + +INSTALL() +{ + make install + install -d "$appsDir" + install -T luckybackup "$appsDir"/LuckyBackup + gunzip "$manDir"/man8/luckybackup.8.gz + sed -i -e 's|~/\.luckyBackup/|~/config/settings/LuckyBackup/|' \ + "$manDir"/man8/luckybackup.8 + + local APP_SIGNATURE="application/x-vnd.LuckyBackup" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" + local LONG_INFO="$SUMMARY" + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + "$portDir"/additional-files/luckybackup.rdef.in > luckybackup.rdef + + addResourcesToBinaries luckybackup.rdef "$appsDir"/LuckyBackup + addAppDeskbarSymlink "$appsDir"/LuckyBackup +} diff --git a/app-backup/luckybackup/patches/luckybackup-0.4.9.patchset b/app-backup/luckybackup/patches/luckybackup-0.4.9.patchset new file mode 100644 index 000000000..c56310fce --- /dev/null +++ b/app-backup/luckybackup/patches/luckybackup-0.4.9.patchset @@ -0,0 +1,84 @@ +From ab3fd8dfc57e6240ffcba7605a6c9602125b00cb Mon Sep 17 00:00:00 2001 +From: mazbrili +Date: Fri, 5 Oct 2018 09:28:19 +0700 +Subject: set current dir to application dir + + +diff --git a/src/main.cpp b/src/main.cpp +index 935603e..4f66bba 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -33,6 +33,9 @@ + + #include + #include ++#ifdef Q_OS_HAIKU ++#include ++#endif + + #include "luckybackupwindow.h" + #include "global.h" +@@ -52,6 +55,10 @@ int main(int argc, char *argv[]) + { + QScopedPointer app(createApplication(argc, argv)); + ++#ifdef Q_OS_HAIKU ++ QDir::setCurrent(QCoreApplication::applicationDirPath()); ++#endif ++ + //arguments test + if (!argumentsTest(argc,argv)) + return 1; // error code1: something wrong with the command arguments - app fail to start (or just --help or --version given as args) +-- +2.19.0 + + +From 8ea9eea609a179dfe67852cfab86250d10142f83 Mon Sep 17 00:00:00 2001 +From: fbrosson +Date: Wed, 17 Oct 2018 14:23:21 +0000 +Subject: hardcode paths for Haiku + + +diff --git a/src/global.cpp b/src/global.cpp +index 1efe3ed..3e0cb0f 100644 +--- a/src/global.cpp ++++ b/src/global.cpp +@@ -52,8 +52,8 @@ QString appVersionString = "0.4.9"; + double const validProfileVersion = 0.21; + double const validScheduleVersion = 0.34; + double const validSettingsVersion = 0.3; +-QString luckyBackupDir = myHome + "/."+appName+"/"; +-QString luckyBackupDefaultDir = myHome + "/."+appName+"/"; ++QString luckyBackupDir = myHome + "/config/settings/LuckyBackup/"; ++QString luckyBackupDefaultDir = myHome + "/config/settings/LuckyBackup/"; + QString settingsFile = luckyBackupDir + "settings.ini"; + QString profileDir = luckyBackupDir + "profiles/"; + QString defaultProfile = profileDir + "default.profile"; +@@ -71,18 +71,18 @@ QString snapChangesString = "[changed_data]%i[LB]%n"; + QString scheduleDir = luckyBackupDir + "schedule/"; + QString schedulefilename = scheduleDir + "schedule.dat"; + QString cronfilename = scheduleDir + "luckyCron.txt"; +-QString relativeTransDir = "translations/"; +-QString systemTransDir = "/usr/share/luckybackup/translations/"; ++QString relativeTransDir = "../data/luckybackup/translations/"; ++QString systemTransDir = "/boot/system/data/luckybackup/translations/"; + QDir transDir; + QTranslator appTranslator; + QTranslator translator_qt; + QString locale = QLocale::system().name(); +-QString relativeLicense = "license/gpl.html"; +-QString systemLicense = "/usr/share/doc/luckybackup/license/gpl.html"; ++QString relativeLicense = "../data/luckybackup/license/gpl.html"; ++QString systemLicense = "/boot/system/data/luckybackup/license/gpl.html"; + QString suseLicense = "/usr/share/doc/packages/luckybackup/license/gpl.html"; + QString debianLicense = "/usr/share/common-licenses/GPL-3"; +-QString relativeManual = "manual/index.html"; +-QString systemManual = "/usr/share/doc/luckybackup/manual/index.html"; ++QString relativeManual = "../data/luckybackup/manual/index.html"; ++QString systemManual = "/boot/system/data/luckybackup/manual/index.html"; + QString suseManual = "/usr/share/doc/packages/luckybackup/manual/index.html"; + + QString countStr; +-- +2.19.1 +