62 lines
1.2 KiB
Text
62 lines
1.2 KiB
Text
|
#!/bin/sh
|
||
|
|
||
|
CWD=$(pwd)
|
||
|
|
||
|
PRGNAM=$(basename $CWD)
|
||
|
VERSION=git$(date +"%Y.%m.%d_%H.%M")
|
||
|
BUILD=1
|
||
|
PACKAGER=cyco
|
||
|
ARCH=$(uname -m)
|
||
|
|
||
|
REPOSITORIES=/home/cycojesus/projets/packages/repositories
|
||
|
|
||
|
TMP=/tmp/$PACKAGER
|
||
|
PKG=$TMP/pkg-$PRGNAM
|
||
|
OUTPUT=/tmp
|
||
|
|
||
|
PREFIX=/usr
|
||
|
|
||
|
# cleaning
|
||
|
rm -fr $PKG
|
||
|
|
||
|
# get sources
|
||
|
[ ! -e $REPOSITORIES ] && mkdir -p $REPOSITORIES
|
||
|
( cd $REPOSITORIES
|
||
|
if [ -e $REPOSITORIES/$PRGNAM ] ; then
|
||
|
( cd $REPOSITORIES/$PRGNAM
|
||
|
git pull
|
||
|
)
|
||
|
else
|
||
|
git clone git://github.com/perl6/book.git $REPOSITORIES/$PRGNAM
|
||
|
fi
|
||
|
)
|
||
|
|
||
|
mkdir -p $PKG$PREFIX/doc/
|
||
|
cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/doc/$PRGNAM
|
||
|
find $PKG$PREFIX/doc/$PRGNAM -name \.git\* -exec rm -fr {} \;
|
||
|
|
||
|
( cd $PKG$PREFIX/doc/$PRGNAM
|
||
|
make
|
||
|
)
|
||
|
|
||
|
( cd $PKG
|
||
|
mkdir -p install
|
||
|
cat <<EOF > install/slack-desc
|
||
|
$PRGNAM: $PRGNAM (a book about Perl 6)
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: It will be some kind of example-driven introduction to Perl 6, and at
|
||
|
$PRGNAM: the same time showing off the reasons why we love that language.
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: http://github.com/perl6/book
|
||
|
$PRGNAM:
|
||
|
EOF
|
||
|
|
||
|
chown -R root:root *
|
||
|
|
||
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz
|
||
|
)
|