diff options
author | archimede | 2016-12-11 01:37:10 +0800 |
---|---|---|
committer | archimede | 2016-12-11 23:46:27 +0800 |
commit | aa7c8b17b318d82e8d82d3af42d02493c4117ddf (patch) | |
tree | 9537e397e692cd996b6ca837f4bec6b4d09bcff0 /PKGBUILD | |
download | aur-aa7c8b17b318d82e8d82d3af42d02493c4117ddf.tar.gz |
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f246e3d315c5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Archimede Pitagorico <archimede.pitagorico@mail.com> + +pkgname=megasync-headless +pkgver=v2.8.0.0.g2c9286c +pkgrel=1 +pkgdesc="Sync local directory with your MEGA account. CLI tools only. Subset of the original MEGA SDK." +arch=('x86_64') +url='https://mega.co.nz/#sync' +license=('custom:MEGA') +source=('git+https://github.com/meganz/sdk.git#tag=v2.8.0' + 'megasyncd.service' + 'megasync.conf' + ) +install=$pkgname.install +backup=('usr/lib/systemd/system/megasyncd.service' + 'etc/conf.d/megasync.conf' + ) +conflicts=('megasync' + 'megasync-git' + 'megatools' + ) +provides=('megasync') +depends=('c-ares' + 'curl' + 'crypto++' + 'zlib' + 'sqlite' + 'openssl' + ) +makedepends=('git' + ) +sha1sums=('SKIP' + 'SKIP' + 'SKIP' + ) +options=('!buildflags' + ) + +pkgver() { + cd sdk + echo "$(git describe --long --tags | tr - . | tr _ .)" +} + +prepare() { + cd sdk + ./autogen.sh + + ./configure \ + --without-freeimage \ + --without-sodium +} + +build() { + cd sdk + make examples/megacli + make examples/megasimplesync +} + +package() { + install -Dm644 megasyncd.service "${pkgdir}/usr/lib/systemd/system/megasyncd.service" + install -Dm600 megasync.conf "${pkgdir}/etc/conf.d/megasync.conf" + + cd sdk + make DESTDIR=${pkgdir} install + # we do not need the include files + rm -rf ${pkgdir}/usr/local/include + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + mkdir -p "${pkgdir}/srv/mega" + mkdir -p "${pkgdir}/var/mega" + chmod 0700 "${pkgdir}/var/mega" +} |