arikon / npm2debian

Utility to convert npm packages to Debian packages
32 stars 13 forks source link

Proposal: generic debian/watch #16

Open kapouer opened 12 years ago

kapouer commented 12 years ago

Here's the one from npm package i use :

./debian/watch :

version=3
opts=downloadurlmangle=s/.*v(.*)/http\:\/\/registry\.npmjs\.org\/npm\/-\/xxxxxx\-$1\.tgz/,\
filenamemangle=s/.*v(.*)$/xxxxxx-$1\.tar\.gz/ \
https://github.com/toto/xxxxxx/tags .*/tarball/v([\d.-]+)

You can see it checks new version on github (because i do not know how to find new version on npm website), and the github link could be found in the "repository.url" of package.json. The download link is simply the one from npm website, to ensure the published npm package is used, not the github version (they can differ sometimes).

arikon commented 12 years ago

You could use npm show <package> to get the last version from npm registry

kapouer commented 12 years ago

But you can't do that in debian/watch

arikon commented 12 years ago

We also can't look for tags on github.com for every package: not all packages are hosted on github and not all repos are tagged.

kapouer commented 12 years ago

That was only a suggestion, if you think it's not possible to produce some convenient working debian/watch, don't do it. Maybe in general it's not possible, but maybe also 95% of packages could be supported ?