slackbuilds/UNUSED/e/ruby-misc-el/SlackBuild
2020-06-25 11:23:11 +02:00

52 lines
1.3 KiB
Bash
Executable file

#!/bin/sh
VERSION=$(echo ruby-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)
BUILD=${BUILD:-1gwh}
ARCH=emacs
CWD=$(pwd)
TAG=gwh
OUTPUT=/tmp
TMP=${TMP:-/tmp/$TAG}
PKG=$TMP/pkg-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 <<EOF > $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
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n $OUTPUT/ruby-misc-el-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz