template 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Template file for 'ponysay'
  2. pkgname=ponysay
  3. version=3.0.3
  4. revision=4
  5. archs=noarch
  6. hostmakedepends="python3 texinfo"
  7. depends="python3"
  8. short_desc="Pony rewrite of cowsay"
  9. maintainer="Leah Neukirchen <leah@vuxu.org>"
  10. license="GPL-3.0-or-later"
  11. homepage="https://erkin.github.com/ponysay/"
  12. distfiles="https://github.com/erkin/${pkgname}/archive/${version}.tar.gz"
  13. checksum=c382d7f299fa63667d1a4469e1ffbf10b6813dcd29e861de6be55e56dc52b28a
  14. patch_args="-Np1"
  15. post_extract() {
  16. # Generate a nonfree pony graphics list to replace it with empty files
  17. # NOTE: empty files are necessary for the building checking only, --freedom=strict will not include them for the packaging
  18. grep -rIl 'FREE: sharable' | cat > nonfree-pony-graphics-list.txt
  19. grep -rIl 'FREE: no' | cat >> nonfree-pony-graphics-list.txt
  20. # Remove nonfree pony graphics
  21. rm -v $(grep -rIl 'FREE: sharable')
  22. rm -v $(grep -rIl 'FREE: no')
  23. # Generate empty files
  24. for x in $(cat nonfree-pony-graphics-list.txt); do
  25. touch $x
  26. done
  27. # Remove list
  28. rm -v nonfree-pony-graphics-list.txt
  29. }
  30. do_install() {
  31. python3 setup.py --prefix=/usr --dest-dir=$DESTDIR \
  32. --freedom=strict --everything \
  33. --with-pdf=/usr/share/doc/ponysay --without-pdf-compression \
  34. --with-custom-env-python=python3 \
  35. install
  36. }