summaryrefslogtreecommitdiff
path: root/pcr/freefilesync/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/freefilesync/PKGBUILD')
-rw-r--r--pcr/freefilesync/PKGBUILD146
1 files changed, 86 insertions, 60 deletions
diff --git a/pcr/freefilesync/PKGBUILD b/pcr/freefilesync/PKGBUILD
index d32ee9be9..f62c7a02d 100644
--- a/pcr/freefilesync/PKGBUILD
+++ b/pcr/freefilesync/PKGBUILD
@@ -1,90 +1,116 @@
-
-# Contributor (Arch): chenxing <cxcxcxcx AT gmail DOT com>
-# Contributor (Arch): Michael Burkhard <Michael DOT Burkhard AT web DOT de>
-# Maintainer (Arch): alexmo82 <25396682 AT live DOT it>
+# Contributor (aur): chenxing <cxcxcxcx AT gmail DOT com>
+# Contributor (aur): Michael Burkhard <Michael DOT Burkhard AT web DOT de>
+# Contributor (aur): alexmo82 <25396682 AT live DOT it>
+# Contributor (aur): Simon Brulhart <simon@brulhart.me>
+# Maintainer (aur): jooch <jooch AT gmx DOT com>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+# Contributor: bill-auger <bill-auger@programmer.net>
+
+# NOTE: this PKGBUILD requires 'wget' to be available to the build host
+# the upstream file server is wonky - very inconsistent results with curl
pkgname=freefilesync
-pkgver=10.2
+pkgver=11.4
pkgrel=1
pkgdesc="Backup software to synchronize files and folders"
-arch=('i686' 'x86_64' 'armv7h')
-url="http://www.freefilesync.org/"
-license=('GPLv3')
-depends=(wxgtk webkit2gtk boost-libs)
-makedepends=(boost)
+arch=('i686' 'x86_64')
+arch+=('armv7h')
+url="https://freefilesync.org"
+license=('GPL3')
+depends=(wxgtk2 curl lsb-release)
+makedepends=(unzip)
source=(
- "FreeFileSync_${pkgver}_Source.zip::https://www.freefilesync.org/download_redirect.php?file=FreeFileSync_${pkgver}_Source.zip" #ffs
+ https://freefilesync.org/download/FreeFileSync_${pkgver}_Source.zip
+ reversions_11-1.patch
+ theme_fixes.patch
+ revert_xdg_config_path.patch
+ revert_bulk_append.patch
+ revert_linkflags.patch
FreeFileSync.desktop
- ffsicon.png
RealTimeSync.desktop
- rtsicon.png
- )
-
-sha256sums=(
- 'b7b072f6239529d0030d845b4b62463edf37910dda3e75cd9dd64f01da81b5b9' #ffs source
- 'b381bb9dbda25c3c08a67f18072a2761abe34339ddf3318e1758eb7c349f1a3b' #FreeFileSync.desktop
- '31df3fa1f1310de14bbd379f891d4f8ed2df5b0d68913eb52c88b3be682933fb' #ffsicon.png
- '1502efdbf1638856a18ab9916e0431bf6a53471792cb2daa380345bac33f67c4' #RealTimeSync.desktop
- 'f28042587dbe99cf5d6bef2c1be4b026488e418e4ba8332b3016d246b7053a4e' #rtsicon.png
- )
-
-DLAGENTS=('https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -A Mozilla -o %o %u')
+)
+source+=(disable-autoupdate.patch)
+sha256sums=('d0c20c1388024460944bb0871e91ce6dc9ac5c02be45a095f288db169eb844b4'
+ '6c2d7f24e4edc52bc1af95d3f48ef67456cde0b952b81a702901acfb36545999'
+ '4f2b1d46c0b754c668be7ec675a2bb09f72b3bd0e20987b4db61575b5ca1bf46'
+ '0f9a9a6b2c3c460bbde7425bd62273c925259db1cc9dc18c6013aae99fb15cd8'
+ '17e7db683662809882db6d6b3d855eb4372ca1bd05e15c4c490970a0b4b127c0'
+ 'c83475ef3ac8bd534d637062d516c9eeea54ac18c775be55e1adef413ac73063'
+ '590d87707240529ca893199f852143f5d7c7266cb050e37e615900b013ac3d51'
+ '82439b4b81b0a72652befad9b9db52ffbc0180f307c92205aa5ab344f9f82830')
+sha256sums+=(8dab1089d582058ccbbc8409961b73e5b4d5defe9c6526ee1880a5697449c53f)
+
+DLAGENTS=('https::/usr/bin/wget %u')
prepare() {
-# wxgtk < 3.1.0
- sed -i 's/m_listBoxHistory->GetTopItem()/0/g' FreeFileSync/Source/ui/main_dlg.cpp
+ # wxgtk < 3.1.0
+ # Revert to classic config path
+ patch -p1 -i revert_xdg_config_path.patch
-# gcc 6.3.1
- sed -i 's!static_assert!//static_assert!' zen/scope_guard.h
+ # Avoid uses of wxItemContainer::Append(const std::vector<wxString>& items)
+ patch -p1 -i revert_bulk_append.patch
-# warn_static(string)
- sed -i 's!-O3 -DN!-D"warn_static(arg)= " -O3 -DN!' FreeFileSync/Source/Makefile
- sed -i 's!-O3 -DN!-D"warn_static(arg)= " -O3 -DN!' FreeFileSync/Source/RealTimeSync/Makefile
+ # edit lines to remove functions that require wxgtk 3.1.x
+ sed -e 's:m_textCtrlOfflineActivationKey->ForceUpper:// &:g' -i 'FreeFileSync/Source/ui/small_dlgs.cpp'
+ sed -e 's:const double scrollSpeed =:& 6; //:g' -i 'wx+/grid.cpp'
-# linker error
- sed -i 's#inline##g' FreeFileSync/Source/ui/version_check_impl.h
+ patch -p1 -i reversions_11-1.patch
+ grep -RiIl 'wxASCII_STR' | xargs sed -e 's/wxASCII_STR/wxString::FromAscii/g' -i
+ grep -RiIl 'wxDD_SHOW_HIDDEN' | xargs sed -e 's/, wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN//g' -i
-# install error
- cp ${srcdir}/Changelog.txt ${srcdir}/FreeFileSync/Build
+ # undo zenju hacks
+ sed -e '71,77d' -i 'wx+/dc.h'
+ sed -e '73d' -i 'wx+/no_flicker.h'
-# edit lines to remove functions that require wxgtk 3.1.x
- sed -e 's:m_textCtrlOfflineActivationKey->ForceUpper:// &:g' -i 'FreeFileSync/Source/ui/small_dlgs.cpp'
- sed -e 's:const double scrollSpeed =:& 6; //:g' -i 'wx+/grid.cpp'
+ # GUI theme fixes (for improved color compatibility)
+ patch -p1 -i theme_fixes.patch
+
+ # add LINKFLAGS that were removed but that we still need in our case
+ patch -p1 -i revert_linkflags.patch
+
+ # inlining of constants not present in libssh2's distributed headers
+ sed -i 's/MAX_SFTP_READ_SIZE/30000/g' FreeFileSync/Source/afs/sftp.cpp
+ sed -i 's/MAX_SFTP_OUTGOING_SIZE/30000/g' FreeFileSync/Source/afs/sftp.cpp
-# add '-lz' back into LINKFLAGS
- sed -i '/pie/ s/-pthread/-lz -pthread/' FreeFileSync/Source/Makefile
- sed -i '/pie/ s/-pthread/-lz -pthread/' FreeFileSync/Source/RealTimeSync/Makefile
+ echo "applying disable-autoupdate.patch"
+ cd "${srcdir}"/FreeFileSync/
+ patch -p1 -i "${srcdir}"/disable-autoupdate.patch
}
build() {
-### speed up compile on multithread machines
+ ### speed up compile on multithread machines
MAKEFLAGS="-j$(nproc)"
-### just in case of compile errors
+ ### just in case of compile errors
VER=`g++ -dumpversion`
MAC=`g++ -dumpmachine`
echo "compiler g++ $VER $MAC"
-### FFS
- cd ${srcdir}/FreeFileSync/Source
- make
+ ### FFS
+ cd "${srcdir}/FreeFileSync/Source"
+ make exeName=FreeFileSync tmpPath="${srcdir}/FreeFileSync/tmp_ffs"
-### RTS
- cd RealTimeSync
- make
+ ### RTS
+ cd "${srcdir}/FreeFileSync/Source/RealTimeSync"
+ make exeName=RealTimeSync tmpPath="${srcdir}/FreeFileSync/tmp_rts"
}
package() {
- cd ${srcdir}/FreeFileSync/Source
- make DESTDIR=${pkgdir} install
-
- cd RealTimeSync
- make DESTDIR=${pkgdir} install
-
- cd ${srcdir}
- install -Dm644 FreeFileSync.desktop $pkgdir/usr/share/applications/FreeFileSync.desktop
- install -Dm644 ffsicon.png $pkgdir/usr/share/pixmaps/ffsicon.png
- install -Dm644 RealTimeSync.desktop $pkgdir/usr/share/applications/RealTimeSync.desktop
- install -Dm644 rtsicon.png $pkgdir/usr/share/pixmaps/rtsicon.png
+ bindir="${pkgdir}/usr/bin"
+ appdir="${pkgdir}/opt/FreeFileSync"
+ appdocdir="${pkgdir}/usr/share/doc/FreeFileSync"
+
+ cd "${srcdir}/FreeFileSync/Build"
+ install -t "${appdir}/Bin" -Dm755 Bin/*
+ mkdir -p "${bindir}"
+ ln -s /opt/FreeFileSync/Bin/{FreeFileSync,RealTimeSync} "${bindir}"
+
+ cp -rT Resources "${appdir}/Resources"
+ find "${appdir}/Resources" -type f -print0 | xargs -0 chmod 644
+ install -t "${pkgdir}/usr/share/pixmaps" -Dm644 Resources/FreeFileSync.png Resources/RealTimeSync.png
+
+ cd "${srcdir}"
+ install -d "${appdocdir}"
+ gzip < Changelog.txt > "${appdocdir}/CHANGELOG.gz"
+ install -Dm644 -t "${pkgdir}/usr/share/applications" FreeFileSync.desktop RealTimeSync.desktop
}