bashrc (914B)
- #!/bin/bash
- # Will be ran before configure phase, allowing ebuild to delete blobs themselves in the prepare phase
- post_src_prepare() {
- local blob_found=0
- if fgrep -q -- '-bin$' <<<"${PN}"; then
- echo ":: *-bin package, not deblobbing"
- elif fgrep -q -- "${PN}" /etc/portage/deblob.ignore; then
- echo ":: package is in /etc/portage/deblob.ignore, no removals"
- deblob -c -n -e '*/test*/*' -e '*/t/*' -d "${WORKDIR}" || blob_found=1
- else
- deblob -c -e '*/test*/*' -e '*/t/*' -d "${WORKDIR}" || blob_found=1
- fi
- if [ $blob_found = 1 ]; then
- eqawarn "blobs have been found by deblob, see build.log"
- fi
- }
- # should also do post_pkg_postrm but inst ought to be enough
- post_pkg_postinst() {
- echo ":: Calling makewhatis"
- (
- # Somehow otherwise MANPATH isn't set
- . /etc/profile
- makewhatis -Q -T utf8
- for db in ${MANPATH//://mandoc.db }/mandoc.db
- do
- test -f "$db" && chmod +r "$db"
- done
- )
- }