81 lines
1.6 KiB
Text
81 lines
1.6 KiB
Text
|
#!/bin/sh -x
|
|||
|
|
|||
|
# variables
|
|||
|
TAG=cyco
|
|||
|
TMP=/tmp/$TAG
|
|||
|
CWD=$(pwd)
|
|||
|
OUTPUT=/tmp
|
|||
|
|
|||
|
PRGNAM=$(basename $CWD)
|
|||
|
PKG=$TMP/pkg-$PRGNAM
|
|||
|
|
|||
|
BRANCH=${BRANCH:-stable}
|
|||
|
VERSION=${BRANCH}_$(date +%Y.%m.%d_%H.%M)
|
|||
|
|
|||
|
DOCS="AUTHORS COPYING ChangeLog INSTALL README"
|
|||
|
|
|||
|
ARCH=$(uname -m)
|
|||
|
BUILD=1
|
|||
|
|
|||
|
PREFIX=/usr
|
|||
|
|
|||
|
SLCKFLAGS="-fPIC -O2"
|
|||
|
|
|||
|
REPOSITORIES=/home/installs/SlackBuilds/repositories
|
|||
|
# nettoyage pr<70>alable
|
|||
|
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
|||
|
|
|||
|
mkdir -p $PKG
|
|||
|
|
|||
|
# mise en place
|
|||
|
cd $TMP
|
|||
|
if [ ! -e $REPOSITORIES/$PRGNAM ] ; then
|
|||
|
git clone git://git.symlink.me/pub/weboob/$BRANCH.git $REPOSITORIES/${PRGNAM}-$BRANCH
|
|||
|
else
|
|||
|
( cd $REPOSITORIES/${PRGNAM}-$BRANCH
|
|||
|
git pull
|
|||
|
)
|
|||
|
fi
|
|||
|
cp -R $REPOSITORIES/${PRGNAM}-$BRANCH $TMP/$PRGNAM-$VERSION
|
|||
|
cd $TMP/$PRGNAM-$VERSION
|
|||
|
|
|||
|
# installation
|
|||
|
python ./setup.py install --root=$PKG
|
|||
|
|
|||
|
mv $PKG/usr/share/man $PKG/usr/
|
|||
|
|
|||
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|||
|
cp -R $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
|
|||
|
|
|||
|
# correction
|
|||
|
cd $PKG
|
|||
|
chown -R root:root *
|
|||
|
|
|||
|
# Compress man pages
|
|||
|
( cd $PKG/usr/man
|
|||
|
find . -type f -exec gzip -9 {} \;
|
|||
|
for i in $( find . -type l ) ; do
|
|||
|
ln -s $( readlink $i ).gz $i.gz ; rm $i
|
|||
|
done
|
|||
|
)
|
|||
|
|
|||
|
# embaumement
|
|||
|
mkdir -p $PKG/install
|
|||
|
cat <<EOF > $PKG/install/slack-desc
|
|||
|
$PRGNAM: $PRGNAM (WEB Outside Of Browsers)
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM: Weboob is a collection of applications able to interact with websites,
|
|||
|
$PRGNAM: without requiring the user to open them in a browser. It also provides
|
|||
|
$PRGNAM: well-defined APIs to talk to websites lacking one.
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM:
|
|||
|
$PRGNAM: http://weboob.org/
|
|||
|
$PRGNAM:
|
|||
|
EOF
|
|||
|
|
|||
|
# empaquetage
|
|||
|
cd $PKG
|
|||
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz
|