adafruit-libraries: update all subpackages

- add script for automatic update
- fix build of DHT package
This commit is contained in:
Sascha Kuehndel (InuSasha) 2017-06-10 22:58:44 +02:00
parent 3238f4da71
commit bc55354c11
No known key found for this signature in database
GPG Key ID: 15FED89617B88D1B
19 changed files with 169 additions and 42 deletions

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_ADS1x15"
PKG_VERSION="733d179"
PKG_SHA256="968645f53eaa1333d4c48200d0c4ef602ee0bcdd611f13820aa5451d53bac98e"
PKG_VERSION="a963cc0"
PKG_SHA256="2f81a9a6b7b7f46b79faa5b01df0c25fa5f16af80842d74e35b5fbf01ab0c619"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_ADXL345"
PKG_VERSION="b153663"
PKG_SHA256="0997039fe3e3a6c278e7f656f9afbd41aa2e1298fa77598c9cf1f2ea5addade8"
PKG_VERSION="dca3d90"
PKG_SHA256="22ec0fc6679cc3e9b5f0aff5cfeef34cbbf13e59aecfb829c2f0dc2d90b5fb8b"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_BMP"
PKG_VERSION="ad6521d"
PKG_SHA256="5dc54964630f4154061152f72e3468ce9c37ca388db6629db0a84c77e64da824"
PKG_VERSION="4e89e32"
PKG_SHA256="3577cf738f7da2373efc86b638b5e6a6227f93c661dac72db95a54dfda2d7069"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_CharLCD"
PKG_VERSION="e5952eb"
PKG_SHA256="6faeebde822851f70546a90ca2ed5dee4d6fa21eed152de761f5a4352678c2a2"
PKG_VERSION="f5a43f9"
PKG_SHA256="1fd29ecf6b85c88165cc5dc0e71af48272f1b32f8e947663572a12a7f8af5860"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_DHT"
PKG_VERSION="310c59b"
PKG_SHA256="e242cb4b15569b475270118a64a60ba35f653be01848e97a2356591e065af2c4"
PKG_VERSION="da8cddf"
PKG_SHA256="ad5a0ca0d8c99caedd9db5c1015fc40635c5441e3b923a2dfecc27933622af8d"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"
@ -29,22 +29,20 @@ PKG_SHORTDESC="Adafruit Python DHT Library"
PKG_LONGDESC="Python library to read the DHT series of humidity and temperature sensors on a Raspberry Pi or Beaglebone Black."
PKG_AUTORECONF="no"
case $PROJECT in
RPi)
case "$PROJECT:$DEVICE" in
"RPi:RPi")
RPI_VERSION="--force-pi"
;;
RPi2)
"RPi:RPi2")
RPI_VERSION="--force-pi2"
;;
*)
RPI_VERSION=""
esac
pre_make_target() {
export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr"
export LDSHARED="$CC -shared"
sed -e 's/from ez_setup import use_setuptools/\#from ez_setup import use_setuptools/' \
-e 's/use_setuptools()/\#use_setuptools()/' \
-i setup.py
}
make_target() {

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_GPIO"
PKG_VERSION="fdf0fca"
PKG_SHA256="4633a481e562a09b5b7f819ddba874ce6fa8dab9de71b6159ff40769f247c91e"
PKG_VERSION="060f6d6"
PKG_SHA256="f3361a03571ba53e47791a884129f1699ea4a18b8ac104e4c520c795d54b452b"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_LED_Backpack"
PKG_VERSION="d3bd401"
PKG_SHA256="dfeedca860125b06058d89f7079efd331a3d38e56e6fd24f15dc6436c9a7ff92"
PKG_VERSION="ac6e25a"
PKG_SHA256="55e82c45858e6ede604b5e31408e34d1f71c2610ae4a6a595a683e197e083fa2"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_LSM303"
PKG_VERSION="03b344d"
PKG_SHA256="b00d7ad66eb6430169142506b363289bc3fdf5dc7c7d4c61bef3aad4f5b58105"
PKG_VERSION="81bcc12"
PKG_SHA256="f0970c2d7b9e67f7aafc0d5a076065b8cdf617479d696d7e38da8919ee0b69f6"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_MCP3008"
PKG_VERSION="705f090"
PKG_SHA256="d741fe0bd6e80a035a98ab9b055d1bdd44bcea7a43da8fcbee74766d3d6be323"
PKG_VERSION="e721d26"
PKG_SHA256="f5e4c847a87716c16f0209df95c281b5071549644a79a143a77b212f25c464dc"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_MCP4725"
PKG_VERSION="5b5fc87"
PKG_SHA256="7795544489878ef613aff94656cafb5e2d2347bd6a38580d89ffc92bb1fcfea1"
PKG_VERSION="8a30e5e"
PKG_SHA256="83b1e7ff1b2d7c1794b2aedf7d824bd9099bc4068b56ddb83531959ab73602d1"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_PCA9685"
PKG_VERSION="bfa4851"
PKG_SHA256="128af41ef18cf3fc94a92fa4b58bf3bd2deec30a50bd84c64270feabfff775d9"
PKG_VERSION="f86db2c"
PKG_SHA256="46e11dcfbfaab5756ddeb6ab31740cf8c7419ec1d32be2519f19882e7d86e426"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_PureIO"
PKG_VERSION="a29d95a"
PKG_SHA256="f18aee7f95bf57d1dfa19cb2915697e40e6be88b5b988632785be9d0bbb16850"
PKG_VERSION="5e952c2"
PKG_SHA256="53faa8629802fad6e8b7bdc434b6cef5f81cb84541564a193e26f334e5b4aa7d"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_SI1145"
PKG_VERSION="cbc6c62"
PKG_SHA256="d89f33763531958d6043ea3fbd32153479d897eba67c0e64bdb1b881d5e1058c"
PKG_VERSION="18c4006"
PKG_SHA256="0238b2c01cfbb2890ae78468d2fc19c815748fc94860a4eb92b649d074476264"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/THP-JOE/Python_SI1145"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_TCS34725"
PKG_VERSION="4ff05a3"
PKG_SHA256="5aba7ea63416ef87a82188226bee7db5bf83e10ebb91ad12466ac9a15da9b632"
PKG_VERSION="6306f90"
PKG_SHA256="f2c3218551da55d7fdbe2499a6ffa3a0b8ed1709e4402c6b0e0f37b17d4aa81f"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_VCNL40xx"
PKG_VERSION="e54bff9"
PKG_SHA256="3f74c58f898f67bb7d9374ef42f6b545e79f5c3c31f2a68352f23f43bf8e1965"
PKG_VERSION="3c59be5"
PKG_SHA256="7190f880de0cd32852a3cc4c2b627aca1b2c336d33fd7ba5731f73884a1b102d"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="Adafruit_Python_WS2801"
PKG_VERSION="699426a"
PKG_SHA256="3e3b2d36ee848f384c9fe1952b580374f988f9f1b1f95cf6b3cdd6ed9898d910"
PKG_VERSION="d0c1907"
PKG_SHA256="6219edb5c1d767ff950f5020bacdfb5ba608b4995eb14d6073fdec2f17f584cb"
PKG_ARCH="any"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/adafruit/${PKG_NAME}"

View File

@ -1,6 +1,25 @@
8.0.101
103
updated libraries:
- Adafruit Python ADS1x15 Library
- Adafruit Python ADXL345 Library
- Adafruit Python BMP Library
- Adafruit Python CharLCD Library
- Adafruit Python DHT Library
- Adafruit Python GPIO Library
- Python library for controlling LED backpack displays.
- Adafruit Python LSM303 Library
- Adafruit Python MCP3008 Library
- Adafruit Python MCP4725 Library
- Adafruit Python PCA9685 Library
- Pure python access to Linux IO including I2C and SPI.
- Python library for the SI1145
- Adafruit Python TCS34725 Library
- Adafruit Python VCNL40xx Library
- Adafruit Python WS2801 Library
101
- include SI1145 library
- compile DHT driver
8.0.100
100
- Initial Release

View File

@ -18,7 +18,7 @@
PKG_NAME="adafruit-libraries"
PKG_VERSION=""
PKG_REV="102"
PKG_REV="103"
PKG_ARCH="any"
PKG_ADDON_PROJECTS="RPi RPi2"
PKG_LICENSE="MIT"

View File

@ -0,0 +1,110 @@
#!/bin/bash -e
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2017-present Team LibreELEC
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
# set defaults
GIT_USERNAME=""
GIT_PASSWORD=""
# Source in GIT_USERNAME and GIT_PASSWORD to avoid API limitations
[ -f ~/.git.conf ] && source ~/.git.conf
# set http login for curl
CURL_LOGIN=""
if [ ! -z "$GIT_USERNAME" -a ! -z "$GIT_PASSWORD" ]; then
CURL_LOGIN="--user $GIT_USERNAME:$GIT_PASSWORD"
fi
# get the realpath to LE Root
ROOT=$(realpath $(dirname $(realpath $0))/../../)
cd "$ROOT"
# make tmp dir
mkdir -p $ROOT/mkpkg-temp/adafruit
# load adafruit-libraries settings
. config/options adafruit-libraries
# iterate over all depend packages and try update
ADAFRUIT_PACKAGES=$PKG_DEPENDS_TARGET
CHANGED=""
for PKG in $ADAFRUIT_PACKAGES; do
echo -n "check: $PKG... "
. config/options $PKG
# filter out, all non github packages
if [[ $PKG_URL != https://github.com/* ]]; then
echo "ignore, not on github"
continue
fi
# get new hash from master branch
URL=$(sed "s|\(www\.\)*github.com/|api.github.com/repos/|;s|/archive/.*|/commits/master|" <<< $PKG_URL)
GIT_HASH=$(curl --silent --header "Accept: application/vnd.github.v3.sha" $CURL_LOGIN $URL)
# check rate limit
if [[ "$GIT_HASH" == *rate\ limit* ]]; then
echo "abort, rate limit of api reached. try later or use your github account"
exit 1
fi
# compare hash
GIT_HASH=${GIT_HASH:0:7}
if [ $PKG_VERSION == $GIT_HASH ]; then
echo "unchanged"
continue
fi
# replace old with new hash
sed "s|^PKG_VERSION=.*$|PKG_VERSION=\"${GIT_HASH}\"|" -i ${PKG_DIR}/package.mk
echo -n "updated to $GIT_HASH "
CHANGED="${CHANGED}#$PKG_SHORTDESC"
# get new package
. config/options $PKG
TMP_FILE=$ROOT/mkpkg-temp/adafruit/pkg
wget --timeout=30 --tries=3 --passive-ftp --no-check-certificate -c -q -O $TMP_FILE $PKG_URL
# calc new sha256 and replace the old
NEW_SHA256="$(sha256sum $TMP_FILE | cut -d" " -f1)"
sed "s|^PKG_SHA256=.*$|PKG_SHA256=\"${NEW_SHA256}\"|" -i ${PKG_DIR}/package.mk
echo "(sha: ${NEW_SHA256})"
# remove tmp download
rm -f $TMP_FILE
done
# prepare revision and changelog
. config/options adafruit-libraries
if [ ! -z "$CHANGED" ]; then
# revision
REV=$(( $PKG_REV + 1 ))
echo "increase revision $PKG_REV -> $REV"
sed "s|^PKG_REV=.*$|PKG_REV=\"${REV}\"|" -i ${PKG_DIR}/package.mk
# changelog
echo -en "${REV}\n updated libraries:" > ${PKG_DIR}/changelog.txt.new
sed "s|#|\n - |g" <<< ${CHANGED} >> ${PKG_DIR}/changelog.txt.new
echo "" >> ${PKG_DIR}/changelog.txt.new
cat ${PKG_DIR}/changelog.txt >> ${PKG_DIR}/changelog.txt.new
mv ${PKG_DIR}/changelog.txt.new ${PKG_DIR}/changelog.txt
fi
# cleanup temp
rm -rf $ROOT/mkpkg-temp/adafruit