Need someone to check the new Portfile
에센 사그노브
esen.sagynov at nhn.com
Wed Dec 21 01:16:07 PST 2011
> Because you made it directly in ${prefix}; you need to make it in ${destroot}${prefix}.
In fact, my first trial was ${destroot}${prefix}/bin. However, the result would be incorrect symlink, i.e. it would link to ${portbuildpath}/work/destroot/opt/local...., which is obviously not what I want. Moreover, after port installation the build directory is auto cleaned. So, nothing is there to link to. Thus, I changed to directly point to prefix.
How should I use ${destroot} and have valid symlink?
> please follow the normal procedure:
Yes I will.
> Possible ${prefix}/libexec/${name} would be an acceptable location, but it would be preferable if you can fit the files into the normal directory structure (see "man porthier").
My initial destination was ${prefix}/lib/${name}. Then I looked through all existing apps in other dirs and though /etc was a better choice. Would /lib be an acceptable location?
Thank you very much for your feedback.
-----Original Message-----
From: "Ryan Schmidt"<ryandesign at macports.org>
To: "에센 사그노브"<esen.sagynov at nhn.com>;
Cc: <macports-dev at lists.macosforge.org>;
Sent: 2011-12-21 (수) 18:03:19
Subject: Re: Need someone to check the new Portfile
On Dec 21, 2011, at 02:55, 에센 사그노브 wrote:
> My name is Esen Sagynov. I have just developed a port for CUBRID Manager, a GUI based database administration tool for CUBRID. CUBRID is a very popular open source SQL database management system in Asia. The community site can be found at http://www.cubrid.org.
>
>
>
> Before I proceed with requesting a commit access, I would like to make sure my code follows the standards.
We consider granting commit access to people who have already demonstrated an ongoing commitment to MacPorts. Since I believe this will be your first contribution, please follow the normal procedure: create a ticket in the issue tracker and attach your proposed Portfile there.
> I have pasted the Portfile code to http://pastebin.com/DZ7DkfER.
>
>
> • Simply put, the software doesn't require any build or installation. It's just extract-and-use type of software.
> • For this reason I skipped build {},
> • and implemented custom destroot {...} which just copies the extracted files to /opt/local/etc/${name}.
${prefix}/etc is not a good place for executable code; typically, only config files would live there.
Possible ${prefix}/libexec/${name} would be an acceptable location, but it would be preferable if you can fit the files into the normal directory structure (see "man porthier").
> • Once extracted and copies to destination, it will have a cubridmanager.app. Since /opt/loca/etc/cubridmanager is not included in the path, I added a symlink to /opt/local/bin.
> So here I need your feedback. How good practice it is to add symlinks to the main App file to ${prefix}/bin?
If you can't install the binaries into ${prefix}/bin directly, then putting a symlink there is fine.
> Or is it better to add final destination dir to users' path? But again, I don't know who is the user, so I can't do this.
Right, so don't do that.
> Another small problem I experience with symlink is that when I uninstall the port, the symlink still remains. Macports doesn't delete it. Why?
Because you made it directly in ${prefix}; you need to make it in ${destroot}${prefix}.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20111221/ad9e4606/attachment-0001.html>
More information about the macports-dev
mailing list