2010-04-13 06:44:15 +02:00
|
|
|
|
#!/bin/sh -x
|
|
|
|
|
|
|
|
|
|
# variables
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
|
|
|
|
|
APP_NAME=$(basename $CWD)
|
|
|
|
|
VERSION=1.11b
|
|
|
|
|
ARCH=$(uname -m)
|
2010-04-14 09:54:38 +02:00
|
|
|
|
BUILD=1
|
|
|
|
|
PACKAGER=cyco
|
|
|
|
|
|
|
|
|
|
TMP=/tmp/$PACKAGER
|
|
|
|
|
PKG=$TMP/pkg-$APP_NAME
|
2010-04-13 06:44:15 +02:00
|
|
|
|
|
|
|
|
|
PREFIX=/usr
|
2010-04-14 09:55:36 +02:00
|
|
|
|
DOCS="ABOUT-NLS AUTHORS ChangeLog COPYING* INSTALL NEWS README THANKS TODO"
|
2010-04-13 06:44:15 +02:00
|
|
|
|
|
2010-04-14 09:54:38 +02:00
|
|
|
|
SLCKFLAGS="-O2"
|
2010-04-13 06:44:15 +02:00
|
|
|
|
case $ARCH in
|
|
|
|
|
"x86_64")
|
2010-04-14 09:54:38 +02:00
|
|
|
|
SLCKFLAGS="$SLCKFLAGS -fPIC"
|
2010-04-13 06:44:15 +02:00
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
# nettoyage pr<70>alable
|
|
|
|
|
rm -fr $PKG $TMP/$APP_NAME-$VERSION
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG
|
|
|
|
|
|
|
|
|
|
# mise en place
|
2010-04-14 09:54:38 +02:00
|
|
|
|
( cd $TMP
|
|
|
|
|
[ ! -e $CWD/$APP_NAME-$VERSION.tar.?z* ] && \
|
|
|
|
|
wget -c http://mirror.cinquix.com/pub/savannah/eliot/releases/$APP_NAME-$VERSION.tar.gz \
|
|
|
|
|
-O $CWD/$APP_NAME-$VERSION.tar.gz
|
|
|
|
|
tar xf $CWD/$APP_NAME-$VERSION.tar.?z*
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
( cd $TMP/$APP_NAME-$VERSION
|
|
|
|
|
# configuration
|
|
|
|
|
CFLAGS=$SLCKFLAGS \
|
|
|
|
|
CPPFLAGS=$SLCKFLAGS \
|
|
|
|
|
./configure \
|
|
|
|
|
--prefix=$PREFIX \
|
2010-04-14 09:57:43 +02:00
|
|
|
|
--mandir=$PREFIX/man \
|
|
|
|
|
--infodir=$PREFIX/info \
|
2010-04-14 09:54:38 +02:00
|
|
|
|
--libdir=$PREFIX/lib$(echo $ARCH | grep -o 64)
|
|
|
|
|
|
|
|
|
|
# just close your eyes and let's pretend these don't exist
|
|
|
|
|
sed -i 's|-lreadline|-lncursesw -lreadline|g' $(find . -name Makefile)
|
|
|
|
|
echo "$ARCH" | grep -q 64 && \
|
2010-04-13 06:44:15 +02:00
|
|
|
|
sed -i 's|/usr/lib[^6]|/usr/lib64 |g' $(find . -name Makefile)
|
2010-04-14 09:54:38 +02:00
|
|
|
|
for m in qt/*.moc.cpp ; do
|
|
|
|
|
mv $m $m.bkp ;
|
|
|
|
|
moc ${m%moc.cpp}h > $m ;
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# compilation
|
|
|
|
|
make -j3 PREFIX=$PREFIX
|
|
|
|
|
|
|
|
|
|
# installation
|
|
|
|
|
make install DESTDIR=$PKG
|
|
|
|
|
|
|
|
|
|
# dictionaries
|
|
|
|
|
DICOS="ods5.dawg twl06.dawg sowpods06.dawg"
|
|
|
|
|
mkdir -p $PKG$PREFIX/share/$APP_NAME
|
|
|
|
|
for d in $DICOS ; do
|
|
|
|
|
[ ! -e $CWD/$d ] && \
|
|
|
|
|
wget -c http://dl.sv.nongnu.org/releases/eliot/dict/$d -O $CWD/$d
|
|
|
|
|
cp $CWD/$d $PKG$PREFIX/share/$APP_NAME/
|
|
|
|
|
done
|
|
|
|
|
)
|
2010-04-13 06:53:52 +02:00
|
|
|
|
|
2010-04-13 06:44:15 +02:00
|
|
|
|
# correction
|
2010-04-14 09:54:38 +02:00
|
|
|
|
chown -R root:root $PKG/*
|
2010-04-13 06:44:15 +02:00
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$APP_NAME-$VERSION
|
2010-04-14 09:54:38 +02:00
|
|
|
|
( cd $TMP/$APP_NAME-$VERSION
|
|
|
|
|
cp -R $DOCS $PKG/usr/doc/$APP_NAME-$VERSION
|
|
|
|
|
)
|
2010-04-13 06:44:15 +02:00
|
|
|
|
|
|
|
|
|
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
|
|
|
|
|
[ -d $PKG/usr/info ] && find $PKG/usr/info -type f -name "*.info*" -exec gzip -9f {} \;
|
|
|
|
|
[ -d $PKG/usr/info ] && rm $PKG/usr/info/dir
|
|
|
|
|
|
|
|
|
|
# Strip binaries
|
2010-04-14 09:57:43 +02:00
|
|
|
|
find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
|
|
|
|
find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
2010-04-13 06:44:15 +02:00
|
|
|
|
|
|
|
|
|
# embaumement
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
|
|
|
|
$APP_NAME: $APP_NAME (Free Scrabble game)
|
|
|
|
|
$APP_NAME:
|
|
|
|
|
$APP_NAME: Eliot is an open source Scrabble game, freely available under the GNU GPL license.
|
2010-04-14 09:54:38 +02:00
|
|
|
|
$APP_NAME:
|
2010-04-13 06:56:21 +02:00
|
|
|
|
$APP_NAME: Dictionaries are installed in $PREFIX/share/$APP_NAME
|
2010-04-14 09:54:38 +02:00
|
|
|
|
$APP_NAME:
|
|
|
|
|
$APP_NAME:
|
|
|
|
|
$APP_NAME:
|
2010-04-13 06:44:15 +02:00
|
|
|
|
$APP_NAME:
|
|
|
|
|
$APP_NAME: http://www.nongnu.org/eliot/en/index.html
|
|
|
|
|
$APP_NAME:
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
# empaquetage
|
2010-04-14 09:54:38 +02:00
|
|
|
|
( cd $PKG
|
2010-04-14 10:00:44 +02:00
|
|
|
|
makepkg -l y -c n $TMP/$APP_NAME-$(echo $VERSION | tr -d -)-$ARCH-$BUILD$PACKAGER.txz
|
2010-04-14 09:54:38 +02:00
|
|
|
|
)
|