# Maintainer: Jannick Hemelhof # Contributor: Nicola Squartini # Contributor: NicoHood # Contributor: Dick Choi # Contributor: Romain Bazile pkgname=boostnote _pkgname=Boostnote pkgver=0.11.7 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=('5543ebf121dd3dc77414e17404f17a9cc49cb7f1d8dc8ec7c96005be900c18acd68604360336224047407e1180f5ace39551745b853b2daa1734a75378100c29' '1f0ccd2a3632a12c4714d97b9f909ddc94b53d6f86a9e4bdcab31abd55a93071a2c35c6e1e9527b747de6dd74b8a5276414980c11e174085f28b8f2d2721230a' '18bcda13580da8ceeaa86793a77ec00a053b8fd51451dad7e2b1a19553fe1a467ac647b44b789212e783f3f6a80968cc9404e884ef7ff6b1f6588473b3229d40' '668658bc86f233b83d33466d72910d066c2143c90f02135b9ce8fc1a10d5224e4dd15338312db93ca91c5ec31d6250f1a8635ce9aa869ca1c9f42d11aed82401' '5cf9835598bb4f81ce8075a578f92c6d5068a02d0a09edce376c6929bcb081bbe7b776ef89b20d9ef295d3d3753c82eab07ff7f0f78230980d8273ab56f45a9b') 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 --no-shrinkwrap grunt compile rm -r node_modules/ npm install --production --no-optional --no-shrinkwrap } 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 '{}' \; }