KMess 2.0 is OUT!!
Inviato: dom 26 lug 2009, 23:53
Codice: Seleziona tutto
#!/bin/bash
# SlackBuild Heavily based on Slackware 13.0
# http://kmess.org
# Packager metrofox
# metrofox9@gmail.com
CWD=`pwd`
TMP=${TMP:-/tmp/tgz}
NAME=kmess
PKG=$TMP/package/$NAME
VERSION=2.0
ARCH=${ARCH:-i686}
BUILD=1mfx
SOURCE=http://downloads.sourceforge.net/sourceforge/$NAME/$NAME-$VERSION.tar.gz
# Other useful variables
BLD_PREFIX="/usr"
BLD_DOCDIR="${BLD_PREFIX}/doc"
SLKCHOST="i686"
if [ ! -e $NAME-$VERSION.tar.gz ]; then
wget -c $SOURCE
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O3 -march=i686 -pipe -fomit-frame-pointer"
elif [ "$ARCH" = "athlon64" ]; then
SLKCFLAGS="-O2 -march=athlon64 -pipe"
elif [ "$ARCH" = "athlonxp" ]; then
SLKCFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
fi
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
mkdir -p $PKG
fi
cd $TMP
tar xzvf $CWD/$NAME-$VERSION.tar.gz
echo -e "+ \E[1;34m-------------------------------\E[0;00m +"
echo -e "|\E[5;31m Start SlackBuild $NAME-$VERSION \E[0;00m|"
echo -e "+ \E[1;34m-------------------------------\E[0;00m +"
cd $NAME-$VERSION
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
find . -perm 600 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 400 -exec chmod 644 {} \;
find . -perm 440 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 511 -exec chmod 755 {} \;
find . -perm 711 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
chown -R root:root .
# Running cmake...
cmake \
-DCMAKE_BUILD_TYPE="${SLKCHOST}" \
-DCMAKE_CXX_FLAGS="${SLKCFLAGS}" \
-DCMAKE_C_FLAGS="${SLKCFLAGS}" \
-DCMAKE_MODULE_LINKER_FLAGS="${SLKLDFLAGS}" \
-DCMAKE_INSTALL_PREFIX="${BLD_PREFIX}" \
.
# ccmake .
# Compilation
make || exit 1
make install DESTDIR=$PKG || exit 1
mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a AUTHORS COPYING ChangeLog FEATURES INSTALL NEWS README TODO $PKG/usr/doc/$NAME-$VERSION
( 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 . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null
)
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
cd $PKG
# requiredbuilder -y -v -s $CWD $PKG
makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz
echo -e "+ \E[1;34m-------------------------------\E[0;00m +"
echo -e "|\E[5;31m Pacchetto creato con successo! \E[0;00m|"
echo -e "+ \E[1;34m-------------------------------\E[0;00m +"
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP
fiCodice: Seleziona tutto
# 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--------------------------------------------------------|
kmess: Kmess (MSN Messenger client)
kmess:
kmess: KMess is a MSN Messenger client for Linux. It enables Linux users to
kmess: chat with friends online who are using MSN Messenger in Windows or Mac
kmess: OS. The strength of KMess is it's integration with the KDE desktop
kmess: environment, focus on MSN Messenger specific features and an easy-to-use
kmess: interface.
kmess:
kmess: Homepage:
kmess: http://kmess.org
kmess: