PKGBUILD 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com>
  2. # Contributor (Arch): Erkin Batu Altunbaş <erkinbatu@gmail.com>
  3. # Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
  4. # Contributor (Hyperbola): Márcio Silva <coadde@hyperbola.info>
  5. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  6. _pkgname=ponysay-libre
  7. pkgname=ponysay
  8. pkgver=3.0.3
  9. pkgrel=1.parabola1
  10. pkgdesc="cowsay reimplemention for ponies, without nonfree pony graphics"
  11. url="http://erkin.github.com/ponysay/"
  12. arch=('any')
  13. license=('GPL3')
  14. replaces=($_pkgname)
  15. conflicts=($_pkgname)
  16. depends=('python' 'bash')
  17. makedepends=('git')
  18. mksource=("ponysay-$pkgver.tar.gz::https://github.com/erkin/ponysay/tarball/$pkgver")
  19. source=("https://repo.parabola.nu/other/$_pkgname/$_pkgname-$pkgver.tar.gz")
  20. mksha512sums=('ee4340b3a4902465217fcf0e0a31acf2771697ebfff9ce1897d5e0062782efd36ceb91672a6eb45a9b70aeb7f50f48e2ebd7671dab3cf5af1ec4043f2767edd7')
  21. sha512sums=('460dd96fd54494bcfb51983030a54fc57aca6ea17761f2679cb754472a62e3c9532ec9f1af9aa09f5c4dcea510964cfaf05cae31500a45e23ddbd5886c503bc1')
  22. mksource() {
  23. cd "$srcdir/erkin-ponysay-"*
  24. # Generate a nonfree pony graphics list to replace it with empty files
  25. # NOTE: empty files are necessary for the building checking only, --freedom=strict will not include them for the packaging
  26. grep -rIl 'FREE: sharable' | cat > nonfree-pony-graphics-list.txt
  27. grep -rIl 'FREE: no' | cat >> nonfree-pony-graphics-list.txt
  28. # Remove nonfree pony graphics
  29. rm -v $(grep -rIl 'FREE: sharable')
  30. rm -v $(grep -rIl 'FREE: no')
  31. # Generate empty files
  32. for x in $(cat nonfree-pony-graphics-list.txt); do
  33. touch $x
  34. done
  35. # Remove list
  36. rm -v nonfree-pony-graphics-list.txt
  37. }
  38. package() {
  39. cd "$srcdir/erkin-ponysay-"*
  40. python3 setup.py --prefix=/usr --dest-dir=$pkgdir --freedom=strict --everything --with-pdf=/usr/share/doc/ponysay --without-pdf-compression install
  41. }