Changes between Version 3 and Version 4 of snc


Ignore:
Timestamp:
Feb 2, 2009, 1:41:34 PM (15 years ago)
Author:
nerdling (Jeremy Lavergne)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • snc

    v3 v4  
    11= Portfile Development =
    22== MacPorts Guide ==
    3 It's a good idea to start out with the [http://guide.macports.org/#development Portfile Development] section of the MacPorts Guide.  There's a line-by-line explanation in [http://guide.macports.org/#development.creating-portfile Section 4.2] that should help you with creating a portfile.
     3It's a good idea to start out with the [http://guide.macports.org/#development Portfile Development] section of the MacPorts Guide.  There's a line-by-line explanation in [http://guide.macports.org/#development.creating-portfile Section 4.2] that will help you.
    44== Portindex ==
    5 Once you've created your portfile, it's best to test it with your copy of MacPorts.  The first step is to create a local repository to test your portfile. I suggest creating a directory named {{{ports}}} in your home directory.   Inside this new directory, you should run {{{portindex}}} which will create the repository index of everything contained therein.  Note, this command should be run everytime you make changes as it will include the new index data for MacPorts. Also watch out for any errors it reports as this will likely stop the portfile from showing up in MacPorts.
     5Once you've created your portfile, it's best to test it with your copy of MacPorts.  The first step is to create a local repository to test your portfile. I suggest creating a directory named {{{ports}}} in your home directory.   Inside this new directory, you should run {{{portindex}}} which will create the repository index of everything contained therein.  '''Note:''' This command should be run everytime you make changes as it will include the new index data for MacPorts. Also watch out for any errors it reports, which stopp the portfile from showing up in MacPorts.
    66== Port Info ==
    7 Once you have a repository setup and indexed, you can then instruct MacPorts to include this path in {{{${prefix}/etc/macports/sources.conf}}} — the order of this file's content is important as ports are loaded in a first-come-first-serve basis.  To test if your port index is being included, run {{{port info portname}}} where ''portname'' is a port you've placed in your local repository.  If everything worked well, you'll notice information appearing from your local repository's portfile.  Note, if you have a port named the same as an existing one, this will report that there were two copies found with the first it came across being displaying.  This is why the order of repositories listed in {{{sources.conf}}} matters.
     7Once you have a repository setup and indexed, you can then instruct MacPorts to include the repository's path in {{{${prefix}/etc/macports/sources.conf}}} — the order of this file's content is important as ports are loaded in a first-come-first-serve basis.  To test if your port index is being included, run {{{port info portname}}} where ''portname'' is a port you've placed in your local repository.  If everything works well, you'll notice information appearing from your local repository's portfile.  '''Note:''' If you have a port named the same as an existing one, this will report that there are two copies found with the first it came across being displaying.  This is why the order of repositories listed in {{{sources.conf}}} matters.
    88== Port Lint ==
    99Now that your copy of MacPorts is able to interact with your portfile, run {{{port lint --nitpick portname}}} to do a maximum compliance check.  If it reports 0 errors and 0 warnings then you're ready to submit your portfile to MacPorts.  The Contributing to MacPorts section in the Guide on how to create a ticket to ensure your portfile is accepted as quick as possible.