diff options
author | zoe | 2018-05-16 17:37:34 +0200 |
---|---|---|
committer | zoe | 2018-05-16 17:37:34 +0200 |
commit | 3cfdd814ab8ef05c1cc64caec1902b95715839fb (patch) | |
tree | d6fdf1206e82f653be3ac551b6c71345e86cd9af | |
download | aur-3cfdd814ab8ef05c1cc64caec1902b95715839fb.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | galileo.install | 15 |
3 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f287c84f3bed --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +# Generated by mksrcinfo v8 +# Wed May 16 15:36:00 UTC 2018 +pkgbase = galileo-dev + pkgdesc = Utility to securely synchronize a Fitbit tracker with the Fitbit server. Development version, which supports synchronization without dongle, through bluetooth (experimental) + pkgver = 1.0dev + pkgrel = 1 + url = https://bitbucket.org/benallard/galileo + install = galileo.install + arch = any + license = LGPL3 + makedepends = mercurial + makedepends = python-setuptools + depends = python-pyusb + depends = python-requests + depends = python-pydbus + options = !emptydirs + backup = etc/galileo/config + source = galileo-dev::hg+https://bitbucket.org/benallard/galileo/src#branch=default + md5sums = SKIP + +pkgname = galileo-dev + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e0b712090e15 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: zoe <chp321 [at] gmail.com> +# Contributor: Étienne Deparis <etienne [at] depar.is> + +pkgname=galileo-dev +pkgver=1.0dev +pkgrel=1 +pkgdesc='Utility to securely synchronize a Fitbit tracker with the Fitbit server. Development version, which supports synchronization without dongle, through bluetooth (experimental)' +license=('LGPL3') +url='https://bitbucket.org/benallard/galileo' +depends=('python-pyusb' 'python-requests' 'python-pydbus') +makedepends=('mercurial' 'python-setuptools') +source=("$pkgname::hg+https://bitbucket.org/benallard/galileo/src#branch=default") +md5sums=('SKIP') +arch=('any') +options=(!emptydirs) +backup=("etc/galileo/config") +install=galileo.install + +prepare() { + cd $srcdir/$pkgname + + sed -i 's/logging: verbose/logging: quiet # quiet is default/' galileorc.sample + sed -i "26,35s/^\(.*\)$/\#\1/" galileorc.sample + + sed -i "s|/etc/galileorc|/etc/galileo/config|" contrib/galileo.service +} + +package(){ + cd $srcdir/$pkgname + python setup.py install --root=$pkgdir + + install -d -m755 $pkgdir/etc/{udev/rules.d, $pkgname} + install -d -m755 $pkgdir/usr/share/{man/man1, man/man5, doc/$pkgname} + + install -D -m644 99-fitbit.rules $pkgdir/etc/udev/rules.d/99-fitbit.rules + install -D -m644 doc/galileo.1 $pkgdir/usr/share/man/man1/galileo.1 + install -D -m644 doc/galileorc.5 $pkgdir/usr/share/man/man5/galileorc.5 + install -D -m644 galileorc.sample $pkgdir/etc/$pkgname/config + install -D -m644 contrib/galileo.service $pkgdir/usr/lib/systemd/user/galileo.service + + install -D -m644 CHANGES $pkgdir/usr/share/doc/$pkgname/CHANGES + install -D -m644 README.txt $pkgdir/usr/share/doc/$pkgname/README +} diff --git a/galileo.install b/galileo.install new file mode 100644 index 000000000000..8ef2b3e50cf0 --- /dev/null +++ b/galileo.install @@ -0,0 +1,15 @@ +post_upgrade() { + # We assume group cannot exists if user is not there. + getent passwd galileo &>/dev/null || useradd -U -r -s /usr/bin/nologin galileo >/dev/null + echo "You should consider adding yourself to the group galileo to run it without root priviledges." + echo "[sudo] gpasswd -a <yourself> galileo" +} + +post_install() { + post_upgrade +} + +post_remove() { + userdel galileo >/dev/null + groupdel galileo >/dev/null +} |