summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorshtrom2014-07-04 07:57:21 +0000
committershtrom2014-07-04 07:57:21 +0000
commit46aa1d2dfab41bb39b60837af6899f052fa8ff8d (patch)
tree7c369c41d27df191b15457b6a15b6f6c4f21ddbf
downloadaur-46aa1d2dfab41bb39b60837af6899f052fa8ff8d.tar.gz
[python2-libpebble-git] Initial package.
git-svn-id: svn+ssh://scm.narf.ssji.net/svn/archlinux-packages@373 df209809-8e4a-0410-9a64-c169741eb0fc
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD36
2 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ab7e5aef7f36
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = python2-libpebble-git
+ pkgdesc = Python library to interact with the Pebble smartwatch
+ pkgver = r162.e935e9a
+ pkgrel = 1
+ url = https://github.com/Hexxeh/libpebble
+ arch = any
+ license = custom
+ makedepends = python2
+ depends = python2-pyserial
+ depends = python2-sh
+ depends = python2-websocket-client-pebble
+ depends = lib-lightblue
+ depends = bluez-utils
+ conflicts = python2-libpebble
+ source = python2-libpebble-git::git+https://github.com/Hexxeh/libpebble.git
+ md5sums = SKIP
+
+pkgname = python2-libpebble-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3b6516afb04b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Olivier Mehani <shtrom+aur@ssji.net>
+pkgname=python2-libpebble-git
+pkgver=r162.e935e9a
+pkgrel=1
+_python2ver=2.7
+pkgdesc="Python library to interact with the Pebble smartwatch"
+arch=(any)
+url="https://github.com/Hexxeh/libpebble"
+license=('custom')
+depends=(python2-pyserial python2-sh python2-websocket-client-pebble lib-lightblue bluez-utils)
+makedepends=(python2)
+source=(${pkgname}::git+https://github.com/Hexxeh/libpebble.git)
+md5sums=(SKIP)
+conflicts=(=python2-libpebble)
+
+pkgver() {
+ cd "$srcdir/${pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/$pkgname"
+ find . -name '*.py' -exec sed -i "1s/python\s*$/python2/" {} \;
+ find pebble/ -name '*.py' -exec python2 -O -m py_compile {} \;
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+
+ install -d $pkgdir/usr/lib/python${_python2ver}/site-packages/
+ cp -r pebble/ $pkgdir/usr/lib/python${_python2ver}/site-packages/
+ install -D pebble.py $pkgdir/usr/bin/pebble
+ install -D LICENSE "$pkgdir/usr/share/licenses/pkgname/LICENSE"
+}
+
+# vim: sw=2