Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2011 09:09:54 -0400
From:      Wesley Shields <wxs@FreeBSD.org>
To:        Gerald Pfeifer <gerald@pfeifer.com>
Cc:        ports@FreeBSD.org, Emanuel Haupt <ehaupt@FreeBSD.org>
Subject:   Re: How to best run a script post installation _and_ deinstallation?
Message-ID:  <20110523130954.GB71868@atarininja.org>
In-Reply-To: <alpine.LNX.2.00.1105222256250.13877@gerinyyl.fvgr>
References:  <alpine.LNX.2.00.1105222256250.13877@gerinyyl.fvgr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 22, 2011 at 11:01:50PM +0200, Gerald Pfeifer wrote:
> Trying to implement the final steps in addressing PR 155568: "bsd.gcc.mk: 
> Fixing dependency not to pick ccache stubs" which I have been working on
> with Emanuel, I'd like to invoke a script after a port/package has been
> installed and again after it has been deinstalled.
> 
> The naive approach below works for installation:
> 
> Index: Makefile
> ===================================================================
> < post-install:
> ---
> > post-install: ccache-update
> 181a182,186
> > post-deinstall ccache-update:
> > 	@if [ -x ${PREFIX}/bin/ccache-update-links ]; then \
> > 	    ${PREFIX}/bin/ccache-update-links -v; \
> > 	fi
> > 
> 
> It does not cover de-installation which raises two questions:
> 
>  1. Why don't we have a post-deinstall target?
> 
>  2. How is the task best accomplished?

Are these what you are looking for:

http://www.freebsd.org/doc/en/books/porters-handbook/pkg-install.html
http://www.freebsd.org/doc/en/books/porters-handbook/pkg-deinstall.html

-- WXS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110523130954.GB71868>