Add weboob

This commit is contained in:
Gwenhael Le Moine 2020-06-25 11:11:27 +02:00
parent 4bcd99d316
commit 87a7beb1e5
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 70 additions and 0 deletions

1
.gitignore vendored
View file

@ -39,3 +39,4 @@ xap/st/patches/st-vertcenter*
*.pk4
/xap/android-x86/android-8.1-r1/
/xap/android-x86/usr
/y/minecraft-launcher/minecraft-launcher.svg

69
ap/weboob/SlackBuild Executable file
View file

@ -0,0 +1,69 @@
#!/bin/sh
# variables
TAG=cyco
TMP=/tmp/$TAG
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
ARCH=$(uname -m)
BUILD=1
PREFIX=/usr
SLCKFLAGS="-fPIC -O2"
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $PKG
# mise en place
[ ! -e $REPOSITORY ] && git clone https://git.weboob.org/weboob/weboob.git $REPOSITORY
( cd $REPOSITORY && git pull )
cp -R $REPOSITORY $TMP/$PRGNAM
cd $TMP/$PRGNAM
VERSION="$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)"
# installation
./tools/local_install.sh $PKG$PREFIX/bin
# avoid overwriting existing binaries
( cd $PKG$PREFIX/bin
for b in *; do
[ -e $PREFIX/bin/$b ] && mv $b ${PRGNAM}_$b
done
)
mkdir -p $PKG/usr/doc/$PRGNAM
cp -R AUTHORS CONTRIBUTING.md COPYING COPYING.LESSER ChangeLog INSTALL README.md $PKG/usr/doc/$PRGNAM
# correction
cd $PKG
chown -R root:root *
# 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
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz