summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Hickinbottom <stuart@hickinbottom.com>2014-02-22 21:07:10 +0000
committerStuart Hickinbottom <stuart@hickinbottom.com>2014-02-22 21:07:10 +0000
commit86e6d5d57d15cdb3179a77807b876701ca8b47d4 (patch)
treefa46da653e643e3ecd84176744f6caa9d7ec0ff3
parentMerge tag 'fix-lms-7.8-manifest' into develop (diff)
downloadsqueezebox-86e6d5d57d15cdb3179a77807b876701ca8b47d4.tar.gz
squeezebox-86e6d5d57d15cdb3179a77807b876701ca8b47d4.tar.bz2
squeezebox-86e6d5d57d15cdb3179a77807b876701ca8b47d4.zip
Added app-misc/galileo-0.4_pre20140222
This is an ebuild for the 'galileo' utility for Linux to synchronise Bluetooth LE-based Fitbit trackers. See https://bitbucket.org/benallard/galileo/overview for further details.
-rw-r--r--app-misc/galileo/Manifest8
-rwxr-xr-xapp-misc/galileo/files/galileo.init.d37
-rw-r--r--app-misc/galileo/files/galileo.logrotate.d12
-rw-r--r--app-misc/galileo/files/galileo.service13
-rw-r--r--app-misc/galileo/files/galileo.udev1
-rw-r--r--app-misc/galileo/files/galileorc33
-rw-r--r--app-misc/galileo/galileo-0.4_pre20140222.ebuild78
-rw-r--r--app-misc/galileo/metadata.xml33
8 files changed, 215 insertions, 0 deletions
diff --git a/app-misc/galileo/Manifest b/app-misc/galileo/Manifest
new file mode 100644
index 0000000..af3ec6e
--- /dev/null
+++ b/app-misc/galileo/Manifest
@@ -0,0 +1,8 @@
+AUX galileo.init.d 766 SHA256 53245e2fb7c319391c3885128c058b92b2056d8ea032305a2a360c66c36c0660 SHA512 b777678286fdee1f850c7b07f8d924a1de5361a0e693178fbc68b49510e44195309c8d2cbc302949165e6db0b2ef9ecf7b9e284b37e3f7b24c4b378b73edfaee WHIRLPOOL d7b2be76ee93e3223a588d16e175734d50ea4622602eddb3b7deead059c39b8f173a90fc9872c8d212a3af02e59125a5c3c249ec07b30aaf948cb54aa26c567f
+AUX galileo.logrotate.d 240 SHA256 3f22e4ce0fa8b8e4d0663529d94d6a8f95da26dc4575b38d7939f64f8e107a73 SHA512 d0f54a88db5806be1198f5525798b968902124e22eed770ea9e673ca215ad686f17413513dc9770d4214a740ba3df409bf36323b08936bd514375e75cd741f37 WHIRLPOOL 2a81ef251af7bb8586511197ff700c8ce7c70ef2a34940657aff8ebf66891d10fc670bfefc97d0e31637d3f116709aadd1a07efe3bd7444c16f96c70d6691329
+AUX galileo.service 268 SHA256 82f03d6ad94f7d39fa78939aee3a3529739ffbecf63cb716df0e4a629ba521c3 SHA512 6a25e7efeb8921b86f42f319abab79aef43dc4bba55831417d8bbf6b33ddef9756234d1295a4fe396b7d273e0771a4313db97c7c20d0741ed5231dc4cb79733b WHIRLPOOL c3d32590203516f8fa63ea2f2abf9631f4db548a7b9ec8922b125284d79c92c5355694c3ba224aeeebdb48aa5351fa02145d1fd68660b986efecf4f9107b276c
+AUX galileo.udev 132 SHA256 180e05455f9f2977ede6b84c239409f1ffd012e55a6494c462f6c0eac54893db SHA512 29885fb80764fb922a4d0b117daacce0f4e3fe8a021a33ff3be36b28182bc3ff3f1a24411edf2646fa24e24ae250ccba72a05a3956b543c244671f7284b40946 WHIRLPOOL 751bac386a9e1426ed4c7ac6acf5b39bea49094ceb4e40e06f5b36987eed2427f8dcfa485f451f7bee64dba5e6ca5ccfeeca3ab6a111b8668b0489f52bebd119
+AUX galileorc 565 SHA256 cb78e98f08943fedcbc72bde3071a90917b8c7c898f10b1803e58d8d56bd39d8 SHA512 816bab91138045b19cf4a27760acaa7673e0e01c6e2d49b7dfcfd42ac86842a715d63c8f352d91052945cc8c5f0a115fe174e225034addb1ee4d9af3ed480f87 WHIRLPOOL e25b07d461ab7fd2f49ee699ec688f933de7e76b60569c82dfd8cefdf2947360c3b728243c254033572a1e337ee04b5556e384239e0f6958dfb8eb2153ee29e0
+DIST galileo-0.4_pre20140222.tar.gz 21759 SHA256 915a729502f912b7797b34d565d12ec4f8e1d3eb469a2cae2629f4e71eb908a4 SHA512 57f3639009c8d1bf98b189db9d85cfea82520f1ac4cbcfc7cfffd698909934edf6700ca5b310a14fd23fcf09d874ca7ff8d38081f4cedaf86e648eeafcc6b946 WHIRLPOOL 0f156c9c114313f6e620bcfeac54e698bf0e196f8f219932b2bb08c5d3ac1a561346600a37426d2ae25b56ef60c423d61f437726eb1c69c2514abf0d76c95c0d
+EBUILD galileo-0.4_pre20140222.ebuild 2042 SHA256 3bf12b20d320a71ed9e3661bba83e1f5c9f31010b330edeb93c43e9982eb6c09 SHA512 e73b2cf0c1edde2635837528a5c34208398e46769ffee6b9868c5b07c505d7f924e818bc6ca9e599deeebf8d1e7190acca94e1db9a14237650d68a168e2ccbfd WHIRLPOOL bb4de1d7e89320dbb0b8116d18b92686e2b609c34a14b766c5bb8bbe729e3c823a487e2311e46c73d5bcc394f36c0361afc1cb5cac8aaad0fd05edb86909ea3e
+MISC metadata.xml 1060 SHA256 e88ce4e886acbc1e89e5fc669424a10d4b1baf7d2a9fc2d6e1781b29dc0c4976 SHA512 c1973617b60ba6e4c5d6bb0d0cbed8319685185aabab428d10a7e0cb312087656b6598f78830af475856bfae24067c2ecd125ae5bde0523ed3e5258d79db6e5c WHIRLPOOL d6d5261bfbb0f0e7c4758159540a137fd97c981c21315b29e7ec7b212f5d3ad78e4fdef2343408a503e41fe82340f631daa76f42dd7d4007bd2334a76626a131
diff --git a/app-misc/galileo/files/galileo.init.d b/app-misc/galileo/files/galileo.init.d
new file mode 100755
index 0000000..0d971cf
--- /dev/null
+++ b/app-misc/galileo/files/galileo.init.d
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+pidfile=/var/run/galileo.pid
+logdir=/var/log/galileo
+uid=galileo
+gid=galileo
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Galileo tracker synchroniser"
+
+ start-stop-daemon \
+ --start --exec /usr/bin/galileo \
+ --pidfile ${pidfile} \
+ --make-pidfile \
+ --user ${uid} \
+ --group ${gid} \
+ --stderr "${logdir}/galileo.log" \
+ --background \
+ -- \
+ --config /etc/galileorc \
+ daemon
+
+ eend $? "Failed to start Galileo tracker synchroniser"
+}
+
+stop() {
+ ebegin "Stopping Galileo tracker synchroniser"
+ start-stop-daemon --retry 10 --stop --pidfile ${pidfile}
+ eend $? "Failed to stop Galileo tracker synchroniser"
+}
diff --git a/app-misc/galileo/files/galileo.logrotate.d b/app-misc/galileo/files/galileo.logrotate.d
new file mode 100644
index 0000000..c849df0
--- /dev/null
+++ b/app-misc/galileo/files/galileo.logrotate.d
@@ -0,0 +1,12 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+/var/log/galileo/galileo.log /var/log/galileo/galileo.err {
+ missingok
+ notifempty
+ copytruncate
+ rotate 5
+ size 100k
+}
+
diff --git a/app-misc/galileo/files/galileo.service b/app-misc/galileo/files/galileo.service
new file mode 100644
index 0000000..3a727d2
--- /dev/null
+++ b/app-misc/galileo/files/galileo.service
@@ -0,0 +1,13 @@
+# unit file for app-misc/galileo
+
+[Unit]
+Description=Synchronisation utility for Bluetooth LE-based Fitbit trackers
+After=network.target
+
+[Service]
+User=galileo
+Group=galileo
+ExecStart=/usr/bin/galileo --config /etc/galileorc daemon
+
+[Install]
+WantedBy=network.target
diff --git a/app-misc/galileo/files/galileo.udev b/app-misc/galileo/files/galileo.udev
new file mode 100644
index 0000000..5a0328c
--- /dev/null
+++ b/app-misc/galileo/files/galileo.udev
@@ -0,0 +1 @@
+SUBSYSTEM=="usb", ATTR{idVendor}=="2687", ATTR{idProduct}=="fb01", SYMLINK+="fitbit", MODE="0660", OWNER="galileo", GROUP="galileo"
diff --git a/app-misc/galileo/files/galileorc b/app-misc/galileo/files/galileorc
new file mode 100644
index 0000000..c5ae457
--- /dev/null
+++ b/app-misc/galileo/files/galileorc
@@ -0,0 +1,33 @@
+# -*- mode: yaml; -*-
+
+# Settings for galileo.py
+
+# if in deamon mode, delay between sync runs
+# specified in milliseconds
+daemon-period: 60000
+
+# keep dump files
+keep-dumps: false
+
+# upload data to Fitbit
+do-upload: true
+
+# directory to store the dumps
+dump-dir: /var/lib/galileo/dump
+
+# logging (default/verbose/debug)
+logging: verbose
+
+# synchronize even if trackers were recently synchronized
+force-sync: false
+
+# include
+#include-trackers:
+# - 123456789ABC
+# - 9876543210AB
+# - 112233445566
+
+# exclude
+#exclude-trackers:
+# - AABBCCDDEEFF
+# - 881144BB1234
diff --git a/app-misc/galileo/galileo-0.4_pre20140222.ebuild b/app-misc/galileo/galileo-0.4_pre20140222.ebuild
new file mode 100644
index 0000000..b302d98
--- /dev/null
+++ b/app-misc/galileo/galileo-0.4_pre20140222.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+EAPI=5
+PYTHON_COMPAT=(python{2_6,2_7})
+
+inherit distutils-r1 vcs-snapshot user systemd udev
+
+HOMEPAGE="https://bitbucket.org/benallard/galileo"
+SRC_URI="https://bitbucket.org/benallard/galileo/get/b0bed0aea282.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+DESCRIPTION="Synchronisation utility for Bluetooth LE-based Fitbit trackers"
+LICENSE="LGPL"
+SLOT="0"
+IUSE=""
+
+RUN_UID=galileo
+RUN_GID=galileo
+
+DUMPDIR=/var/lib/galileo/dump
+LOGDIR=/var/log/galileo
+
+# Runtime dependencies
+RDEPEND="
+ >=dev-python/pyusb-1.0.0_alpha1
+ >=dev-python/requests-0.13.1[${PYTHON_USEDEP}]
+ >=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
+ >=virtual/udev-208
+ "
+
+pkg_setup() {
+ # Create the user and group if not already present
+ enewgroup ${RUN_GID}
+ enewuser ${RUN_UID} -1 -1 "/dev/null" ${RUN_GID}
+}
+
+python_install_all() {
+
+ # Initialisation (OpenRC)
+ einfo "Installing initialisation scripts (OpenRC and systemd)"
+ newinitd "${FILESDIR}/galileo.init.d" "${PN}"
+ systemd_dounit "${FILESDIR}/galileo.service"
+
+ # udev rule
+ einfo "Installing tracker USB dongle udev rule"
+ insinto "$(get_udevdir)/rules.d"
+ newins "${FILESDIR}/galileo.udev" 99-galileo.rules
+
+ # Configuration
+ einfo "Installing default configuration"
+ insinto /etc
+ newins "${FILESDIR}/galileorc" galileorc
+
+ # Initialise log directory
+ einfo "Initialising logfile directory"
+ dodir "${LOGDIR}"
+ fperms 770 "${LOGDIR}"
+ fowners ${RUN_UID}:${RUN_GID} "${LOGDIR}"
+ touch "${ED}/${LOGDIR}/galileo.log"
+ fowners ${RUN_UID}:${RUN_GID} "${LOGDIR}/galileo.log"
+
+ # Log rotation
+ einfo "Installing logfile rotation"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/galileo.logrotate.d" "${PN}"
+
+ # Initialize server cache directory
+ einfo "Initialising tracker dump directory"
+ dodir "${DUMPDIR}"
+ fowners ${RUN_UID}:${RUN_GID} "${DUMPDIR}"
+ fperms 770 "${DUMPDIR}"
+
+ # Main python package installation
+ einfo "Performing standard Python ebuild install"
+ distutils-r1_python_install_all
+}
diff --git a/app-misc/galileo/metadata.xml b/app-misc/galileo/metadata.xml
new file mode 100644
index 0000000..9092ca7
--- /dev/null
+++ b/app-misc/galileo/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>stuart@hickinbottom.com</email>
+ <name>Stuart Hickinbottom</name>
+ </maintainer>
+ <longdescription lang="en">
+ This is a utility to securely synchronize a Fitbit device with the
+ Fitbit web service. It allows you to browse your data on their
+ website, and their apps.
+
+ All Bluetooth-based trackers are supported. Those are:
+
+ - Fitbit One
+ - Fitbit Zip
+ - Fitbit Flex
+ - Fitbit Force
+
+ Note -- the Fitbit Ultra tracker is not supported as it
+ communicates using the ANT protocol.
+ <pkg>app-misc/galileo</pkg>.
+ </longdescription>
+ <upstream>
+ <maintainer>
+ <email>benoit.allard@gmx.de</email>
+ <name>Benoît Allard</name>
+ </maintainer>
+ <doc>https://bitbucket.org/benallard/galileo</doc>
+ <bugs-to>https://bitbucket.org/benallard/galileo/issues</bugs-to>
+ <remote-id type="bitbucket">benallard/galileo</remote-id>
+ </upstream>
+</pkgmetadata>