Creating a new port

C. Florian Ebeling florian.ebeling at gmail.com
Tue Oct 7 08:09:59 PDT 2008


On Tue, Oct 7, 2008 at 4:18 PM, Gaspard Bucher <gaspard at teti.ch> wrote:
>
> On 7 oct. 08, at 16:00, C. Florian Ebeling wrote:
>
>>> I would like to create a port to ease installation of zena (a ruby on
>>> rails based CMS, http://zenadmin.org). The idea is to
>>>
>>> 1. write the dependencies in a Portfile
>>>
>>> build-essential apache2 mysql-server libmagick9-dev gs-gpl libssl-dev
>>> gettext libgettext-ruby libreadline5 libreadline5-dev zlib1g-dev
>>> libncurses5 libncurses5-dev temcap-compat unzip liburi-perl jpeg tiff
>>> ruby rb-rubygems
>>>
>>> 2. trigger a script to install ruby gems, some with specified versions
>>>
>>> gem install gettext --version 1.90.0
>>> gem install RedCloth --version 3.0.4
>>> gem install rake mongrel mongrel_cluster rmagick tzinfo RedCloth
>>> syntax mongrel_upload_progress uuidtools daemons ruby-debug
>>> gem install --source http://www.loonsoft.com/recaptcha/pkg/ recaptcha
>>>
>>> 3. find a way to fetch zena sources somewhere in /opt/... (idealy with
>>> svn/git so it is easy to update the code)
>>>
>>> 4. install a script to start/stop/update zena
>>>
>>>
>>> Is all this a really bad idea because there are other (simpler) ways
>>> to achieve this ?
>>
>> all this is possible right now, with two exceptions:
>> - you cannot specify a gem version, you just have to
>> depend on the port-wrapped gem that is current with
>> macports.
>>
>> - git is not supported for fetching, but svn is.
>
> svn would be fine
>
>>
>>
>> the gem version requirements could be a problem
>> if they exist already and the maintainer is not willing
>> to switch to these versions. but i guess you want rather
>> new versions, and he should usually upgrade if you
>> ask, maybe even with a ticket + patch.
>
> Actually, no, I'm stuck with old ones due to a big redesign in RedCloth 4.
> To avoid this issue, I could include the code from
> these versions into the application's vendor directory (as it is done with
> rails). So that's not a problem.
>
>>
>> if the gem does not exist already, then you can just add
>> that as well and become maintainer. then you have
>> control over the version included in mp.
>
> From the existing ports list, the following gems would need to be added to
> macports:
> mongrel_upload_progress
> syntax
> tzinfo
> uuidtools
> recaptcha
>
>>
>> for starting and stopping there is support present in the
>> form of startup items, see the mp guide.
>>
>> the whole scenario is not a bad idea at all, but rather
>> pretty much the most common use case for mp :)
>>
>> to prepare the ruby ports you  want to use ruby port
>> group functionalty. you can pretty much have a whole
>> port file (or the interesting parts of it) covered by a single
>> call to ruby.setup function.
>
> I'll have to dive into tcl for this (totally unknown language for me). I
> also have to learn how ports src are organised.
>
> Before I jump deep in this, I have a first question about the rb-... ports.
> Why isn't this covered with calls using "gem" ? Is this to have control over
> which versions are included ? To make sure the sources are available during
> install ?

mp just wraps over gem in the case of a gem installation type.


>
> Anyway, thanks for your help, having a macports for zena would be really
> great because I keep getting questions about installation issues and it's
> not very interesting...
>
> I'd love to have a one line answer like:
>
> sudo port install zena

i will see that i put together a section on ruby.setup. might be on
the weekend though.

otherwise you have always the option to put a port request into the
issue tracker, but that does not garuantee you that it happens as
soon, unless zena is popular with mp users/maintainers. and it depends
on quit a few other new ports as well, which need to be added first.

Florian

ps. please use reply-all when responding to the list, mp-dev
does not set reploy-to header, as some other lists do. dont
question this policy, it is an emotional topic :)


>
> :-)
>
> Gaspard
>>
>>
>> unfortunately this call is not properly documented in the
>> guide. i wanted to do this but i didn't have the time right
>> now. you will rather have to look at other portfiles or
>> read the source:
>>
>>
>> http://trac.macports.org/browser/branches/release_1_6/base/src/port1.0/resources/group/ruby-1.0.tcl
>>
>>
>> Florian
>>
>>
>>
>> --
>> Florian Ebeling
>> florian.ebeling at gmail.com
>
>



-- 
Florian Ebeling
florian.ebeling at gmail.com


More information about the macports-dev mailing list