On Sun, Apr 27, 2014 at 08:40:15PM +0200, Michal Lesiak wrote: > Hi Antoine, > > On 2014-04-27 20:09, Antoine Jacoutot wrote: > >If you need to run some scripts/commands before creating the actual > >package, you can use the post-install target. If you need to run some > >scripts/commands automatically after the package is added with pkg_add, I > >think your best bet is to install a script that will run whatever needs be > >and call it with: @exec /path/to/script so that when you do 'pkg_add > >foobar', /path/to/script (which is part of the foobar package) is run. > > That's how it is done now, but I thought there may be a better way to do > that and I'm missing something from the manpages. Thanks for clearing that > up.
We removed the old INSTALL/DEINSTALL scripts, because they are actually less useful than @exec/@exec-add/@exec-update and friends. The main issue with INSTALL is that it was run at a specific moment during pkg_add (all with the cumbersome pre-install/post-install stuff), whereas @exec is run precisely at the location where it happens in the PLIST, so it is the most powerful and generic mechanism...
