2010-01-11 11:47:11 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-01-24 11:52:53 +01:00
|
|
|
CWD=$(pwd)
|
|
|
|
|
|
|
|
PRGNAM=$(basename $CWD)
|
2011-03-02 03:52:13 +01:00
|
|
|
VERSION=$(date +"%Y.%m.%d_%H.%M")
|
2010-01-11 11:47:11 +01:00
|
|
|
BUILD=${BUILD:-1}
|
2011-02-17 05:54:04 +01:00
|
|
|
|
2010-01-11 11:47:11 +01:00
|
|
|
ARCH=emacs
|
|
|
|
|
2011-02-17 05:54:04 +01:00
|
|
|
TAG=cyco
|
|
|
|
OUTPUT=/tmp
|
2011-03-06 15:15:10 +01:00
|
|
|
TMP=${TMP:-/tmp/$TAG}
|
2011-02-17 05:58:04 +01:00
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
2010-01-11 11:47:11 +01:00
|
|
|
|
2011-07-22 08:41:46 +02:00
|
|
|
REPOSITORIES=/home/installs/SlackBuilds/repositories
|
2010-01-11 11:47:11 +01:00
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
|
2011-06-14 17:20:49 +02:00
|
|
|
if [ ! -e $REPOSITORIES/$PRGNAM ] ; then
|
2012-01-24 11:52:53 +01:00
|
|
|
git clone "http://github.com/emacsmirror/emacswiki.org.git" $REPOSITORIES/$PRGNAM
|
2011-06-14 17:20:49 +02:00
|
|
|
else
|
|
|
|
( cd $REPOSITORIES/$PRGNAM
|
2012-01-24 11:52:53 +01:00
|
|
|
git pull
|
2011-06-14 17:20:49 +02:00
|
|
|
)
|
|
|
|
fi
|
2010-01-11 11:47:11 +01:00
|
|
|
|
|
|
|
mkdir -p $PKG/$PREFIX/doc/
|
2012-01-24 11:52:53 +01:00
|
|
|
cd $PKG/$PREFIX/doc/
|
|
|
|
cp -R $REPOSITORIES/$PRGNAM $PRGNAM
|
|
|
|
cd $PRGNAM
|
|
|
|
git checkout master
|
|
|
|
rm -fr .git
|
2010-01-12 08:29:12 +01:00
|
|
|
|
|
|
|
mkdir -p $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM/
|
2012-01-24 11:52:53 +01:00
|
|
|
cd $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM/
|
|
|
|
for el in \
|
|
|
|
"task-timer.el" \
|
|
|
|
"no-word.el" \
|
|
|
|
"quick-jump.el" \
|
|
|
|
"alarm.el" \
|
|
|
|
"lusty-explorer.el" \
|
|
|
|
"palette.el" \
|
|
|
|
"openpaste.el" \
|
|
|
|
"snipplr.el" \
|
|
|
|
"legalese.el" \
|
|
|
|
"workspaces.el" \
|
|
|
|
"auto-complete.el" \
|
|
|
|
"dom.el" \
|
|
|
|
"babel.el" \
|
|
|
|
"cheezburger.el" \
|
|
|
|
"folding.el" \
|
|
|
|
"sunrise-commander.el" \
|
|
|
|
"sunrise-x-buttons.el" \
|
|
|
|
"sunrise-x-checkpoints.el" \
|
|
|
|
"sunrise-x-loop.el" \
|
|
|
|
"sunrise-x-mirror.el" \
|
|
|
|
"sunrise-x-modeline.el" \
|
|
|
|
"sunrise-x-old-checkpoints.el" \
|
|
|
|
"sunrise-x-popviewer.el" \
|
|
|
|
"sunrise-x-tabs.el" \
|
|
|
|
"sunrise-x-tree.el" \
|
|
|
|
"fixme-mode.el" \
|
|
|
|
"work-timer.el" \
|
|
|
|
"showtip.el" \
|
|
|
|
"sdcv.el" \
|
|
|
|
"etxt.el" \
|
|
|
|
"htmlr.el" \
|
|
|
|
"cus-edit+.el" \
|
|
|
|
"newsticker-notify.el" ;
|
|
|
|
do
|
|
|
|
[ -e "$PKG$PREFIX/doc/$PRGNAM/$el" ] && ln -s "$PREFIX/doc/$PRGNAM/$el" "$el" ;
|
|
|
|
done
|
2010-01-11 11:47:11 +01:00
|
|
|
|
2012-01-24 11:52:53 +01:00
|
|
|
cd $PKG
|
|
|
|
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 {} \;
|
2010-01-11 11:48:19 +01:00
|
|
|
|
2012-01-24 11:52:53 +01:00
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
2010-01-11 11:47:11 +01:00
|
|
|
$PRGNAM: $PRGNAM (a local mirror of EmacsWiki)
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM: http://emacswiki.org/
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
EOF
|
|
|
|
|
2011-02-17 05:54:04 +01:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
2010-01-11 11:47:11 +01:00
|
|
|
|