Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Module Programming
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Config
Retired Dev
Retired Dev


Joined: 25 May 2003
Posts: 187
Location: Zurich, Switzerland

PostPosted: Wed Jul 09, 2003 9:15 pm    Post subject: Module Programming Reply with quote

I just wrote a little proftpd module - but I don't know how to emerge proftp including this module. I would first have to patch the proftpd source and then add another ./configure, directive. How can I do that?
_________________
Config - caught by a chronic disease called tuxmania....
Back to top
View user's profile Send private message
Pythonhead
Developer
Developer


Joined: 16 Dec 2002
Posts: 1801
Location: Redondo Beach, Republic of Calif.

PostPosted: Wed Jul 09, 2003 10:00 pm    Post subject: Reply with quote

Take a look at proftpd-1.2.9_rc1.ebuild, you should be able to tell from that.

Put the new ebuild in /usr/local/portage/net-ftp/proftpd and your patch in /usr/local/portage/net-ftp/proftpd/files

In src_unpack() you can patch it after unpack ${MY_P}.tar.bz2

Add your module to IUSE and check the myconf section, you can add the configure directive there. There are some examples for postgresql and mysql you can copy.
Back to top
View user's profile Send private message
Config
Retired Dev
Retired Dev


Joined: 25 May 2003
Posts: 187
Location: Zurich, Switzerland

PostPosted: Wed Jul 09, 2003 10:18 pm    Post subject: Reply with quote

Hmmm... I sort of don't like this method, although it works. I want to debug/develop this module, not just compile and use it.
I had the idea to download the source, compile it but witout doing a make install. But then, proftpd wouldn't start because it cannot figure out the ip of linux (my hostname). I cannot add it in /etc/hosts, since my ip is configured via dhcp....
But to make your approach work, I would just have to add a cp statement, this is clear - but where do I copy it to? The src_unpack doesn't say anthing about where it unpacks the source.
The configure part is straightforward, correct :wink:
Thanks
_________________
Config - caught by a chronic disease called tuxmania....
Back to top
View user's profile Send private message
Pythonhead
Developer
Developer


Joined: 16 Dec 2002
Posts: 1801
Location: Redondo Beach, Republic of Calif.

PostPosted: Wed Jul 09, 2003 11:42 pm    Post subject: Reply with quote

Config wrote:
The src_unpack doesn't say anthing about where it unpacks the source.


If you do:

Code:
ebuild /usr/portage/net-ftp/proftpd-1.2.9_rc1.ebuild unpack


You'll see what directory it is unpacked in.

A good way to learn what the ebuild variables are, such as ${A}, is to look at the 'environment' file. After you unpack the ebuild look at /var/tmp/portage/proftpd-1.2.9_rc1/temp/environment
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9526
Location: beyond the rim

PostPosted: Thu Jul 10, 2003 3:40 pm    Post subject: Reply with quote

Code:
man 5 ebuild
gives a lot of useful information for ebuilds.
Back to top
View user's profile Send private message
fusion
Tux's lil' helper
Tux's lil' helper


Joined: 02 Nov 2002
Posts: 119

PostPosted: Thu Jul 10, 2003 5:04 pm    Post subject: Reply with quote

This might be a good read

ebuild howto:
http://www.gentoo.org/doc/en/gentoo-howto.xml
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum