On 2012/05/01 01:37, Matthias Kilian wrote:
> This is based on a script written during p2k10 (when jasper@ and i
> moved all hs-libraries from lib to lib/ghc). I'm using it for ages
> to generate the exec/unexec lines in hs-ports (and recently to work
> around some flaws in update-plist, but espie@ is currently working
> on that one).
> 
> I'm using it for updates (after make update-plist) and even for new
> hs-ports (after make plist) to get the @exec/@unexec lines in place.
> 
> #!/bin/sh
> if [ $# -eq 0 ]; then
>       set pkg/PLIST
> fi
> for plist; do
>       ed -s "$plist" <<- 'EOF'
>               g/\${FULLPKGNAME}/s/\${FULLPKGNAME}/hs-${DISTNAME}/g
>               g/^@exec .*%D\/lib\/ghc\/\${DISTNAME}\/register\.sh/d
>               g/^@unexec .*%D\/lib\/ghc\/\${DISTNAME}\/unregister\.sh/d
>               /^lib\/ghc\/\${DISTNAME}\/register\.sh$/a
>               @exec /usr/bin/env HOME=/nonexistent 
> %D/lib/ghc/${DISTNAME}/register.sh -v0
>               @unexec /usr/bin/env HOME=/nonexistent 
> %D/lib/ghc/${DISTNAME}/unregister.sh -v0 --force
>               .
>               wq
>       EOF
> done
> 

might be considered overkill, but I think it would be rather nice if
we could have little fragments on a per-port or per-module basis that
update-plist can use to adjust plists like this, put files matching
certain patterns into certain subpackages, etc.

Reply via email to