2 # Pkgfile template for gem ports
7 GEMNAME=${GEMNAME:-$name}
11 if [ -z "$GEMNAME" ]; then
12 echo "Variable 'GEMNAME' not set"
16 sitelibdir=$(ruby -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
17 export GEMSDIR=${sitelibdir/site_ruby/gems}
19 mkdir -p $PKG/$GEMSDIR
20 gem install $SRC/$GEMNAME -v $version -l -i $PKG/$GEMSDIR
22 if [ -d $PKG/$GEMSDIR/bin ]; then
23 for b in $PKG/$GEMSDIR/bin/* ; do
24 install -D -m 755 $b $PKG/usr/bin/$(basename $b)
28 if [ "$GEMS_KEEP_DOC" != "yes" ]; then
29 rm -rf $PKG$GEMSDIR/doc/