80477ca890
Signed-off-by: Gwenhael Le moine <gwenhael.le.moine@gmail.com>
77 lines
1.8 KiB
Bash
Executable file
77 lines
1.8 KiB
Bash
Executable file
#!/bin/sh -x
|
|
|
|
# variables
|
|
VERSION=$(date +"%Y.%m.%d_%H.%M")
|
|
BUILD=1
|
|
PACKAGER=cyco
|
|
|
|
TMP=/tmp
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=espresso
|
|
PKG=$TMP/$PACKAGER/pkg-$PRGNAM
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
PREFIX=/usr
|
|
|
|
EMACS=$(basename $(ls /usr/bin/emacs-2*))
|
|
EMACS_VERSION=$(echo "$EMACS" | grep -o "\-[0-9\.]*\-" | tr -d - | head -n1)
|
|
|
|
# nettoyage préalable
|
|
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
|
|
|
mkdir -p $PKG
|
|
|
|
# mise en place
|
|
cd $TMP
|
|
if [ ! -e $CWD/$PRGNAM.el ] ; then
|
|
( cd $CWD
|
|
wget -c http://download.savannah.gnu.org/releases-noredirect/espresso/espresso.el
|
|
)
|
|
fi
|
|
if [ ! -e $CWD/moz.el ] ; then
|
|
( cd $CWD
|
|
wget -c http://download.savannah.gnu.org/releases-noredirect/espresso/moz.el
|
|
)
|
|
fi
|
|
|
|
mkdir -p $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
|
|
cp -R $CWD/$PRGNAM.el $CWD/moz.el $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
|
|
( cd $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
|
|
$EMACS -batch -f batch-byte-compile *.el
|
|
)
|
|
|
|
# correction
|
|
( cd $PKG
|
|
chown -R root:root *
|
|
)
|
|
|
|
# embaumement
|
|
mkdir -p $PKG/install
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
|
# HOW TO EDIT THIS FILE:
|
|
# The "handy ruler" below makes it easier to edit a package description. Line
|
|
# up the first '|' above the ':' following the base package name, and the '|'
|
|
# on the right side marks the last column you can put a character in. You must
|
|
# make exactly 11 lines for the formatting to be correct. It's also
|
|
# customary to leave one space after the ':'.
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
$PRGNAM: $PRGNAM (Javascript mode for Emacs)
|
|
$PRGNAM:
|
|
$PRGNAM: espresso-mode is a Javascript-mode for GNU Emacs.
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM: http://www.nongnu.org/espresso/
|
|
$PRGNAM: (need http://wiki.github.com/bard/mozrepl/ )
|
|
EOF
|
|
|
|
# empaquetage
|
|
cd $PKG
|
|
makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz
|