Changes between Version 25 and Version 26 of snc


Ignore:
Timestamp:
Feb 6, 2009, 2:22:58 PM (15 years ago)
Author:
nerdling (Jeremy Lavergne)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • snc

    v25 v26  
    11= Portfile Development =
    2 == MacPorts Guide ==
     2=== MacPorts Guide ===
    33It'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 write a portfile from scratch.
    44=== Diamonds in the Rough ===
     
    4040
    4141{{{${extract.suffix} }}}defaults to {{{.tar.gz}}}
    42 == Portindex ==
     42= Portfile Testing =
     43=== Portindex ===
    4344Once you've created your portfile, it's best to test it with your copy of MacPorts.  The first step is to create a [http://guide.macports.org/#development.local-repositories local portfile repository] for testing. For this, I suggest creating the directory {{{~/ports}}}.   Inside this new directory, you should run {{{portindex}}} which will create the repository index of everything following the {{{./group/port/Portfile}}} heirarchy.  '''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 stop the portfile from showing up in MacPorts.
    44 == Port Info ==
     45=== Port Info ===
    4546Once 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 encounter being displayed.  This is why the order of repositories listed in {{{sources.conf}}} matters.
    46 == Port Lint ==
    47 Now 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.  [http://guide.macports.org/#project.contributing Contributing to MacPorts] shows how to create a ticket for quickest acceptance.
    48 == Disabling Your Local Repository ==
     47=== Port Lint ===
     48Now 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. 
     49= Completion =
     50=== Submitting Ticket ===
     51See [http://guide.macports.org/#project.contributing Contributing to MacPorts] on how to create a ticket.
     52=== Disabling Your Local Repository ===
    4953Once you're done with development, you can disable your local repository by commenting the line out of your {{{sources.conf}}} file.  You can optionally delete your repository's directory, however I suggest keeping it as you can use it for reference when working on future portfiles, and it saves you from having to recreate the directory.