blob: 25d00927bf52118f76d66b06d8f78c06ab530d56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# Contributor: chenxing <cxcxcxcx AT gmail DOT com>
# Contributor: Michael Burkhard <Michael DOT Burkhard AT web DOT de>
# Contributor: alexmo82 <25396682 AT live DOT it>
# Maintainer: jooch <jooch AT gmx DOT com>
pkgname=freefilesync
pkgver=10.11
pkgrel=3
pkgdesc="Backup software to synchronize files and folders"
arch=('i686' 'x86_64')
url="https://www.freefilesync.org"
license=('GPLv3')
depends=(wxgtk webkit2gtk boost-libs)
makedepends=(boost unzip)
source=(
"FreeFileSync_${pkgver}_Source.zip::${url}/download/FreeFileSync_${pkgver}_Source.zip" #ffs
revert_resources_path.patch
revert_xdg_config_path.patch
FreeFileSync.desktop
RealTimeSync.desktop
)
sha256sums=('ed322ef285d85b1cfaa7d4e6fd4dbcb00c4aaf57003a3cbd35126eaef95a1d37'
'052ef5bf5eb11730499f4b81cd7e70f990fff3cfcc2f7059b84981e7ededc361'
'fef8aa099a27c277b76f1229651ed2324355528482c8f115e09c39269bbf4bdd'
'590d87707240529ca893199f852143f5d7c7266cb050e37e615900b013ac3d51'
'82439b4b81b0a72652befad9b9db52ffbc0180f307c92205aa5ab344f9f82830')
DLAGENTS=("https::/usr/bin/curl -fLC - --retry 5 --retry-delay 3 -A Mozilla -o %o %u")
_auth_request="$(\
echo "Authenticating for download ..." >&2; \
/usr/bin/curl -fsSL -A Mozilla "$url/cookie/load-consent.php" \
)"
prepare() {
# wxgtk < 3.1.0
# Revert to classic config path
patch --binary -p1 -i revert_xdg_config_path.patch
# Revert change to resources path of portable version
patch --binary -p1 -i revert_resources_path.patch
# 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'
# libssh2 v1.8.2 does not yet implement LIBSSH2_SFTP_DEFAULT_MODE, revert to previous impl.
sed -e 's/LIBSSH2_SFTP_DEFAULT_MODE/LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO/g' -i 'FreeFileSync/Source/fs/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
# inlining of constants not present in libssh2's distributed headers
sed -i 's/MAX_SFTP_READ_SIZE/30000/g' FreeFileSync/Source/fs/sftp.cpp
sed -i 's/MAX_SFTP_OUTGOING_SIZE/30000/g' FreeFileSync/Source/fs/sftp.cpp
}
build() {
### speed up compile on multithread machines
MAKEFLAGS="-j$(nproc)"
### just in case of compile errors
VER=`g++ -dumpversion`
MAC=`g++ -dumpmachine`
echo "compiler g++ $VER $MAC"
### FFS
cd "${srcdir}/FreeFileSync/Source"
make EXENAME=FreeFileSync TMP_PATH="${srcdir}/FreeFileSync/tmp_ffs"
### RTS
cd "${srcdir}/FreeFileSync/Source/RealTimeSync"
make EXENAME=RealTimeSync TMP_PATH="${srcdir}/FreeFileSync/tmp_rts"
}
package() {
bindir="${pkgdir}/usr/bin"
appsharedir="${pkgdir}/usr/share/FreeFileSync"
appdocdir="${pkgdir}/usr/share/doc/FreeFileSync"
cd "${srcdir}/FreeFileSync/Build"
install -t "${bindir}" -Dm755 Bin/FreeFileSync Bin/RealTimeSync
install -t "${appsharedir}" -Dm644 Resources.zip
install -t "${appsharedir}/Misc" -Dm644 Misc/*
install -t "${appsharedir}/Languages" -Dm644 Languages/*.lng
install -t "${pkgdir}/usr/share/pixmaps" -Dm644 Misc/FreeFileSync.png Misc/RealTimeSync.png
cd "${srcdir}"
install -d "${appdocdir}"
gzip < Changelog.txt > "${appdocdir}/CHANGELOG.gz"
install -Dm644 -t "${pkgdir}/usr/share/applications" FreeFileSync.desktop RealTimeSync.desktop
}
|