You are not logged in.
Hello,
This is the first time that I try to create a PKGBUILD and I would like to request a feedback about it. It's a javascript library for SIP communications and I have some doubts about if it would be better to add nodejs-grunt-cli to makedepends list or if it's ok to execute the grunt command like I did in the build function. I personally prefer the second one because I think that is less intrusive because it removes one dependency (IMHO).
Also, I don't know if its better to use the $pkgname for installing the generated files and the LICENSE file or if it would be better to use only the $_gitname. In this second case, namcap throws an error because the LICENSE folder doesn't match the $pkgname.
Here is the PKGBUILD.
_gitname=jssip
pkgname=$_gitname-git
pkgver=0.3.0
pkgrel=1
pkgdesc="JsSIP, the JavaScript SIP library"
arch=(any)
url="http://www.jssip.net/"
provides=("$_gitname")
license=('MIT')
makedepends=('git' 'nodejs')
source=("$_gitname"::'git+https://github.com/versatica/JsSIP.git')
md5sums=('SKIP')
pkgver() {
cd "$_gitname"
# Use the tag of the last commit
local ver="$(git describe --long)"
printf "%s" "${ver//-/.}"
}
build() {
cd "$_gitname"
npm install -d
node_modules/grunt-cli/bin/grunt
}
package() {
cd "$_gitname"
install -d "$pkgdir/usr/share/$pkgname"
install -D -m644 dist/jssip-*.js "$pkgdir/usr/share/$pkgname/"
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
Thank you!
Last edited by basoko (2013-09-26 18:56:02)
Offline