You are not logged in.

#1 2008-11-06 18:11:52

Wishes
Member
Registered: 2006-08-06
Posts: 36

[Solved] URBI and Webots

Im trying to build a package for URBI. There are 2 options: to build it from the sources, or use precompiled binaries.

Cause the sources seem to be offline at the moment, i was tryin to make a PKGBUILD for the precompiled binaries.

pkgname=urbi
pkgver=1.5
pkgrel=1
pkgdesc="cross-platform scripting language used to develop applications for robotics and artificial intelligence"
arch=('i686' 'x86_64')
url=http://www.gostai.com/urbisdk.html
license=('unknown')
depends=('gcc>=4.1')
md5sums=(aaa92a29eb121fe7eba0215b6e6a824e)

build(){
    tar -xvvzf  $startdir/urbi-remote-sdk-1.5-linux_gcc4-l1a028ce.tar.gz
    cd $srcdir
    mv urbi-remote-sdk/usr $pkgdir/usr
}

Well, but the problem is, that i get messages that the directory right differ, when i trie to install the package. System:755 and Package:2755

Where lies my mistake? Well guess its quite a nooby question, but sorry, its my first pkgbuild.

Last edited by Wishes (2008-11-09 14:24:12)

Offline

#2 2008-11-06 19:37:22

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [Solved] URBI and Webots

The directories in that tarball have 2755 permissions.  Pacman was just warning you that your system's directories are different (755, as they should be), but the package itself should have still installed fine.  If you want to get rid of the warnings, you can use this:

pkgname=urbi-remote-sdk
pkgver=1.5
pkgrel=1
pkgdesc="Cross-platform scripting language for robotics and AI development"
arch=('i686' 'x86_64')
url="http://www.gostai.com/urbisdk.html"
license=('GPL2')
depends=('gcc>=4.1.0')
options=('!emptydirs')
source=($pkgname-$pkgver-linux_gcc4-l1a028ce.tar.gz)
noextract=($pkgname-$pkgver-linux_gcc4-l1a028ce.tar.gz)
md5sums=('aaa92a29eb121fe7eba0215b6e6a824e')

build(){
  tar xzf $pkgname-$pkgver-linux_gcc4-l1a028ce.tar.gz -C $pkgdir --strip=1 \
    --transform="s|usr/local|usr|;s|doc/$pkgname-$pkgver|doc/$pkgname|"
  rm -f $pkgdir/usr/share/doc/$pkgname/LICENSE
  chmod g-s -R $pkgdir/usr
}

Last edited by creslin (2008-11-06 21:07:48)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#3 2008-11-07 00:49:49

Wishes
Member
Registered: 2006-08-06
Posts: 36

Re: [Solved] URBI and Webots

Thank you very much, i changed it a bit (is i open the pkgfile with ark, is shows me that the directorytree doesnt start with /usr/...., instead it starts with /..... I did a noobish workaround. smile

pkgname=urbi-engine-webots
pkgver=1.5.6
pkgrel=1
pkgdesc="Cross-platform scripting language for robotics and AI development"
arch=('i686' 'x86_64')
url="http://www.gostai.com/urbisdk.html"
license=('GPL2')
depends=('gcc>=4.1.0')
options=('!emptydirs')
source=($pkgname-$pkgver-linux_64-k51997-e0566e44-l903617d.tar.gz)
noextract=($pkgname-$pkgver-linux_64-k51997-e0566e44-l903617d.tar.gz)
md5sums=('2a66d2976269a7bc54cfadc9fb376c73')

build(){
  tar xzf $pkgname-$pkgver-linux_64-k51997-e0566e44-l903617d.tar.gz -C $pkgdir --strip=1 \
    --transform="s|usr/local|usr|;s|doc/$pkgname-$pkgver|doc/$pkgname|"
  rm -f $pkgdir/usr/share/doc/$pkgname/LICENSE
  mv $pkgdir $startdir/usr
  mkdir $startdir/pkg
  mv $startdir/usr  $startdir/pkg/usr
  chmod g-s -R $pkgdir/usr
  rm $pkgdir/usr/include/jconfig.h
  rm $pkgdir/usr/include/jerror.h
  rm $pkgdir/usr/include/jmorecfg.h
  rm $pkgdir/usr/include/jpeglib.h
  rm $pkgdir/usr/lib/libjpeg.a
}

The removes at the bottom are here, because at install, it said that these files already exists, so i removed them from the package, since i didnt want to override the files which are already in the system.



So, in addition to URBI i need Webots, i wrote the following pkgbuild (i wanted to be webots in /opt):

pkgname=webots
pkgver=5.10.0
pkgrel=1
pkgdesc="Robotics Simulation Software"
arch=('x86_64')
url="http://www.cyberbotics.com/products/webots/index.html"
license=('unknown')
depends=('glibc>=2.3')
options=('!emptydirs')
source=($pkgname-$pkgver-x86-64.tar.bz2)
noextract=($pkgname-$pkgver-x86-64.tar.bz2)
md5sums=('b37c6a2ea18a840af0312c9e5850235f')

build(){
  mkdir $pkgdir/opt
  tar xjf $pkgname-$pkgver-x86-64.tar.bz2 -C $pkgdir/opt/
  chmod g-s -R $pkgdir/opt
}

It works fine, but is there a way to make a link to /usr/bin in the pkg (cause of dmenu, of course with rights for execution by a normal user)?

Offline

#4 2008-11-07 01:55:01

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [Solved] URBI and Webots

Wishes wrote:

Thank you very much, i changed it a bit (is i open the pkgfile with ark, is shows me that the directorytree doesnt start with /usr/...., instead it starts with /..... I did a noobish workaround. smile

Ah I thought you wanted urbi-remote-sdk based on your first post, so the PKGBUILD I posted was for urbi-remote-sdk.  The tarball for urbi-engine-webots is built differently than urbi-remote-sdk, so that's why the same tar command doesn't work (mainly the --strip=1).  Try this one for urbi-engine-webots:

pkgname=urbi-engine-webots
pkgver=1.5.6
pkgrel=1
pkgdesc="Cross-platform scripting language for robotics and AI development"
arch=('i686' 'x86_64')
url="http://www.gostai.com/urbisdk.html"
license=('custom')
depends=('gcc>=4.1.0')
options=('!emptydirs')
source=($pkgname-$pkgver-linux_gcc4-k51997-e0566e44-l903617d.tar.gz)
noextract=($pkgname-$pkgver-linux_gcc4-k51997-e0566e44-l903617d.tar.gz)
md5sums=('eb0039ca4573824a1d211cee00a560ee')

build(){
  cd $pkgdir
  tar xzf ../$pkgname-$pkgver-linux_gcc4-k51997-e0566e44-l903617d.tar.gz \
    --transform='s|usr/local|usr|'
  install -dm755 usr/share/{licenses/$pkgname,doc/$pkgname}
  install -Dm644 LICENSE* usr/share/licenses/$pkgname
  install -Dm644 `ls | grep -v "usr\|LICENSE.*"` usr/share/doc/$pkgname

  rm -f usr/include/{jconfig.h,jerror.h,jmorecfg.h,jpeglib.h} \
    usr/lib/libjpeg.a `ls | grep -v usr`
  chmod g-s -R usr
}

Wishes wrote:
So, in addition to URBI i need Webots, i wrote the following pkgbuild (i wanted to be webots in /opt):
...
It works fine, but is there a way to make a link to /usr/bin in the pkg (cause of dmenu, of course with rights for execution by a normal user)?

To create a symbolic link to /opt/webot/bin/FILE in /usr/bin, you can add this at the end:

ln -sf /opt/webot/bin/FILE $pkgdir/usr/bin/FILE

Last edited by creslin (2008-11-07 07:44:16)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#5 2008-11-07 08:18:01

Wishes
Member
Registered: 2006-08-06
Posts: 36

Re: [Solved] URBI and Webots

I havent seent the webots engine at first, so i thought i need the sdk.

Thank you very much one again, smile

Edit: Webots cannot find urbi, so i changed the pkgbuild a bit, so it installes urbi in /opt/webots, i hope this should word. pkg is building fine, but i cannt install it, cause /opt/webots already exists in the filesystem. How can i say it, that it should just copy the files in when the directory exists?

Last edited by Wishes (2008-11-07 09:45:33)

Offline

#6 2008-11-07 15:22:42

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [Solved] URBI and Webots

Wishes wrote:

Webots cannot find urbi

The webots guide mentions exporting the WEBOTS_HOME environment variable to point to the webots directory, so maybe that will fix it.  You can use the adjusted webots PKGBUILD below to handle that variable.

Wishes wrote:

i cannt install it, cause /opt/webots already exists in the filesystem. How can i say it, that it should just copy the files in when the directory exists?

The problem here is that both 'webots' and 'urbi-engine-webots' have a file (not directory) called bin/webots.  They designed webots to be installed to a different location than urbi, so try installing webots to opt and keeping urbi-engine-webots in usr/bin.

webots PKGBUILD:

pkgname=webots
pkgver=5.10.0
pkgrel=1
pkgdesc="Robotics Simulation Software"
arch=('x86_64')
url="http://www.cyberbotics.com/products/$pkgname/index.html"
license=('custom' 'GPL2')  # webots=License.html, libs=GPL2
depends=('glibc>=2.3')
options=('!emptydirs')
install=$pkgname.install
source=($pkgname-$pkgver-x86-64.tar.bz2)
noextract=($pkgname-$pkgver-x86-64.tar.bz2)
md5sums=('b37c6a2ea18a840af0312c9e5850235f')

build(){
  _dir=opt/$pkgname

  cd $pkgdir
  tar xjf ../$pkgname-$pkgver-x86-64.tar.bz2 --transform="s|$pkgname|$_dir|"
  install -Dm644 $_dir/doc/License.html usr/share/licenses/$pkgname/License.html
  rm -f $_dir/doc/{License.html,COPYING.LIB}
  chmod g-s -R *
  sed -i "s|^WEBOTS_PATH=.*|WEBOTS_PATH=/$_dir|" $startdir/$install
}

webots.install:

WEBOTS_PATH=

post_install() {
  echo "export WEBOTS_HOME=$WEBOTS_PATH" > /etc/profile.d/webots.sh
  chmod 755 etc/profile.d/webots.sh
  echo "==> Set the WEBOTS_HOME environment variable as your regular user:"
  echo "     $ source /etc/profile.d/webots.sh"
}

post_upgrade() {
  post_install $1
}

post_remove() {
  rm -f /etc/profile.d/webots.sh
}

Last edited by creslin (2008-11-07 18:15:14)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#7 2008-11-07 17:38:35

Wishes
Member
Registered: 2006-08-06
Posts: 36

Re: [Solved] URBI and Webots

Ah i must have overlooked the webots binary.
Thank you again very much, i think i've got it all together now.

Offline

Board footer

Powered by FluxBB