reinstate cboard

Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
Gwenhael Le Moine 2013-07-07 16:27:19 +02:00
parent e08ddc723a
commit 86ca9416fe
2 changed files with 52 additions and 73 deletions

View file

@ -4,8 +4,7 @@ set -x
CWD=$(pwd)
PRGNAM=$(basename $CWD)
#VERSION=master_$(date +"%Y.%m.%d_%H.%M")
VERSION=0.7.0
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
@ -22,92 +21,73 @@ REPOSITORIES=/home/installs/SlackBuilds/repositories/
PREFIX=/usr
# Cleaning
( cd $TMP
rm -fr $PRGNAM-$VERSION
rm -fr $PKG
)
cd $TMP
rm -fr $PRGNAM-$VERSION
rm -fr $PKG
# Fetching sources
( cd $TMP
# if [ ! -e $REPOSITORIES/$PRGNAM ] ; then
# mkdir -p $REPOSITORIES
# cd $REPOSITORIES
# git clone http://github.com/earl/gforth-mirror.git $PRGNAM
# fi
# ( cd $REPOSITORIES/$PRGNAM
# git pull
# )
# cp -R $REPOSITORIES/$PRGNAM $TMP/$PRGNAM-$VERSION
[ ! -e $CWD/$PRGNAM-$VERSION.tar.?z* ] && \
wget -c http://www.complang.tuwien.ac.at/forth/gforth/$PRGNAM-$VERSION.tar.gz -O $CWD/$PRGNAM-$VERSION.tar.gz
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
)
if [ ! -e $REPOSITORIES/$PRGNAM ] ; then
git clone git://git.savannah.gnu.org/gforth.git $REPOSITORIES/$PRGNAM
else
( cd $REPOSITORIES/$PRGNAM
git pull
)
fi
cp -R $REPOSITORIES/$PRGNAM $TMP/$PRGNAM-$VERSION
# Preparation
( cd $TMP/$PRGNAM-$VERSION
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 {} \;
)
cd $TMP/$PRGNAM-$VERSION
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 {} \;
# Configuration
( cd $TMP/$PRGNAM-$VERSION
# VERSION=$(grep -o "AC_INIT(\[gforth\],\[[0-9\.]*-[0-9]*\]" configure.in | sed 's|AC_INIT([gforth],[||' | sed 's|]||')
sed -i "s|lib/|lib$LIBSUFFIX/|g" $(grep -l "lib/" * -r)
[ ! -e configure ] && ./autogen.sh #autoreconf
./configure \
--prefix=$PREFIX \
--mandir=$PREFIX/man \
--infodir=$PREFIX/info \
--libdir=$PREFIX/lib$LIBSUFFIX \
--libexecdir=$PREFIX/libexec
)
#sed -i "s|lib/|lib$LIBSUFFIX/|g" $(grep -l "lib/" * -r)
[ ! -e configure ] && ./autogen.sh #autoreconf
./configure \
--prefix=$PREFIX \
--mandir=$PREFIX/man \
--infodir=$PREFIX/info \
--libdir=$PREFIX/lib$LIBSUFFIX \
--libexecdir=$PREFIX/libexec
# Building
( cd $TMP/$PRGNAM-$VERSION
make libdir=$PREFIX/lib$LIBSUFFIX
make libdir=$PREFIX/lib$LIBSUFFIX doc
make libdir=$PREFIX/lib$LIBSUFFIX more
)
make libdir=$PREFIX/lib$LIBSUFFIX
#make libdir=$PREFIX/lib$LIBSUFFIX doc
#make libdir=$PREFIX/lib$LIBSUFFIX more
# Installation
( cd $TMP/$PRGNAM-$VERSION
make install install.TAGS DESTDIR=$PKG
#make install install.TAGS DESTDIR=$PKG
make install DESTDIR=$PKG
mkdir -p $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
cp gforth.el* $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
mkdir -p $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
cp gforth.el* $PKG$PREFIX/share/emacs/site-lisp/$PRGNAM
mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp -R doc/*.{dvi,ps,pdf,txt} doc/gforth doc/vmgen AUTHORS BUGS COPYING* ChangeLog INSTALL* NEWS* README* TAGS ToDo $PKG$PREFIX/doc/$PRGNAM
)
# mkdir -p $PKG$PREFIX/doc/$PRGNAM
# cp -R doc/*.{dvi,ps,pdf,txt} doc/gforth doc/vmgen AUTHORS BUGS COPYING* ChangeLog INSTALL* NEWS* README* TAGS ToDo $PKG$PREFIX/doc/$PRGNAM
# Cleaning
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find $PKG$PREFIX/man -type f -name "*.?" -exec gzip -9 {} \;
find $PKG$PREFIX/info -name "dir" -exec rm {} \;
find $PKG$PREFIX/info -type f -exec gzip -9 {} \;
find $PKG$PREFIX/man -type f -name "*.?" -exec gzip -9 {} \;
find $PKG$PREFIX/info -name "dir" -exec rm {} \;
find $PKG$PREFIX/info -type f -exec gzip -9 {} \;
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 {} \;
)
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 {} \;
# Packaging
( cd $PKG
mkdir install
cat <<EOF > $PKG/install/doinst.sh
mkdir install
cat <<EOF > $PKG/install/doinst.sh
cd /usr/info
[ -e dir ] && rm dir
[ -e dir.gz ] && rm dir.gz
@ -118,7 +98,7 @@ do
done
EOF
cat <<EOF > $PKG/install/slack-desc
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (programming language)
$PRGNAM:
$PRGNAM: Gforth is a fast and portable implementation of the ANS Forth language.
@ -132,6 +112,5 @@ $PRGNAM: http://www.gnu.org/software/gforth
$PRGNAM:
EOF
makepkg -l n -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr -d '-')-$ARCH-$BUILD$TAG.txz
)
makepkg -l n -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr -d '-')-$ARCH-$BUILD$TAG.txz