This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

libdwarf.pkgbuild

By: a guest on May 13th, 2010  |  syntax: Bash  |  size: 1.85 KB  |  views: 232  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. pkgname=libdwarf
  2. pkgver=20100404
  3. pkgrel=1
  4. pkgdesc="Library for accessing the DWARF Debugging file format"
  5. arch=(i686 x86_64)
  6. license=('LGPL')
  7. url="http://reality.sgiweb.org/davea/dwarf.html"
  8. depends=()
  9. makedepends=()
  10. options=()
  11. source=(http://reality.sgiweb.org/davea/${pkgname}-${pkgver}.tar.gz
  12.         libdwarf-pic.patch)
  13. md5sums=('4c560e285bcfe0f1b767509ec9694402'
  14.          'b14262cdd350f98ce8c50d4441df6436')
  15.  
  16. build() {
  17.   cd "${srcdir}/dwarf-${pkgver}/libdwarf" || return 1
  18.  
  19.   patch -Np2 -i "${srcdir}/libdwarf-pic.patch" || return 1
  20.  
  21.   ./configure \
  22.      --prefix=/usr \
  23.      --enable-shared || return 1
  24.   make || return 1
  25.   ln -s libdwarf.so.0.0 libdwarf.so.0 || return 1
  26.   ln -s libdwarf.so.0 libdwarf.so || return 1
  27.   cat <<EOF >libdwarf.pc
  28. prefix=/usr
  29. exec_prefix=\${prefix}
  30. libdir=\${exec_prefix}/lib
  31. includedir=\${prefix}/include
  32.  
  33. Name: libdwarf
  34. Description: DWARF debug format access library
  35. Version: ${pkgver}
  36. Requires:
  37. Conflicts:
  38. Libs: -L\${libdir} -ldwarf
  39. Cflags: -I\${includedir}/libdwarf
  40. EOF
  41.  
  42.   cd "${srcdir}/dwarf-${pkgver}/dwarfdump2" || return 1
  43.   ./configure \
  44.      --prefix=/usr || return 1
  45.   LD_LIBRARY_PATH="../libdwarf" \
  46.   make || return 1
  47. }
  48.  
  49. package() {
  50.   cd "${srcdir}/dwarf-${pkgver}" || return 1
  51.  
  52.   install -Dm644 libdwarf/dwarf.h \
  53.     "${pkgdir}/usr/include/libdwarf/dwarf.h" || return 1
  54.   install -Dm644 libdwarf/libdwarf.h \
  55.     "${pkgdir}/usr/include/libdwarf/libdwarf.h" || return 1
  56.   install -Dm755 libdwarf/libdwarf.so.0.0 \
  57.     "${pkgdir}/usr/lib/libdwarf.so.0.0" || return 1
  58.   ln -s libdwarf.so.0.0 "${pkgdir}/usr/lib/libdwarf.so.0" || return 1
  59.   ln -s libdwarf.so.0 "${pkgdir}/usr/lib/libdwarf.so" || return 1
  60.   install -Dm644 libdwarf/libdwarf.pc \
  61.     "${pkgdir}/usr/lib/pkgconfig/libdwarf.pc" || return 1
  62.   install -Dm755 dwarfdump2/dwarfdump \
  63.     "${pkgdir}/usr/bin/dwarfdump" || return 1
  64. }
clone this paste RAW Paste Data