| 1 | == Source == |
| 2 | To be removed once all major points in this email are covered. |
| 3 | {{{ |
| 4 | From: john_owens@yahoo.com |
| 5 | Subject: my first port - how to |
| 6 | Date: 10 December 2006 08:48:13 EST |
| 7 | To: macports-users@lists.macosforge.org |
| 8 | |
| 9 | Greetings, I'm attempting to write my first port. Writing the portfile |
| 10 | is not too difficult, as there's lots of good examples. However, |
| 11 | actually making it install is a lot tougher. |
| 12 | |
| 13 | I am making it work by: |
| 14 | |
| 15 | - adding the portfile in the right place in /opt/local |
| 16 | - changing the portindex file to add the port info manually (and |
| 17 | making up a number for it) |
| 18 | |
| 19 | However, these things seem really kludgey. Is it not possible to |
| 20 | have a local portfile somewhere and install it using a command |
| 21 | line "port" command? That would seem much better, but I can't find |
| 22 | any documentation on how that's done. (For instance, there's a |
| 23 | local "~/.portsrc" file? but I can't find any docs on it.) |
| 24 | |
| 25 | I think this is the sort of thing that really ought to be on the |
| 26 | wiki - the barrier to entry of adding a portfile is really very |
| 27 | high, and a short guide would be helpful. What it should say: |
| 28 | |
| 29 | - "So you've written a Portfile. Here's how you test it locally." |
| 30 | - "Here's how you prevent it from being clobbered when you |
| 31 | selfupdate." |
| 32 | - "Here's where you put it if you're testing it locally, and want |
| 33 | to leave it local for a while." |
| 34 | - "Your Portfile is awesome. It works. Here's how to add it to |
| 35 | the MacPorts repository." |
| 36 | - "... and here's how you update it." |
| 37 | - "Your Portfile probably has lots of dependencies. Here's how |
| 38 | you tell what they are." |
| 39 | - "Here are naming conventions for ports." |
| 40 | |
| 41 | etc. |
| 42 | |
| 43 | Especially the first one right now would be very useful for me. |
| 44 | |
| 45 | JDO |
| 46 | }}} |