92 lines
2.3 KiB
Text
92 lines
2.3 KiB
Text
|
#!/bin/sh -x
|
||
|
|
||
|
# variables
|
||
|
VERSION=svn_$(date +"%Y.%m.%d_%H.%M")
|
||
|
BUILD=1
|
||
|
PACKAGER=cyco
|
||
|
|
||
|
TMP=/tmp
|
||
|
CWD=$(pwd)
|
||
|
|
||
|
PRGNAM=$(basename $CWD)
|
||
|
PKG=$TMP/$PACKAGER/pkg-$PRGNAM
|
||
|
|
||
|
ARCH=$(uname -m)
|
||
|
|
||
|
if [ "$ARCH" = "i486" ]; then
|
||
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||
|
LIBDIRSUFFIX=""
|
||
|
elif [ "$ARCH" = "i686" ]; then
|
||
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||
|
LIBDIRSUFFIX=""
|
||
|
elif [ "$ARCH" = "s390" ]; then
|
||
|
SLKCFLAGS="-O2"
|
||
|
LIBDIRSUFFIX=""
|
||
|
elif [ "$ARCH" = "x86_64" ]; then
|
||
|
SLKCFLAGS="-O2 -fPIC"
|
||
|
LIBDIRSUFFIX="64"
|
||
|
fi
|
||
|
|
||
|
REPOSITORY=/home/cycojesus/projets/packages/repositories/$PRGNAM
|
||
|
PREFIX=/usr
|
||
|
|
||
|
# nettoyage préalable
|
||
|
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
||
|
|
||
|
mkdir -p $PKG
|
||
|
|
||
|
# mise en place
|
||
|
cd $TMP
|
||
|
if [ ! -e $REPOSITORY ] ; then
|
||
|
mkdir -p $(dirname $REPOSITORY)
|
||
|
cd $(dirname $REPOSITORY)
|
||
|
svn checkout http://ffl.googlecode.com/svn/trunk/ $PRGNAM
|
||
|
fi
|
||
|
|
||
|
( cd $REPOSITORY
|
||
|
svn update
|
||
|
)
|
||
|
|
||
|
mkdir -p \
|
||
|
$PKG$PREFIX/lib${LIBDIRSUFFIX}/gforth/site-forth/ \
|
||
|
$PKG$PREFIX/doc/$PRGNAM
|
||
|
cp -R $REPOSITORY/ffl $PKG$PREFIX/lib${LIBDIRSUFFIX}/gforth/site-forth/
|
||
|
cp -R $REPOSITORY/{AUTHORS,COPYING,NEWS,README,dist,ChangeLog,examples,engines,html,test,tex} $PKG$PREFIX/doc/$PRGNAM
|
||
|
|
||
|
# correction
|
||
|
( cd $PKG
|
||
|
chown -R root:root *
|
||
|
|
||
|
[ -d $PKG$PREFIX/man ] && find $PKG$PREFIX/man -type f -name "*.?" -exec gzip -9f {} \;
|
||
|
[ -d $PKG$PREFIX/info ] && find $PKG$PREFIX/info -type f -name "*" -exec gzip -9f {} \;
|
||
|
|
||
|
)
|
||
|
|
||
|
# 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 (A general purpose Forth library)
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: The Forth Foundation Library (FFL) is a general purpose forth library.
|
||
|
$PRGNAM: Its main purpose is to make it easier to develop applications.
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: https://code.google.com/p/ffl/
|
||
|
$PRGNAM:
|
||
|
EOF
|
||
|
|
||
|
# empaquetage
|
||
|
cd $PKG
|
||
|
makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz
|