72 lines
2.1 KiB
Text
72 lines
2.1 KiB
Text
|
#!/bin/sh -x
|
||
|
|
||
|
# variables
|
||
|
VERSION=1.3
|
||
|
BUILD=1
|
||
|
PACKAGER=cyco
|
||
|
|
||
|
TMP=/tmp
|
||
|
CWD=$(pwd)
|
||
|
|
||
|
PRGNAM=$(basename $CWD)
|
||
|
PKG=$TMP/$PACKAGER/pkg-$PRGNAM
|
||
|
|
||
|
ARCH=$(uname -m)
|
||
|
|
||
|
PREFIX=/usr
|
||
|
PYTHON_SITE_PACKAGES=$PREFIX/lib$(echo $ARCH | grep -o 64)/python$(python --version 2>&1 | grep -o "[0-9]\.[0-9]")/site-packages
|
||
|
|
||
|
# nettoyage préalable
|
||
|
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
||
|
|
||
|
mkdir -p $PKG$PYTHON_SITE_PACKAGES $PKG$PREFIX/doc/$PRGNAM
|
||
|
|
||
|
# mise en place
|
||
|
cd $TMP
|
||
|
[ ! -e $CWD/$PRGNAM-$VERSION.zip ] && wget -c http://www.cityinabottle.org/media/download/$PRGNAM-$VERSION.zip -O $CWD/$PRGNAM-$VERSION.zip
|
||
|
|
||
|
unzip $CWD/$PRGNAM-$VERSION.zip
|
||
|
( cd $TMP/$PRGNAM-$VERSION
|
||
|
cp -R examples $PKG$PREFIX/doc/$PRGNAM
|
||
|
( cd nodebox/ext
|
||
|
python setup.py build
|
||
|
)
|
||
|
echo $ARCH | grep -q "^i.86$" && ( cd nodebox/ext/psyco/src ; python setup.py build )
|
||
|
cp -R nodebox $PKG$PYTHON_SITE_PACKAGES
|
||
|
)
|
||
|
|
||
|
# 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 (2D animation library for Python)
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: NodeBox for OpenGL is a free, cross-platform library for generating
|
||
|
$PRGNAM: 2D animations with Python programming code. It is built on Pyglet
|
||
|
$PRGNAM: and adopts the drawing API from NodeBox for Mac OS X
|
||
|
$PRGNAM: (http://nodebox.net). It has built-in support for paths, layers,
|
||
|
$PRGNAM: motion tweening, hardware-accelerated image effects, simple physics
|
||
|
$PRGNAM: and interactivity.
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: http://www.cityinabottle.org/nodebox/
|
||
|
$PRGNAM:
|
||
|
EOF
|
||
|
|
||
|
# empaquetage
|
||
|
cd $PKG
|
||
|
makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz
|