Skip to content

Instantly share code, notes, and snippets.

@mbilker
Last active October 24, 2016 09:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mbilker/7325f23a0090e936f339 to your computer and use it in GitHub Desktop.
Save mbilker/7325f23a0090e936f339 to your computer and use it in GitHub Desktop.
N1 PKGBUILD
# Upstream URL: https://github.com/nylas/N1
# Please do mind that pkgbuild will automagically update
# to latest tagged release (you could have problems if you use an aur helper),
# there's no need to manually change pkgver.
# Please don't flag out-of-date!
pkgname=nylas-git
pkgver=0.3.25.r63.g9236529
pkgrel=1
pkgdesc="Chrome-based email client from Nylas"
arch=('i686' 'x86_64')
url="https://github.com/nylas/N1"
license=('MIT')
provides=('nylas')
depends=('gconf' 'nodejs' 'libgnome-keyring' 'nss' 'python2')
makedepends=('git' 'npm')
#source=("nylas::git+git://github.com/nylas/N1")
source=("nylas::git+git://github.com/mbilker/N1"
'private-fonts.tar.xz'
'private-sounds.tar.xz')
sha256sums=('SKIP'
'42143762a6b4037d33ef5c669942dde8f8424c0e1acfe7ceb82e31b6e28a9cd7'
'7c5d375965ff3fec237e3a6102a1193ad109e1399c7a39bbe7feceefc2886ade')
pkgver() {
cd "nylas"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "$srcdir/nylas"
sed -e "s/<%= description %>/$pkgdesc/" \
-e "s|<%= installDir %>|/usr|"\
-e "s|<%= iconName %>|nylas|"\
build/resources/linux/nylas.desktop.in > build/resources/linux/Nylas.desktop
}
build() {
cd "$srcdir/nylas"
export PYTHON=python2
script/bootstrap
script/grunt build --build-dir "$srcdir/nylas-build"
script/grunt set-version --build-dir "$srcdir/nylas-build"
script/grunt generate-asar --build-dir "$srcdir/nylas-build"
}
package() {
cd "$srcdir/nylas"
script/grunt install --build-dir "$srcdir/nylas-build" --install-dir "$pkgdir/usr"
install -Dm644 build/resources/linux/Nylas.desktop "$pkgdir/usr/share/applications/nylas.desktop"
install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment