PKGBUILD 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Maintainer (Arch): Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
  2. # Contributor (Arch): Stéphane Gaudreault <stephane@archlinux.org>
  3. # Contributor (Arch): Allan McRae <allan@archlinux.org>
  4. # Contributor (Arch): judd <jvinet@zeroflux.org>
  5. # Maintainer: André Silva <emulatorman@hyperbola.info>
  6. # Contributor: Márcio Silva <coadde@hyperbola.info>
  7. pkgname=gdbm
  8. pkgver=1.18.1
  9. _debver=1.18.1
  10. _debrel=5.1
  11. pkgrel=3
  12. pkgdesc='GNU database library'
  13. url='https://www.gnu.org/software/gdbm/gdbm.html'
  14. license=(GPL-3)
  15. arch=(i686 x86_64)
  16. depends=(sh)
  17. makedepends=(quilt)
  18. options=(!makeflags)
  19. source=(https://ftp.gnu.org/gnu/gdbm/${pkgname}-${pkgver}.tar.gz{,.sig}
  20. https://deb.debian.org/debian/pool/main/g/gdbm/gdbm_$_debver-$_debrel.debian.tar.xz)
  21. validpgpkeys=('325F650C4C2B6AD58807327A3602B07F55D0C732')
  22. sha512sums=('adf9d6c5bc843ff0d7f88c2a1667d509973b2d63378d0001d7e74cc10aee6ea498a4513cc88ddf78c32ba4db5cb040b2794f4f1b3338c65d9894058850e2f5ef'
  23. 'SKIP'
  24. 'a8e5e70b5962ae6b662d868d8ab2d489a8a187a1f0ab2f46947bc38c2b5cfc1152449359666871ec19bd07a46536a4f49197396a553662de22aa049f4e71d293')
  25. prepare() {
  26. cd $pkgname-$pkgver
  27. if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
  28. # Debian patches
  29. export QUILT_PATCHES=debian/patches
  30. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  31. export QUILT_DIFF_ARGS='--no-timestamps'
  32. mv "$srcdir"/debian .
  33. quilt push -av
  34. fi
  35. }
  36. build() {
  37. cd $pkgname-$pkgver
  38. ./configure --prefix=/usr --enable-libgdbm-compat
  39. make
  40. }
  41. check() {
  42. cd $pkgname-$pkgver
  43. make check
  44. }
  45. package() {
  46. cd $pkgname-$pkgver
  47. make DESTDIR="$pkgdir" install
  48. # create symlinks for compatibility
  49. install -dm755 "$pkgdir"/usr/include/gdbm
  50. ln -sf ../gdbm.h "$pkgdir"/usr/include/gdbm/gdbm.h
  51. ln -sf ../ndbm.h "$pkgdir"/usr/include/gdbm/ndbm.h
  52. ln -sf ../dbm.h "$pkgdir"/usr/include/gdbm/dbm.h
  53. # install license
  54. install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
  55. }