2010-04-26 04:16:44 +02:00
|
|
|
#!/bin/sh -x
|
|
|
|
|
|
|
|
# variables
|
|
|
|
VERSION=20100318142033 #$(date +"%Y%m%d")
|
|
|
|
BUILD=1
|
|
|
|
|
2011-02-17 05:54:04 +01:00
|
|
|
|
|
|
|
TAG=cyco
|
|
|
|
OUTPUT=/tmp
|
2011-02-17 05:58:04 +01:00
|
|
|
TMP=/tmp/$TAG
|
2010-04-26 04:16:44 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
|
2011-02-17 05:19:56 +01:00
|
|
|
PRGNAM=$(basename $CWD)
|
2011-02-17 05:58:04 +01:00
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
2010-04-26 04:16:44 +02:00
|
|
|
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
# nettoyage préalable
|
2011-02-17 05:19:56 +01:00
|
|
|
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
2010-04-26 04:16:44 +02:00
|
|
|
|
2011-02-17 05:19:56 +01:00
|
|
|
mkdir -p $PKG$PREFIX/doc/$PRGNAM
|
2010-04-26 04:16:44 +02:00
|
|
|
|
|
|
|
# mise en place
|
|
|
|
( cd $CWD
|
2011-02-17 05:19:56 +01:00
|
|
|
[ ! -e $PRGNAM-src-$VERSION.tar.gz ] && wget -c http://www.$PRGNAM-scm.org/download/$PRGNAM-src-$VERSION.tar.gz
|
2010-04-26 04:16:44 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
( cd $TMP
|
2011-02-17 05:19:56 +01:00
|
|
|
tar xf $CWD/$PRGNAM-src-$VERSION.tar.gz
|
|
|
|
mv $PRGNAM-src-$VERSION $PRGNAM-$VERSION
|
|
|
|
cd $PRGNAM-$VERSION
|
2010-04-26 04:16:44 +02:00
|
|
|
|
|
|
|
make
|
|
|
|
|
|
|
|
mkdir -p $PKG$PREFIX/bin $PKG$PREFIX/doc/
|
2011-02-17 05:19:56 +01:00
|
|
|
mv $PRGNAM $PKG$PREFIX/bin
|
|
|
|
cp -R www $PKG$PREFIX/doc/$PRGNAM
|
2010-04-26 04:16:44 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# correction
|
|
|
|
( cd $PKGl
|
|
|
|
chown -R root:root *
|
|
|
|
)
|
|
|
|
|
|
|
|
# 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------------------------------------------------------|
|
2011-02-17 05:19:56 +01:00
|
|
|
$PRGNAM: $PRGNAM (distributed software configuration management)
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM: Simple, high-reliability, distributed software configuration management
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM: http://www.fossil-scm.org
|
|
|
|
$PRGNAM:
|
2010-04-26 04:16:44 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
# empaquetage
|
|
|
|
cd $PKG
|
2011-02-17 05:54:04 +01:00
|
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|