Advertisement
Guest User

Untitled

a guest
Nov 18th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.20 KB | None | 0 0
  1. # Maintainer: Peter Strapp <peter at strapp.co.uk>
  2. # Contributor: Lucas H. Gabrielli <heitzmann@gmail.com>
  3.  
  4. _base=pigpio
  5. pkgname=python-pigpio-git
  6. pkgdesc="C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO)"
  7. pkgver=r121.2bd75cd
  8. pkgrel=1
  9. url="http://abyz.co.uk/rpi/pigpio/"
  10. license=('custom:UNLICENSE')
  11. arch=('x86_64' 'i686' 'armv7h' 'aarch64')
  12. depends=('glibc')
  13. source=("${_base}::git+https://github.com/joan2937/pigpio.git")
  14. options=(!emptydirs)
  15. sha1sums=('SKIP')
  16.  
  17. pkgver() {
  18.   cd "$_base"
  19.   printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  20. }
  21.  
  22. prepare() {
  23.   cd "$_base"
  24.   sed -e '/ldconfig/d' -i Makefile
  25.   sed -e 's|setup.py install|setup.py install --root="'"${pkgdir}"'/"|g' -i Makefile
  26.   sed -e 's|/usr/local|/usr|g' -i Makefile
  27.   sed -e 's|/usr/local|/usr|g' -i MakeRemote
  28.   sed -e 's|/usr/local|/usr|g' -i util/Findpigpio.cmake
  29. }
  30.  
  31. build() {
  32.   cd "$_base"
  33.   make
  34. }
  35.  
  36. package() {
  37.   cd "$_base"
  38.   make DESTDIR="$pkgdir" install
  39.  
  40.     mkdir "${pkgdir}/usr/share"
  41.     mv "${pkgdir}/usr/man" "${pkgdir}/usr/share/man"
  42.  
  43.     install -Dm644 "${srcdir}/${_base}/UNLICENCE" "${pkgdir}/usr/share/licenses/${pkgname}/UNLICENSE"
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement