You are not logged in.

#1 2013-06-21 22:04:32

blackcat
Member
Registered: 2013-01-13
Posts: 4

I need a solution for node-webkit and libudev.so.0

Hello there!

I'm developing the package of node-webkit in the aur. Since the first time I had trouble with libudev.so.0. The first quick fix was to generate a symbolic link to libudev.so.1, but this is not the best way and can destabilize the system.

The symbolic link is the recommended workaround for this problem at the moment. I don't think there will be a fixed version in the near future. By reading the issues on the bugtracker of node-webkit I found a solution by using a start-script and rewrite the LD_LIBRARY_PATH. This variable is missing in Arch, so I thought, I can add a file into /etc/ld.so.conf.d/. It's not what I wanted, because the library is then globally accessible, but it works on my machine.
I think there must be a better solution. Best choice would be a shell startscript in my opinion, but I don't know how.

My own package of libudev.so.0 were be deleted with the comment: "it is not needed, you can just provide a symlink to libudev.so.1". One say this, another say whatever -.-0 It's annoying. I really want a solution!

Here is the PKGBUILD:

pkgname=node-webkit
pkgver=0.6.0
pkgrel=2
pkgdesc="node-webkit is an app runtime based on Chromium and node.js."
arch=("i686" "x86_64")
url="https://github.com/rogerwang/node-webkit"
license=("MIT")
depends=("alsa-lib" "gconf" "gtk2" "nss")
optdepends=("nodejs: npm package support"
"nw-gyp: native add-on build tool for node-webkit")

if [ "$CARCH" = "i686" ]; then
  _arch="ia32"
  sha256sums=(
	"4b3f45cbb023d043955620a1f84b239249ac00a2649834c0c675d1574462f307"
	"c77f5c8bcbce1c8f12d574538845ff5b467fd1acc9e5998f459abcf6b4b7fec3"
  )
fi
if [ "$CARCH" = "x86_64" ]; then
  _arch="x64"
  sha256sums=(
	"a8fb4c045cc5de78d1ac784c50c1eda986d6ccbe82778f6285c5da1bfceda64e"
	"fe517d0cf7f374477fcbd654b57f1bc8660069c522625bb06f4d5fc565fdede3"
  )
fi

source=(
        "https://s3.amazonaws.com/${pkgname}/v${pkgver}/${pkgname}-v${pkgver}-linux-${_arch}.tar.gz"
        "http://arm.konnichi.com/core/os/${CARCH}/udev-182-4-${CARCH}.pkg.tar.xz"
)

package() {
  msg2 "create path and copy files"
  mkdir -p $pkgdir/{etc/ld.so.conf.d,usr/{lib/${pkgname}/lib,bin}}
  cp -R $srcdir/${pkgname}-v$pkgver-linux-$_arch/* $pkgdir/usr/lib/node-webkit/
  
  msg2 "copy libudev.so.0.13.1 -> /usr/lib/node-webkit/lib/libudev.so.0"
  cp $srcdir/usr/lib/libudev.so.0.13.1 $pkgdir/usr/lib/node-webkit/lib/libudev.so.0
  echo "/usr/lib/${pkgname}/lib" > "$pkgdir/etc/ld.so.conf.d/${pkgname}.conf"
  
  msg2 "symlink /usr/bin/nw -> /usr/lib/${pkgname}/nw"
  ln -s "/usr/lib/${pkgname}/nw" "$pkgdir/usr/bin/nw"

  msg2 "symlink /usr/bin/nwsnapshot -> /usr/lib/${pkgname}/nwsnapshot"
  ln -s "/usr/lib/${pkgname}/nwsnapshot" "$pkgdir/usr/bin/nwsnapshot"
}

Last edited by blackcat (2013-06-21 22:10:55)

Offline

#2 2013-06-21 22:49:47

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: I need a solution for node-webkit and libudev.so.0

Do not use prebuilt binaries, but compile the package from source with the current libudev.

sha256sums=(SKIP)
source=("$pkgname::git+https://github.com/rogerwang/node-webkit.git#tag=nw-v$pkgver")

to build it in the PKGBUILD, use nw-gyp i guess.

Last edited by progandy (2013-06-21 22:54:36)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2013-06-22 08:01:18

blackcat
Member
Registered: 2013-01-13
Posts: 4

Re: I need a solution for node-webkit and libudev.so.0

I'm trying it out.

Offline

Board footer

Powered by FluxBB