You are not logged in.
Hi, I'm the maintainer of nodejs, and I inherited the PKGBUILD from the previous maintainers. With nodejs-unstable, I'm starting from scratch. Here's what I came up with:
# Maintainer: James Campos <james.r.campos@gmail.com>
pkgname=nodejs-unstable
pkgver=0.3.1
pkgrel=1
pkgdesc="Evented I/O for V8 javascript"
arch=('i686' 'x86_64')
url="http://nodejs.org/"
license=('MIT')
depends=('python2')
optdepends=('openssl: TLS support')
provides=('nodejs')
source=("http://nodejs.org/dist/node-v$pkgver.tar.gz")
sha256sums=('19c4c6144af143fbe37f80ec5d2843c4e19b5b6054fb10225bec314b60d2d012')
build() {
cd "node-v$pkgver"
# python2 fix
for file in $(find . -name '*.py' -print) wscript tools/waf-light tools/node-waf; do
sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' "$file"
sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' "$file"
done
sed -i "s|cmd_R = 'python |cmd_R = 'python2 |" wscript
sed -i "s|python |python2 |" Makefile
./configure --prefix=/usr
make
}
package() {
cd "node-v$pkgver"
make DESTDIR="$pkgdir/" install
install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
}
# vim:set ts=2 sw=2 et:a couple questions / comments:
since md5 / sha1 sums have known weaknesses, instead of merely recommending sha2 sums in the wiki, shouldn't one of the sha2 sums be used by default in /etc/makepkg.conf and the PKGBUILD.proto files in /usr/share/pacman ?
I keep getting warnings about using $srcdir, even though I really don't refer to it in my PKGBUILD. Bug? Also this is confusing / inconsistent, since the wiki uses it, but apparently makepkg doesn't like it.
did I do the license bit right? the wiki says "The license file(s) should be included in /usr/share/licenses/$pkgname/ e.g. /usr/share/licenses/dibfoo/COPYING.", so would I be ok with just `cp`-ing the file, or do I have to use `install -D -m644` (which I just copied from the nodejs PKGBUILD). Explicit instructions / code in the wiki would be helpful for a noob like me
.
any questions / comments from you guys would be welcome.
Offline
since md5 / sha1 sums have known weaknesses, instead of merely recommending sha2 sums in the wiki, shouldn't one of the sha2 sums be used by default in /etc/makepkg.conf and the PKGBUILD.proto files in /usr/share/pacman ?
It is just a download integrity check. You can put whatever value you like in the PKGBUILD.
I keep getting warnings about using $srcdir, even though I really don't refer to it in my PKGBUILD. Bug? Also this is confusing / inconsistent, since the wiki uses it, but apparently makepkg doesn't like it.
Grep you package files for references to the directory you built the package in. Sometimes packages like hardcoding references to it into their files... Or it could be a false positive on makepkg's behalf.
did I do the license bit right? the wiki says "The license file(s) should be included in /usr/share/licenses/$pkgname/ e.g. /usr/share/licenses/dibfoo/COPYING.", so would I be ok with just `cp`-ing the file, or do I have to use `install -D -m644` (which I just copied from the nodejs PKGBUILD). Explicit instructions / code in the wiki would be helpful for a noob like me
.
The license looks fine to me.
Offline
It is just a download integrity check. You can put whatever value you like in the PKGBUILD.
makepkg.conf doesn't follow the wiki recommendations - shouldn't we strive for consistency?
Grep you package files for references to the directory you built the package in. Sometimes packages like hardcoding references to it into their files... Or it could be a false positive on makepkg's behalf.
`grep -r srcdir .` does yield lots of hits. I don't think upstream would rename their variables just for us, though, so I guess I'll have to ignore this warning.
I added a comment in Talk:Arch Packaging Standards about explicit license installation instructions.
Last edited by aeosynth (2010-12-09 08:42:39)
Offline
Allan wrote:It is just a download integrity check. You can put whatever value you like in the PKGBUILD.
makepkg.conf doesn't follow the wiki recommendations - shouldn't we strive for consistency?
I am missing where this conflicts? Does the wiki recommend something else? Anyway, recommendations are nothing more than that. Use whatever you feel like.
Allan wrote:Grep you package files for references to the directory you built the package in. Sometimes packages like hardcoding references to it into their files... Or it could be a false positive on makepkg's behalf.
`grep -r srcdir .` does yield lots of hits. I don't think upstream would rename their variables just for us, though, so I guess I'll have to ignore this warning.
Not "srcdir" but "$srcdir"... the actual directory path you build the package in. Of course $srcdir will not be defined outside the PKGBUILD so you will need to type the path yourself.
Offline