(This may be a duplicate report - I can't see original on Bugzilla) In Samba 3.0.21rc2 (also rc1 and pre1): 1) Script makepkg.sh builds a Solaris package but pkgadd fails with error message about "duplicate paths". Problem seems to be in file prototype.master. If I edit that file problem goes away. 2) Script makepkg.sh rebuilds Samba with incorrect configure options. I can work around by specifying parameter "nobuild" but the damage is done. The script default behaviousr should probably not be to rebuild Samba without warning user and if it does then it shold use the user's own configure options. 3) (related) Script makepkg builds package to install in /opt by default even if /usr/local was specified to configure by user.
The script is intended to be edited for you build. You have to change the install base and any configure options for your package build. I have changed the default to only run make when you run 'makepkg.sh build'