Bug 155406

Summary: Add a target to bsd.port.mk which hooks in the package install sequence
Product: Ports & Packages Reporter: Ashish SHUKLA <ashish>
Component: Individual Port(s)Assignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Ashish SHUKLA freebsd_committer freebsd_triage 2011-03-09 12:30:11 UTC
I'm going to submit couple of 'haskell' ports. I've moved all of their common (or duplicate) functionality in a separate
Makefile, thus avoiding any duplicacy. All of these ports are supposed to execute some commands
post-installation. There are two ways to achieve this:

* pkg-install file. I could create a common pkg-install file, and place it in a master port directory which all of these
  'haskell' ports reference from there Makefile (PKGINSTALL variable) similar to dns/bind{96,97} ports. This approach is
  nice, but the problem is that common pkg-install makes harder to add individual changes for each port if needed.

* post-install-script target. I could implement "post-install-script" target in the common Makefile and then I can
  append @exec/@unexec tasks to the ${TMPPLIST}. This approach is nice, and allows ports to implement their own
  pkg-install as well for post-install tasks specific to the port. The only problem with this approach is that it gets
  executed before 'add-plist-info', 'add-plist-docs', etc. tasks, and the commands which I'm looking forward to execute
  relies on documentation files to be installed, via built-in PORTDOCS functionality (which is taken care by
  'add-plist-docs' target).

So, I'm proposing another hook target named 'post-add-script', same as 'post-install-script', but gets invoked after all
the 'add-*' targets (listed in _INSTALL_SUSEQ) are executed.

Thanks to Doug Barton, Eitan Adler, and PÃLI Gábor János for their inputs to this problem.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-03-09 12:30:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool)
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2011-04-23 21:43:20 UTC
State Changed
From-To: open->closed

Your proposed solution has worked for us, and I 
guess it's fine to close that PR now. :) 

Thanks 
--  
Ashish SHUKLA