# Maintainer: Ryan Pepper # Maintainer: Daniel Landau pkgname=ssb-patchwork _upstream=patchwork pkgver=3.11.4 pkgrel=3 pkgdesc="A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB)" arch=('i686' 'x86_64') url="https://github.com/ssbc/patchwork" license=('AGPL3') depends=('libxtst' 'libxext' 'libxkbfile' 'gconf' 'libsodium' 'libxss' 'gtk2' 'alsa-lib' 'nss' 'electron2') makedepends=('nodejs' 'npm') options=(!strip) source=( "https://github.com/ssbc/${_upstream}/archive/v${pkgver}.tar.gz" 'run.sh' "${pkgname}.desktop" ) sha512sums=( '19a0a73b059bed3ff57c10067455bcfd357fa4e56e763814650b7b2cd22f1992d53e9cade5a61ceb03bbbc031c436d7f307038aab0d1f6e7160c5e461709a47d' '582a74d9581c382745b33903f60e40c1fba97a1ff253560fd609ccd133f6074b7827561b559402274e879296b24aad73e2f3f5b9c7f25142e1885de919a2e8b7' '09292ec2f7c02d741cbeb046bd99293f4d144314d0233252dd34a619e1aacbbbf28078677c0871d367240e29aa50d9197bbe0a35e5b14f7ff9a6288c386124f6' ) build() { cd "${srcdir}/${_upstream}-${pkgver}" # Electron's version. export npm_config_target=$(electron2 -v) # The architecture of Electron, can be ia32 or x64. export npm_config_arch=x64 export npm_config_target_arch=x64 # Download headers for Electron. export npm_config_disturl=https://atom.io/download/electron # Tell node-pre-gyp that we are building for Electron. export npm_config_runtime=electron npm install --only=production --ignore-scripts } package() { cd "${srcdir}/${_upstream}-${pkgver}" install -d "${pkgdir}/opt/${pkgname}" cp -a * "${pkgdir}/opt/${pkgname}" install -D assets/icon.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${pkgname}.png" cd "${srcdir}" install -D run.sh "${pkgdir}/usr/bin/${pkgname}" install -D "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" }