# Maintainer: Rafał Kozdrój # Contributor: kikadf # Contributor: Daniel Henry # Contributor: Miguel Revilla # Contributor: Alfonso Saavedra "Son Link" # Contributor: Hexchain Tong pkgname=megasync pkgver=4.0.2.0 pkgrel=2 pkgdesc="Easy automated syncing between your computers and your MEGA cloud drive" arch=('i686' 'x86_64') url="https://github.com/meganz/MEGAsync" license=('custom:MEGA LIMITED CODE REVIEW LICENCE') depends=('c-ares' 'crypto++' 'libsodium' 'hicolor-icon-theme' 'libuv' 'qt5-svg' 'libmediainfo' 'libraw' 'qt5-base' 'ffmpeg') makedepends=('qt5-tools' 'swig' 'doxygen' 'lsb-release' 'git') optdepends=('sni-qt: fix systray issue on KDE and LXQt') _extname="Linux_Ubuntu_18.10build" _sdk_commit="4dea1c5c03589655a1187dbea60dce2df1a69188" source=("git+https://github.com/meganz/MEGAsync.git#tag=v${pkgver}_${_extname}" "meganz-sdk::git+https://github.com/meganz/sdk.git#commit=${_sdk_commit}") sha256sums=('SKIP' 'SKIP') prepare() { cd "MEGAsync" git submodule init git config submodule.src/MEGASync/mega.url "$srcdir/meganz-sdk" git submodule update } build() { # build sdk cd "MEGAsync/src/MEGASync/mega" ./autogen.sh ./configure \ --disable-shared \ --enable-static \ --disable-silent-rules \ --disable-curl-checks \ --disable-megaapi \ --with-cryptopp \ --with-sodium \ --with-zlib \ --with-sqlite \ --with-cares \ --with-curl \ --without-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/megasync/LICENCE" install -Dm 644 installer/terms.txt "${pkgdir}/usr/share/licenses/megasync/terms.txt" cd "src" make INSTALL_ROOT="${pkgdir}" install cd "MEGASync" install -Dm 755 megasync "${pkgdir}/usr/bin/megasync" }