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