# Maintainer: Daniel Menelkir # Contributor : bartus # Contributor : Rafał Kozdrój # Contributor : kikadf # Contributor : Daniel Henry # Contributor : Miguel Revilla # Contributor : Alfonso Saavedra "Son Link" # Contributor : Hexchain Tong pkgname=megasync-nopdfium pkgver=4.8.6.0 pkgrel=1 pkgdesc="Easy automated syncing between your computers and your MEGA cloud drive(stripped of pdfium dependency)" arch=('i686' 'x86_64') provides=(megasync=$pkgver) conflicts=(megasync) url="https://github.com/meganz/MEGAsync" license=('custom:MEGA LIMITED CODE REVIEW LICENCE') depends=('c-ares' 'crypto++' 'libsodium' 'hicolor-icon-theme' 'libuv' 'qt5-base' 'qt5-svg' 'qt5-x11extras' 'libmediainfo' 'libraw' 'ffmpeg' 'freeimage') makedepends=('qt5-tools' 'swig' 'doxygen' 'lsb-release' 'git') _extname="_Win" source=("git+https://github.com/meganz/MEGAsync.git#tag=v${pkgver}${_extname}" "meganz-sdk::git+https://github.com/meganz/sdk.git" "ffmpeg.patch") sha256sums=('SKIP' 'SKIP' 'bc8a8460c967d084e2643431dbb06c03897f1944a0e899318fc78b611f9255e6') prepare() { cd "MEGAsync" git config submodule.src/MEGASync/mega.url "../meganz-sdk" git -c protocol.file.allow=always submodule update --init git -C src/MEGASync/mega apply -v "$srcdir/ffmpeg.patch" cd "src/MEGASync" sed -i '/DEFINES += REQUIRE_HAVE_PDFIUM/d' MEGASync.pro sed -i '/CONFIG += USE_PDFIUM/d' MEGASync.pro } build() { # build sdk cd "MEGAsync/src/MEGASync/mega" ./autogen.sh ./configure \ --disable-shared \ --enable-static \ --disable-silent-rules \ --disable-curl-checks \ --disable-megaapi \ --with-ffmpeg \ --with-cryptopp \ --with-sodium \ --with-zlib \ --with-sqlite \ --with-cares \ --with-curl \ --with-freeimage \ --with-libuv \ --disable-posix-threads \ --disable-examples \ --with-libzen \ --with-libmediainfo \ --prefix="${srcdir}/MEGAsync/src/MEGASync/mega/bindings/qt/3rdparty" # build megasync cd "../.." qmake-qt5 \ "CONFIG += FULLREQUIREMENTS" \ MEGA.pro lrelease-qt5 MEGASync/MEGASync.pro make } package () { cd "MEGAsync" install -Dm 644 LICENCE.md "${pkgdir}/usr/share/licenses/$pkgname/LICENCE" install -Dm 644 installer/terms.txt "${pkgdir}/usr/share/licenses/$pkgname/terms.txt" install -Dm 644 src/MEGASync/mega/LICENSE "${pkgdir}/usr/share/licenses/$pkgname/SDK-LICENCE" cd "src" install -dm 755 "${pkgdir}/usr/bin" make INSTALL_ROOT="${pkgdir}" TARGET="${pkgdir}/usr/bin/megasync" install install -Dm 755 "MEGASync/megasync" "${pkgdir}/usr/bin/megasync" }