blob: dae9ee95fd811ab6395902114b791bc451413ce7 (
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.15
pkgrel=1
pkgdesc="Backup software to synchronize files and folders"
arch=('i686' 'x86_64')
url="https://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_xdg_config_path.patch
revert_bulk_append.patch
revert_linkflags.patch
FreeFileSync.desktop
RealTimeSync.desktop
dlagent
)
sha256sums=('bf495c182c51565a622023e4823a8df0a912c73f134e57a7398ccb6578d46dc5'
'e74b4abdf04c58004e52f77afee762e4c3d72d4ca42de4cc42cbc930cbec0e32'
'2ea1f157ab31feb18b0d8ac117a1820174a4b2b9bdaee2027c1fbc2c287e1caa'
'd3dedc100163ce00ae5889a6039a1fff11ae32b676ae5e83ae9182509f80638d'
'590d87707240529ca893199f852143f5d7c7266cb050e37e615900b013ac3d51'
'82439b4b81b0a72652befad9b9db52ffbc0180f307c92205aa5ab344f9f82830'
'1f47fa51bf9b8a15e3785a083662dd78aa5b0e92e0f8789ffbaa3c184e411f24')
DLAGENTS=("https::./dlagent $url %u %o")
prepare() {
# wxgtk < 3.1.0
# Revert to classic config path
patch --binary -p1 -i revert_xdg_config_path.patch
# Avoid uses of wxItemContainer::Append(const std::vector<wxString>& items)
patch --binary -p1 -i revert_bulk_append.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/afs/sftp.cpp'
# 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
}
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"
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
}
|