2021-06-15 10:26:26 +02:00
|
|
|
#!/bin/bash
|
2018-09-03 15:34:06 +02:00
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
|
|
VERSION=$(date +%F | tr - .)
|
|
|
|
BUILD=1
|
|
|
|
|
|
|
|
ARCH=noarch
|
|
|
|
|
2020-06-25 11:23:11 +02:00
|
|
|
HOME=/home/gwh
|
|
|
|
TAG=gwh
|
2018-09-03 15:34:06 +02:00
|
|
|
OUTPUT=/tmp
|
|
|
|
TMP=/tmp/$TAG
|
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
rm -fr $PKG $TMP/$PRGNAM
|
|
|
|
mkdir -p $TMP
|
|
|
|
|
|
|
|
# mise en place
|
|
|
|
[ ! -e $REPOSITORY ] && git clone https://github.com/espressif/esptool.git $REPOSITORY
|
|
|
|
( cd $REPOSITORY && git pull )
|
2021-04-08 13:42:40 +02:00
|
|
|
VERSION="git_$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
|
2018-09-03 15:34:06 +02:00
|
|
|
|
|
|
|
cp -R $REPOSITORY $TMP/$PRGNAM
|
|
|
|
|
|
|
|
cd $TMP/$PRGNAM
|
|
|
|
|
|
|
|
python setup.py install --root $PKG
|
|
|
|
|
|
|
|
python3 setup.py install --root $PKG
|
|
|
|
|
|
|
|
VERSION=$(ls /usr/lib$(uname -m | grep -o 64)/python*/site-packages/| grep "$PRGNAM-.*-py.*\.egg-info" | grep -o "[0-9.]*" | head -n1)_$VERSION
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
|
|
$PRGNAM: $PRGNAM (ESP8266 and ESP32 serial bootloader utility)
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM: A Python-based, open source, platform independent, utility to
|
|
|
|
$PRGNAM: communicate with the ROM bootloader in Espressif ESP8266 & ESP32
|
|
|
|
$PRGNAM: chips.
|
2020-09-07 16:53:00 +02:00
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
2018-09-03 15:34:06 +02:00
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM: https://github.com/espressif/esptool
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
2020-07-12 09:22:26 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$TAG.txz
|