# Maintainer: Jannick Hemelhof # Contributor: Nicola Squartini # Contributor: NicoHood # Contributor: Dick Choi # Contributor: Romain Bazile pkgname=boostnote _pkgname=Boostnote pkgver=0.8.17 pkgrel=1 pkgdesc="Open source note-taking app for programmers" arch=('any') url="https://boostnote.io/" license=('GPL3') depends=('electron' 'nodejs') makedepends=('npm' 'grunt-cli' 'git') source=( "${pkgname}-${pkgver}.tar.gz::https://github.com/BoostIO/"${_pkgname}"/archive/v"${pkgver}".tar.gz" "${pkgname}.js" "${pkgname}.desktop" "warning-fix.patch" "remove-analytics.patch" ) sha512sums=( '5c28859a459cf54355f88d6abebb9b5a0c1b4f229491d54296a632ea27c43a06227c0699b2858cd4526e835679dadf9981b9c8102aac3894ccc3e8bba1da07e1' 'f0abbdcca34d7f74d3dc66ffc2d0995416e7708c715d55fa58c4c2abc31d191ea42f3434e3105292b4817f83ac0ca89f456f5f93007ae80ab2426c8941f615f9' '18bcda13580da8ceeaa86793a77ec00a053b8fd51451dad7e2b1a19553fe1a467ac647b44b789212e783f3f6a80968cc9404e884ef7ff6b1f6588473b3229d40' '87d883064a58b8bf0e92f42ad40c7da1f3eae4ab4eb1029b3f22f34c47233f6543430b3fe41cb385511d6e6aabcc8eef4c08d0963a7950e331f319f9ebcf0524' 'ba5aa092e3bf29d3ad08be198691ddb24e10f5dff3c1700d5c85da5c54a611e3a94164eb23b149e7e31be7f88afad5ec8b93712922cdd0039f323b8cbe2808d9' ) prepare() { cd "${_pkgname}-${pkgver}" patch -Np1 -i "${srcdir}/warning-fix.patch" patch -Np1 -i "${srcdir}/remove-analytics.patch" } build() { cd "${_pkgname}-${pkgver}" npm install --no-optional grunt compile rm -r node_modules/ npm install --production --no-optional } package() { cd "${_pkgname}-${pkgver}" appdir="/usr/lib/${pkgname}" install -dm755 "${pkgdir}""${appdir}" cp -a * "${pkgdir}""${appdir}" install -Dm755 "${srcdir}/${pkgname}.js" "$pkgdir/usr/bin/${pkgname}" install -Dm644 resources/app.png "$pkgdir/usr/share/pixmaps/${pkgname}.png" install -Dm644 "${srcdir}/${pkgname}.desktop" "$pkgdir/usr/share/applications/${pkgname}.desktop" # Remove stuff we do not need find "${pkgdir}"/usr/lib/"${pkgname}"/node_modules \ -name "*.a" -exec rm '{}' \; \ -or -name "*.bat" -exec rm '{}' \; \ -or -name "*.node" -exec chmod a-x '{}' \; \ -or -name "benchmark" -prune -exec rm -r '{}' \; \ -or -name "doc" -prune -exec rm -r '{}' \; \ -or -name "html" -prune -exec rm -r '{}' \; \ -or -name "man" -prune -exec rm -r '{}' \; \ -or -path "*/less/gradle" -prune -exec rm -r '{}' \; \ -or -path "*/task-lists/src" -prune -exec rm -r '{}' \; }