slackbuilds/ap/likwid/likwid.SlackBuild
Gwenhael Le moine 2daabaae02 OUTPUT
2011-01-15 11:21:25 +07:00

74 lines
1.7 KiB
Bash
Executable file

#!/bin/sh -x
# variables
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
PACKAGER=cyco
TMP=/tmp/$PACKAGER/
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
ARCH=$(uname -m)
REPOSITORY=/home/cycojesus/projets/packages/repositories/$PRGNAM
PREFIX=/usr
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $PKG
# mise en place
cd $TMP
if [ ! -e $REPOSITORY ] ; then
mkdir -p $(dirname $REPOSITORY)
hg clone https://likwid.googlecode.com/hg/ $REPOSITORY
else
( cd $REPOSITORY
hg pull -u
)
fi
cp -R $REPOSITORY $TMP/
cd $TMP/$PRGNAM
sed -i 's|/usr/local|/usr|' config.mk
make
make install PREFIX=$PKG$PREFIX
# correction
cd $PKG
chown -R root:root *
find $PKG$PREFIX/man -name "*.?" -type f -exec gzip -9 {} \;
# 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 (lightweight messaging kernel)
$PRGNAM:
$PRGNAM: Likwid stands for 'Like I knew what I am doing'.
$PRGNAM: This project contributes easy to use command line tools for Linux
$PRGNAM: to support programmers in developing high performance multi threaded
$PRGNAM: programs.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://code.google.com/p/likwid/
$PRGNAM:
EOF
# empaquetage
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz