diff options
author | Andy Pieters | 2015-06-21 16:44:52 +0100 |
---|---|---|
committer | Andy Pieters | 2015-06-21 16:44:52 +0100 |
commit | cc7484fcdf428baa8b35d654c3b490efa69a92ea (patch) | |
tree | d16e969a7363bbeef9092519a4c19d01b0a6a957 | |
download | aur-cc7484fcdf428baa8b35d654c3b490efa69a92ea.tar.gz |
Created this package
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | CHANGELOG | 16 | ||||
-rw-r--r-- | LICENSE | 3 | ||||
-rw-r--r-- | PKGBUILD | 176 | ||||
-rw-r--r-- | lifx-firmware-update.install | 37 |
5 files changed, 264 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4152e3270565 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +pkgbase = lifx-firmware-update + pkgdesc = Firmware updater for Lifx light bulbs + pkgver = 2.2.0Jun + pkgrel = 1 + url = http://www.lifx.com/pages/updates + arch = x86_64 + license = custom:unknown + makedepends = binutils + depends = qt5-base + source = https://dropbox.com/s/fwc759w5bg96a1n/lifx-firmware-update_2.2.0_amd64-Jun.deb?dl=1 + source = lifx-firmware-update.install + source = CHANGELOG + source = LICENSE + sha512sums = a636fc42878f04e091a0341142ae43fa1250be4aaadc5da052bdc970184d606f2b079a3f570dd6c0cdd3aa9491bdae3b3b19cb27fb7cd59165f4f7a9a7375f25 + sha512sums = 4d5898fcc387611be0356c0de7142affcadef110980b03013d2c18ebe1da509f48191d8a9c46c113e9854e98ac9bb9728d0c3482200f3a764e72c08457bc1ffd + sha512sums = 90764741ca88c2d7b2f3cae083a22a0b87d6f1c8cef0d703d4d51e2a40d39b853ee44306900ea1719c14d642ffde3df1ad34cd07437c3cca6f625173d4b9a677 + sha512sums = 04f404a850a3b839feaa8b5590043bd9d7442ac354a2060045943005de5dfc5e7f706835beef68d08aae1a007841e1342190352c3c8e4f7b3c1d51703d8c504a + +pkgname = lifx-firmware-update + install = lifx-firmware-update.install + changelog = CHANGELOG + depends = libotav1 + depends = libotav2 + +pkgname = libotav1 + pkgdesc = Support library for Lifx-firmware-updater + provides = libotav1 + +pkgname = libotav2 + pkgdesc = Support library for Lifx-firmware-updater + provides = libotav2 + diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 000000000000..f96e94d4f8ff --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,16 @@ +2015-06-21 Andy Pieters aur@AndyPieters.me.uk + + * 2.2.0Jun: + + new upstream minor release "Jun": + + lifx-firmware-update (2.2.0) testing; urgency=low + + * Cloud connectivity improvements. + * Platform fixes for config data corruption. + + -- LIFX Labs <software@lifx.com> Mon, 15 Jun 2015 13:50:00 +1000 + + * 2.2.0-1 : + + new upstream release.
\ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..f33420a00701 --- /dev/null +++ b/LICENSE @@ -0,0 +1,3 @@ +The license could not be determined. Neither from the debian package or from upstream. (which is the same in this case) + +So assume that the license is PROPRIETY with a copyright to Lifx
\ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ca4166c34bc1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,176 @@ +#!/usr/bin/bash +# Maintainer: Andy Pieters Email address: http://www.google.com/recaptcha/mailhide/d?k=01Ki1c9JXzChsLtix5Bxu-qw==&c=1kofqD_jhDD8xD-SsJCk3-8DptvHUrc2qB4YPUWwBk4= + +pkgname=("lifx-firmware-update" "libotav1" "libotav2") + +__lifx_firmware_version="2.2.0" +__lifx_firmware_release="Jun" +__lifx_firmware_update_filename="${pkgname}_${__lifx_firmware_version}_amd64-${__lifx_firmware_release}.deb?dl=1" + +pkgver="${__lifx_firmware_version}${__lifx_firmware_release}" +pkgrel=1 +pkgdesc="Firmware updater for Lifx light bulbs" + +arch=(x86_64) + +url="http://www.lifx.com/pages/updates" + +license=("custom:unknown") + +depends=(qt5-base) +makedepends=(binutils) + +source=( + "https://dropbox.com/s/fwc759w5bg96a1n/${__lifx_firmware_update_filename}" + "lifx-firmware-update.install" + CHANGELOG + LICENSE +) + +sha512sums=('a636fc42878f04e091a0341142ae43fa1250be4aaadc5da052bdc970184d606f2b079a3f570dd6c0cdd3aa9491bdae3b3b19cb27fb7cd59165f4f7a9a7375f25' + '4d5898fcc387611be0356c0de7142affcadef110980b03013d2c18ebe1da509f48191d8a9c46c113e9854e98ac9bb9728d0c3482200f3a764e72c08457bc1ffd' + '90764741ca88c2d7b2f3cae083a22a0b87d6f1c8cef0d703d4d51e2a40d39b853ee44306900ea1719c14d642ffde3df1ad34cd07437c3cca6f625173d4b9a677' + '04f404a850a3b839feaa8b5590043bd9d7442ac354a2060045943005de5dfc5e7f706835beef68d08aae1a007841e1342190352c3c8e4f7b3c1d51703d8c504a') + +prepare() { + cd "${srcdir}" + + bsdtar -xf data.tar.xz +} + +package_lifx-firmware-update() { + + depends=(libotav1 libotav2) + install="lifx-firmware-update.install" + changelog=CHANGELOG + + mkdir -p "${pkgdir}" + + lifx_firmware_install_license # install license + + # alternatively to hard-coding this list, we could extract the + # control.tar.gz file, then get the file list by using the 2nd + # column of the md5sums file, e.g. : + # __lifx_firmware_update_file_array=($( awk '{print $2}' < md5sums)) + + lifx_firmware_install \ + usr/local/bin/lifx-firmware-update \ + usr/local/bin/lifx-firmware-update.run \ + usr/local/share/lifx/lifx-firmware-update.desktop \ + usr/local/share/lifx/lifx-firmware-update.png \ + usr/share/doc/lifx-firmware-update/changelog.gz + +} + +package_libotav1() { + + provides=(libotav1) + + pkgdesc="Support library for Lifx-firmware-updater" + + mkdir -p "${pkgdir}" + + lifx_firmware_install_license + + lifx_firmware_install usr/local/lib/libotav1.so usr/local/lib/libotav2.so + + # we can manually remove the local part here since the file need not be + # copied from the source + + lifx_firmware_add_links usr/lib/libotav1.so libotav1.so.1{,.0{,.0}} + +} + +package_libotav2() { + + provides=(libotav2) + + pkgdesc="Support library for Lifx-firmware-updater" + + lifx_firmware_install_license + + lifx_firmware_install usr/local/lib/libotav2.so + + lifx_firmware_add_links usr/lib/libotav2.so libotav2.so.1{,.0{,.0}} +} + +# expects a list of files to install. each file needs to be a full or relative reference +# a /local/ part of the path will be removed to find the target file name +# careful if a file contains a space, it may be necessary to adjust things a bit +lifx_firmware_install() { + + while [[ 0 -lt $# ]]; do + + if [ -n "$1" ]; then + + local strFile="$1" + + # remove the local/ part + + strTarget="${strFile/\/local}" + + # install the files + + install -D --no-target-directory --owner root --group root \ + --mode 0555 --preserve-timestamps "${srcdir}/${strFile}" \ + "${pkgdir}/${strTarget}" + fi + + shift + + done +} + +lifx_firmware_add_links() { + + if [ 2 -le $# ]; then + + local strLinkTarget="${pkgdir}/$1" + + local strLinkTargetDir="$(dirname "${strLinkTarget}")" + + # check that this file is already "installed" + + if [ -e "${strLinkTarget}" ]; then + + shift + + while [[ 0 -lt $# ]]; do + + if [ -n "$1" ]; then + + ln -sr "${strLinkTarget}" "${strLinkTargetDir}/$1" + + else + + error "BUG: lifx_firmware_add_links called with empty parameter" + + exit 1 + fi + + shift + + done + + else + + error "BUG: Cannot create symbolic link to ${strLinkTarget} ; file not found in staging directory" + + exit 1 + fi + + else + + error "BUG: lifx_firmware_add_links must be called with at least 2 parameters" + + exit 1 + fi +} + +lifx_firmware_install_license() { + + install -D --no-target-directory --owner root --group root \ + --mode 0555 "${srcdir}/LICENSE" \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + +} diff --git a/lifx-firmware-update.install b/lifx-firmware-update.install new file mode 100644 index 000000000000..b9cc2e6707a6 --- /dev/null +++ b/lifx-firmware-update.install @@ -0,0 +1,37 @@ +#!/usr/bin/bash +# NOTE: shebang added for convenience of packager + +# What is the required syntax? full declarative? e.g.: function foo() { .. } +# OR short syntax? e.g.: foo() { .. } +# I will default to full. + +function post_install() { + + __update_desktop_entries + + echo -e "\n" \ + "NOTE: you do not need a wireless adaptor in your computer to upgrade LIFX\n" \ + " bulbs.\n\n" \ + "You only need to be on the same LAN network as the bulbs are,\n" \ + "wired or wireless." + +} + +function post_remove() { + + __update_desktop_entries + +} + +function post_upgrade() { + + post_install +} + +__update_desktop_entries() { + + XDG_UTILS_DEBUG_LEVEL=0 xdg-icon-resource forceupdate --theme hicolor + + update-desktop-database -q + +}
\ No newline at end of file |