2021-06-15 10:26:26 +02:00
|
|
|
#!/bin/bash
|
2018-09-03 15:34:06 +02:00
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=$(basename $CWD)
|
2021-09-23 15:52:55 +02:00
|
|
|
GITHUB_REPO=espressif/esptool
|
2022-01-22 10:52:07 +01:00
|
|
|
VERSION=${VERSION:-latest}
|
2018-09-03 15:34:06 +02:00
|
|
|
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
|
2024-11-18 09:55:36 +01:00
|
|
|
REPOSITORY=/var/cache/SlackBuilds.gwh/$PRGNAM
|
2018-09-03 15:34:06 +02:00
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
rm -fr $PKG $TMP/$PRGNAM
|
|
|
|
mkdir -p $TMP
|
|
|
|
|
|
|
|
# mise en place
|
2021-09-23 15:52:55 +02:00
|
|
|
[ ! -e $REPOSITORY ] && git clone https://github.com/${GITHUB_REPO}.git $REPOSITORY
|
2021-06-15 10:59:49 +02:00
|
|
|
cd $REPOSITORY
|
|
|
|
git pull --all
|
2018-09-03 15:34:06 +02:00
|
|
|
|
|
|
|
cp -R $REPOSITORY $TMP/$PRGNAM
|
|
|
|
cd $TMP/$PRGNAM
|
2024-05-27 07:53:51 +02:00
|
|
|
[ "x$VERSION" == "xlatest" ] && VERSION=$(git tag --sort=-version:refname | head -n1)
|
2022-01-22 10:52:07 +01:00
|
|
|
[ "x$VERSION" == "x" ] && VERSION=trunk
|
2023-03-23 09:54:21 +01:00
|
|
|
[ "x$VERSION" == "xtrunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" || git checkout $VERSION
|
2018-09-03 15:34:06 +02:00
|
|
|
|
|
|
|
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:
|
2021-09-23 15:52:55 +02:00
|
|
|
$PRGNAM: https://github.com/${GITHUB_REPO}
|
2018-09-03 15:34:06 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
2023-08-16 12:23:26 +02:00
|
|
|
/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$TAG.txz
|