The reason why permissions should be set in the PKGBUILD is because that way pacman can track them.
Interesting. I didn't know Pacman could do that. The phrases "UID", "uid" and "gid" do not appear in the man pages for pacman or pkgbuild. Is this undocumented behaviour?
Then it's up to the maintainer to choose UIDs/GIDs that do not conflict with official packages, and to the user to check that they don't already use that particular UID/GID ,before installing an AUR package.
Ick. I think that's an unnecessary and unreasonable expectation that results in a more fragile and unmaintainble system. As for a better solution? Hmm. `install` (and probably other tools too) can reference user and group names directly. Thus, this:
install -o141 -g141 -dm750 "${pkgdir}/var/log/inspircd"
Could also be written as this:
install -o inspircd -g inspircd -dm750 "${pkgdir}/var/log/inspircd"
--Jeremy