70 lines
1.7 KiB
Bash
Executable file
70 lines
1.7 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# variables
|
|
VERSION=0.4.3
|
|
BUILD=1
|
|
|
|
|
|
TAG=gwh
|
|
OUTPUT=/tmp
|
|
TMP=/tmp/$TAG
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=company
|
|
PKG=$TMP/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
|
|
|
|
# mise en place
|
|
mkdir -p $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
|
|
( cd $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
|
|
tar xf $CWD/$PRGNAM-$VERSION.tar.?z*
|
|
$EMACS -batch -f batch-byte-compile src/*.el ext/*.el
|
|
|
|
mkdir -p $PKG$PREFIX/doc/$PRGNAM
|
|
mv COPYING COPYING.qwe INSTALL NEWS README doc img test header.qwe index.qwe \
|
|
$PKG$PREFIX/doc/$PRGNAM
|
|
)
|
|
|
|
# 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 (completion library for Emacs)
|
|
$PRGNAM:
|
|
$PRGNAM: Company stands for "complete anything" and is a modular in-buffer completion
|
|
$PRGNAM: mechanism.
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM: http://nschum.de/src/emacs/company-mode/
|
|
$PRGNAM: http://www.emacswiki.org/emacs/CompanyMode
|
|
$PRGNAM:
|
|
EOF
|
|
|
|
# empaquetage
|
|
cd $PKG
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|