logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://anongit.hacktivis.me/git/etc_portage.git/

bashrc (914B)


  1. #!/bin/bash
  2. # Will be ran before configure phase, allowing ebuild to delete blobs themselves in the prepare phase
  3. post_src_prepare() {
  4. local blob_found=0
  5. if fgrep -q -- '-bin$' <<<"${PN}"; then
  6. echo ":: *-bin package, not deblobbing"
  7. elif fgrep -q -- "${PN}" /etc/portage/deblob.ignore; then
  8. echo ":: package is in /etc/portage/deblob.ignore, no removals"
  9. deblob -c -n -e '*/test*/*' -e '*/t/*' -d "${WORKDIR}" || blob_found=1
  10. else
  11. deblob -c -e '*/test*/*' -e '*/t/*' -d "${WORKDIR}" || blob_found=1
  12. fi
  13. if [ $blob_found = 1 ]; then
  14. eqawarn "blobs have been found by deblob, see build.log"
  15. fi
  16. }
  17. # should also do post_pkg_postrm but inst ought to be enough
  18. post_pkg_postinst() {
  19. echo ":: Calling makewhatis"
  20. (
  21. # Somehow otherwise MANPATH isn't set
  22. . /etc/profile
  23. makewhatis -Q -T utf8
  24. for db in ${MANPATH//://mandoc.db }/mandoc.db
  25. do
  26. test -f "$db" && chmod +r "$db"
  27. done
  28. )
  29. }