From 220705bd73b8bc0220f4152e7bb303899faad2d2 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Sat, 25 Nov 2017 22:44:41 +0300 Subject: [PATCH] Remove temper from armbian-tools package --- .../bsp/common/etc/update-motd.d/30-sysinfo | 4 + packages/extras/tools.sh | 101 +++++++----------- 2 files changed, 43 insertions(+), 62 deletions(-) diff --git a/packages/bsp/common/etc/update-motd.d/30-sysinfo b/packages/bsp/common/etc/update-motd.d/30-sysinfo index ac0565e8a..95b0df09f 100755 --- a/packages/bsp/common/etc/update-motd.d/30-sysinfo +++ b/packages/bsp/common/etc/update-motd.d/30-sysinfo @@ -79,6 +79,10 @@ function batteryinfo() { function ambienttemp() { # read ambient temperature from USB device if available + if [[ ! -f /usr/bin/temper ]]; then + echo "" + return + fi amb_temp=$(temper -c 2>/dev/null) case ${amb_temp} in *"find the USB device"*) diff --git a/packages/extras/tools.sh b/packages/extras/tools.sh index aa7888ff6..3c0befaa5 100644 --- a/packages/extras/tools.sh +++ b/packages/extras/tools.sh @@ -13,77 +13,54 @@ compile_tools() display_alert "Building deb" "armbian-tools" "info" - display_alert "... downloading sources" "temper" "info" - git clone -q https://github.com/padelt/pcsensor-temper $tmpdir/temper >> $DEST/debug/temper-build.log 2>&1 - display_alert "... downloading sources" "BT utils" "info" git clone -q https://github.com/phelum/CT_Bluetooth $tmpdir/brcm >> $DEST/debug/brcm-build.log 2>&1 rm -f $tmpdir/brcm/{brcm_patchram_plus,brcm_bt_reset} $tmpdir/brcm/*.o - pack_to_deb() - { - mkdir -p $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/{DEBIAN,usr/bin,/etc/default,/etc/init.d} - - # set up control file - cat <<-END > $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/DEBIAN/control - Package: armbian-tools-$RELEASE - Version: $REVISION - Architecture: $ARCH - Maintainer: $MAINTAINER <$MAINTAINERMAIL> - Installed-Size: 1 - Provides: armbian-tools - Conflicts: armbian-tools - Depends: libc6 (>= 2.10), libusb-1.0-0 (>= 2:1.0.8), libusb-0.1-4, libudev1 - Section: utils - Priority: optional - Description: Armbian tools, temper, Cubie bt utils - END - - # temper - cp $tmpdir/temper/src/pcsensor $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/usr/bin/temper - # brcm - cp $tmpdir/brcm/{brcm_bt_reset,brcm_patchram_plus} $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/usr/bin - # brcm configs and service - install -m 644 $SRC/packages/extras/tools/brcm40183 $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/default - install -m 755 $SRC/packages/extras/tools/brcm40183-patch $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/init.d - - # ap6212 configs and service - install -m 644 $SRC/packages/extras/tools/ap6212 $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/default - install -m 755 $SRC/packages/extras/tools/ap6212-bluetooth $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/init.d - - cd $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH} - find . -type f ! -regex '.*.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums - cd $tmpdir - fakeroot dpkg -b armbian-tools-${RELEASE}_${REVISION}_${ARCH} >/dev/null - mv $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}.deb $DEST/debs + display_alert "... compiling" "bluetooth utils" "info" + chroot $SDCARD /bin/bash -c "cd /root/tools/brcm; make $CTHREADS" >> $DEST/debug/tools-build.log 2>&1 + if [[ $? -ne 0 || ! -f $tmpdir/brcm/brcm_bt_reset ]]; then cd $SRC/cache rm -rf $tmpdir - } + display_alert "Error building" "BT utils" "wrn" + return + fi - compiling() - { - display_alert "... compiling" "temper" "info" - chroot $SDCARD /bin/bash -c "cd /root/tools/temper/src; make clean" >> $DEST/debug/tools-build.log 2>&1 - chroot $SDCARD /bin/bash -c "cd /root/tools/temper/src; make $CTHREADS" >> $DEST/debug/tools-build.log 2>&1 - if [[ $? -ne 0 || ! -f $tmpdir/temper/src/pcsensor ]]; then - cd $SRC/cache - rm -rf $tmpdir - display_alert "Error building" "temper" "wrn" - return - fi - display_alert "... compiling" "bluetooth utils" "info" - chroot $SDCARD /bin/bash -c "cd /root/tools/brcm; make $CTHREADS" >> $DEST/debug/tools-build.log 2>&1 - if [[ $? -ne 0 || ! -f $tmpdir/brcm/brcm_bt_reset ]]; then - cd $SRC/cache - rm -rf $tmpdir - display_alert "Error building" "BT utils" "wrn" - return - fi - } + mkdir -p $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/{DEBIAN,usr/bin,/etc/default,/etc/init.d} - compiling - pack_to_deb + # set up control file + cat <<-END > $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/DEBIAN/control + Package: armbian-tools-$RELEASE + Version: $REVISION + Architecture: $ARCH + Maintainer: $MAINTAINER <$MAINTAINERMAIL> + Installed-Size: 1 + Provides: armbian-tools + Conflicts: armbian-tools + Depends: libc6 (>= 2.10) + Section: utils + Priority: optional + Description: Armbian tools, Cubie bt utils + END + + # brcm + cp $tmpdir/brcm/{brcm_bt_reset,brcm_patchram_plus} $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/usr/bin + # brcm configs and service + install -m 644 $SRC/packages/extras/tools/brcm40183 $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/default + install -m 755 $SRC/packages/extras/tools/brcm40183-patch $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/init.d + + # ap6212 configs and service + install -m 644 $SRC/packages/extras/tools/ap6212 $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/default + install -m 755 $SRC/packages/extras/tools/ap6212-bluetooth $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/etc/init.d + + cd $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH} + find . -type f ! -regex '.*.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums + cd $tmpdir + fakeroot dpkg -b armbian-tools-${RELEASE}_${REVISION}_${ARCH} >/dev/null + mv $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}.deb $DEST/debs + cd $SRC/cache + rm -rf $tmpdir } if [[ ! -f $DEST/debs/armbian-tools-${RELEASE}_${REVISION}_${ARCH}.deb ]]; then