summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxantares2015-06-08 23:36:38 +0200
committerxantares2015-06-08 23:36:38 +0200
commit934bd811898e7ea293f6019fc8bf482a5e713697 (patch)
tree79c20c59ad96a01c185179a338706b4640c122f7
downloadaur-934bd811898e7ea293f6019fc8bf482a5e713697.tar.gz
Initial import
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD50
2 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..90e3a29a35d2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = python-nfc
+ pkgdesc = Python bindings for libnfc
+ pkgver = r70.70a807f
+ pkgrel = 1
+ url = https://github.com/xantares/nfc-bindings
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = cmake
+ makedepends = swig
+ source = git+https://github.com/xantares/nfc-bindings.git
+ md5sums = SKIP
+
+pkgname = python-nfc
+ depends = python
+ depends = libnfc
+
+pkgname = python2-nfc
+ depends = python2
+ depends = libnfc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4bc75dcde97d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+pkgbase=python-nfc
+pkgname=('python-nfc' 'python2-nfc')
+pkgver=r70.70a807f
+pkgrel=1
+pkgdesc='Python bindings for libnfc'
+arch=('i686' 'x86_64')
+license=(BSD)
+url="https://github.com/xantares/nfc-bindings"
+makedepends=('cmake' 'swig')
+source=("git+https://github.com/xantares/nfc-bindings.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/nfc-bindings"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build()
+{
+ cp -r "$srcdir"/nfc-bindings "$srcdir"/nfc-bindings-py2
+
+ cd "$srcdir"/nfc-bindings
+ mkdir -p build && pushd build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr ..
+
+ cd "$srcdir"/nfc-bindings-py2
+ mkdir -p build && pushd build
+ cmake \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
+ -DCMAKE_INSTALL_PREFIX=/usr ..
+}
+
+package_python-nfc()
+{
+ depends=('python' 'libnfc')
+
+ cd "$srcdir"/nfc-bindings/build
+ make DESTDIR="$pkgdir" install
+}
+
+package_python2-nfc()
+{
+ depends=('python2' 'libnfc')
+
+ cd "$srcdir"/nfc-bindings-py2/build
+ make DESTDIR="$pkgdir" install
+ rm -r "$pkgdir"/usr/share
+}
+