general advice about making a portfile and a binary package?

Rainer Müller raimue at macports.org
Fri Mar 13 21:03:37 PDT 2009


On 14.03.2009 4:26 Uhr, Allen McBride wrote:
> Even though I'm not a developer, I've been looking for ways to help  
> make it easier for Mac users to install GNU Solfege.  If one has the  
> dependencies (I have them thanks to all the MacPorts stuff I've  
> installed, I think), Solfege will compile with ./configure, make, sudo  
> make install.  So I thought I might try to make a Portfile for it,  
> even though I've never done anything like that before.  But I followed  
> the instructions, and it worked.  MacPorts installed a working  
> executable in /opt/local/bin.

Nice to hear that. Now to make that available to the wide public, I
would encourage you to submit it via Trac so we can include it in the
official ports tree.

See
http://guide.macports.org/#project.tickets
http://guide.macports.org/#project.contributing

> [...]
> My question is, is there any chance the .dmg file I created will work  
> for other people?  Could I distribute it to brave testers, with  
> warning that it was created by someone who doesn't know what they're  
> doing?  Or would that be guaranteed to fail?  (After I did all this I  
> looked at the archives a bit, and found a message warning that one  
> needs to make the thing install somewhere other than /opt/local/bin.   

If you are going to distribute a package as dmg/pkg or whatever, please
do not use /opt/local as prefix. This gives conflicts if the person is
also using MacPorts. The file installed by a dmg/pkg are not tracked by
MacPorts and therefore could prevent ports being installed.

Also note that dmg/pkg do not offer an easy way for uninstallation.

> Is that just a matter of putting "destroot /usr/local/bin" in the
> Portfile?

No, you would have to install MacPorts to a different prefix and create
the package from there. Download the MacPorts source and use
'./configure --prefix=/opt/whatever' followed by the usual make && make
install. Then create the dmg from this port installation (use
/opt/whatever/bin/port). You would also have to create binary packages
of all dependencies being used.

> And speaking of the archives, is there a way to search them
> without going through one month at a time?)

The mailman archive does not support any advanced searching mechanisms.

The lists are also mirrored by Gmane, which allows access over NNTP, and
different web-based interfaces including search.

http://dir.gmane.org/gmane.os.apple.macports.user
http://dir.gmane.org/gmane.os.apple.macports.devel

Rainer


More information about the macports-users mailing list