# Maintainer: Jannick Hemelhof # Contributor: Nicola Squartini # Contributor: NicoHood # Contributor: Dick Choi # Contributor: Romain Bazile pkgname=boostnote _pkgname=Boostnote pkgver=0.8.20 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" "insertion-fix.patch" ) sha512sums=( '508cd053aa27da9a5f9e137724b75f09342e6eb915c49d4b2d387caa60c357341a697b894f7e064747b1e33d1a1994d04f73f5e6c24fcb59d2f2c3b7cce093ee' 'f0abbdcca34d7f74d3dc66ffc2d0995416e7708c715d55fa58c4c2abc31d191ea42f3434e3105292b4817f83ac0ca89f456f5f93007ae80ab2426c8941f615f9' '18bcda13580da8ceeaa86793a77ec00a053b8fd51451dad7e2b1a19553fe1a467ac647b44b789212e783f3f6a80968cc9404e884ef7ff6b1f6588473b3229d40' '5f40a234515a35f0460d127049c9b24a000da8883d06560781a922df8564f47b91227c0aadb67cd41ea2b4eba388da4251a7eda8e021dc11e08662b2e397cab0' 'f41fc7cbfd04bc6b52e5df64d0b977289c33292cdb48685998ea1c7e038d9de868fc5f7eb21cde4cd18bf5d81b4fed674d0f2f10896ea2eadb3b952c124376ce' '0afb34bc1364879c0ff16913cf14cd69ba1ddce858f3f8736653873acdd90af70ee8911a40ce1ff9e150a71a75abc1f83afcaee013f0dc9e56509d943d3fc67d' ) prepare() { cd "${_pkgname}-${pkgver}" patch -Np1 -i "${srcdir}/insertion-fix.patch" 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 '{}' \; }