PKGBUILD 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Maintainer (Arch): Levente Polyak <anthraxx[at]archlinux[dot]org>
  2. # Contributor (Arch): Darshit Shah <darnir@gmail.com>
  3. # Maintainer: André Silva <emulatorman@hyperbola.info>
  4. # Contributor: Tobias Dausend <throgh@hyperbola.info>
  5. pkgname=libpsl
  6. pkgver=0.21.0
  7. _debver=$pkgver
  8. _debrel=1.2
  9. pkgrel=3
  10. pkgdesc="Public Suffix List library"
  11. url='https://github.com/rockdaboot/libpsl'
  12. arch=('i686' 'x86_64')
  13. license=('Expat')
  14. depends=('icu>=67.1')
  15. makedepends=('libxslt' 'python' 'publicsuffix' 'quilt')
  16. source=(https://github.com/rockdaboot/libpsl/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz
  17. https://deb.debian.org/debian/pool/main/libp/libpsl/libpsl_${_debver}-${_debrel}.debian.tar.xz)
  18. sha512sums=('165c4f0b0640a813d512bd916e1532e32e43c8c81a5efd048f3a5b07b1b3c9129b4c4b5008b8b11a7c1b3914caea17564321389cd350bf1d687d53a97f2afa4d'
  19. '2e91a28f8575166758a58de4f247988b4355af166316feafc44f47e1b5a516e6e174ba47e1c80093830cf001f21e9b4daf2127e46406d599dda6c2cb714e2284')
  20. prepare() {
  21. cd ${pkgname}-${pkgver}
  22. if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
  23. # Debian patches
  24. export QUILT_PATCHES=debian/patches
  25. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  26. export QUILT_DIFF_ARGS='--no-timestamps'
  27. mv "$srcdir"/debian .
  28. # Doesn't apply
  29. rm -v debian/patches/0001-remove-git-submodules.patch || true
  30. quilt push -av
  31. fi
  32. rm -frv list
  33. autoreconf -fiv
  34. }
  35. build() {
  36. cd ${pkgname}-${pkgver}
  37. ./configure \
  38. --prefix=/usr \
  39. --disable-static \
  40. --disable-dependency-tracking \
  41. --enable-man \
  42. --enable-{builtin,runtime}=libicu \
  43. --with-psl-file=/usr/share/publicsuffix/effective_tld_names.dat \
  44. --with-psl-testfile=/usr/share/publicsuffix/test_psl.txt
  45. sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  46. LC_CTYPE=en_US.UTF-8 make
  47. }
  48. package() {
  49. cd ${pkgname}-${pkgver}
  50. make DESTDIR="${pkgdir}" install
  51. # we don't support gtk-doc
  52. rm -rf $pkgdir/usr/share/gtk-doc
  53. install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
  54. install -Dm 644 docs/libpsl/libpsl.3 -t "${pkgdir}/usr/share/man/man3"
  55. }