#!/bin/sh VERSION=$(echo ruby-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev) BUILD=${BUILD:-1cyco} ARCH=emacs CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-ruby-misc-el rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf ruby-$VERSION tar xvf $CWD/ruby-$VERSION.tar.?z* ruby-$VERSION/misc/ || exit 1 cd ruby-$VERSION || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; mkdir -p $PKG/usr/share/emacs/site-lisp cp misc/*.el $PKG/usr/share/emacs/site-lisp/ ( cd $PKG/usr/share/emacs/site-lisp [ -x /usr/bin/emacs ] && /usr/bin/emacs -batch -f batch-byte-compile *.el ) mkdir -p $PKG/install cat < $PKG/install/slack-desc ruby-misc-el: ruby-misc-el (Emacs helpers for Ruby development) ruby-misc-el: ruby-misc-el: ruby-misc-el: ruby-misc-el: ruby-misc-el: ruby-misc-el: ruby-misc-el: Visit the Ruby project online at http://www.ruby-misc-el-lang.org/ ruby-misc-el: ruby-misc-el: ruby-misc-el: EOF cd $PKG /sbin/makepkg -l y -c n $TMP/ruby-misc-el-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz