PKGBUILD 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
  2. # Contributor: Johannes Löthberg <johannes@kyriasis.com>
  3. # Contributor: Piotr Gorski <lucjan.lucjanov@gmail.com>
  4. # Contributor: Lucy <lucy@luz.lu>
  5. # Contributor: Bartlomiej Piotrowski <nospam@bpiotrowski.pl>
  6. pkgname=pkgconf
  7. pkgver=1.5.3
  8. pkgrel=1
  9. pkgdesc="Package compiler and linker metadata toolkit"
  10. url="https://git.dereferenced.org/pkgconf/pkgconf"
  11. license=(custom:ISC)
  12. arch=('x86_64' 'ppc64le')
  13. depends=(glibc sh)
  14. makedepends=(git)
  15. provides=(pkg-config pkgconfig)
  16. conflicts=(pkg-config)
  17. replaces=(pkg-config)
  18. groups=(base-devel)
  19. _commit=101b99b5b59d58fe6c6dc46ae22edb049cc0bd3a # tags/pkgconf-1.5.3
  20. source=("git+$url#commit=$_commit" platform-pkg-config.in)
  21. sha256sums=('SKIP'
  22. '7c61338fbd83f9783d805c2f2f97b426977895a2f4b79e0ae5bc8e9d7996edaa')
  23. _pcdirs=/usr/lib/pkgconfig:/usr/share/pkgconfig
  24. _libdir=/usr/lib
  25. _includedir=/usr/include
  26. pkgver() {
  27. cd $pkgname
  28. git describe --tags | sed 's/^pkgconf-//;s/-/+/g'
  29. }
  30. prepare() {
  31. mkdir build
  32. cd $pkgname
  33. ./autogen.sh
  34. }
  35. build() {
  36. cd build
  37. ../$pkgname/configure \
  38. --prefix=/usr \
  39. --sysconfdir=/etc \
  40. --with-pkg-config-dir="$_pcdirs" \
  41. --with-system-libdir="$_libdir" \
  42. --with-system-includedir="$_includedir" \
  43. --disable-static
  44. make
  45. }
  46. package() {
  47. DESTDIR="$pkgdir" make -C build install
  48. # From https://src.fedoraproject.org/rpms/pkgconf/
  49. sed -e "s|@TARGET_PLATFORM@|$CHOST|g" \
  50. -e "s|@PKGCONF_LIBDIRS@|$_pcdirs|g" \
  51. -e "s|@PKGCONF_SYSLIBDIR@|$_libdir|g" \
  52. -e "s|@PKGCONF_SYSINCDIR@|$_includedir|g" \
  53. platform-pkg-config.in |
  54. install -D /dev/stdin "$pkgdir/usr/bin/$CHOST-pkg-config"
  55. ln -s $CHOST-pkg-config "$pkgdir/usr/bin/pkg-config"
  56. # Multilib
  57. if [[ $CARCH = x86_64 ]]; then
  58. _host32=${CHOST/x86_64/i686}
  59. sed -e "s|@TARGET_PLATFORM@|$_host32|g" \
  60. -e "s|@PKGCONF_LIBDIRS@|${_pcdirs/lib/lib32}|g" \
  61. -e "s|@PKGCONF_SYSLIBDIR@|${_libdir/lib/lib32}|g" \
  62. -e "s|@PKGCONF_SYSINCDIR@|$_includedir|g" \
  63. platform-pkg-config.in |
  64. install -D /dev/stdin "$pkgdir/usr/bin/$_host32-pkg-config"
  65. ln -s $_host32-pkg-config "$pkgdir/usr/bin/pkg-config-32"
  66. fi
  67. ln -s pkgconf.1 "$pkgdir/usr/share/man/man1/pkg-config.1"
  68. install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgname/COPYING
  69. }
  70. # vim:set sw=2 et: