summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChristopher Arndt2018-07-31 16:41:42 +0200
committerChristopher Arndt2018-07-31 16:41:42 +0200
commit621005ea8d80686831ff7a74dbbc9d140bf56ffc (patch)
tree4cdbae267eae07e26eb719575d14344bc1fc13c0 /PKGBUILD
downloadaur-621005ea8d80686831ff7a74dbbc9d140bf56ffc.tar.gz
Add PKGBUILD for new 'python-pigpio' package
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 35 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5de5b035a6c7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>
+
+_projname='pigpio'
+pkgname="python-${_projname}"
+pkgver=67
+pkgrel=1
+pkgdesc="A C and Python library for controlling GPIOs on a Raspberry Pi"
+url="http://abyz.co.uk/rpi/pigpio/"
+license=('custom:UNLICENSE')
+arch=("i686" "x86_64")
+depends=('python')
+source=("https://github.com/joan2937/pigpio/archive/V${pkgver}.tar.gz")
+sha256sums=('4255310dd11ed81035b60711becad081a1eaad2905f704e3eb84e692ca7e4c3d')
+
+
+prepare() {
+ cd "${_projname}-${pkgver}"
+ sed -e '/ldconfig/d' -i Makefile
+ sed -e '/which python2/d' -i Makefile
+ sed -e '/\/opt/d' -i Makefile
+ sed -e 's|\$(prefix)/man|\$(prefix)/share/man|' -i Makefile
+ sed -e 's|setup.py install|setup.py install --root="'"${pkgdir}"'/"|g' -i Makefile
+}
+
+build() {
+ cd "${_projname}-${pkgver}"
+ make
+}
+
+package() {
+ cd "${_projname}-${pkgver}"
+ make prefix=/usr DESTDIR="$pkgdir" install
+ install -Dm644 util/pigpiod.service -t "$pkgdir/usr/lib/systemd/system"
+ install -Dm644 UNLICENCE -t "$pkgdir/usr/share/licenses/$pkgname"
+}