Hacker News new | ask | show | jobs
by geofft 3521 days ago
The usual way package managers do this is, at packaging time, to use the native build tool to install the software rooted in a temporary directory, then fix up those files as needed (including fixing permissions and ownership) and copy them into a tarball. Does pacman not do that?
1 comments

It does [1]:

  package() {

    npm install -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz

    rm -r "$pkgdir"/usr/etc

    mkdir -p "$pkgdir/usr/share/licenses/$pkgname"

    ln -s "../../../lib/node_modules/$pkgname/LICENSE-MIT" "$pkgdir/usr/share/licenses/$pkgname/"

  }
[1] https://git.archlinux.org/svntogit/community.git/tree/trunk/...