module howto??

 
Post new topic   Reply to topic    Lunar-Linux Forum Index -> Development
View previous topic :: View next topic  
Author Message
Martial



Joined: 26 Feb 2006
Posts: 23

PostPosted: Sun Feb 26, 2006 8:29 pm    Post subject: module howto?? Reply with quote

I've been using Lunar Linux for a few years, and I would like to experiment with writing some modules for my use here, and for possible sharing later.

Am I mistaken or is there a total lack of documentation for how to write a module? The only documentation I could find was about "details." In an attempt to learn directly what happens at package install time, I examined sbin/lin, but it is rather difficult to understand.
Back to top
View user's profile Send private message
RedKennedy



Joined: 22 Aug 2005
Posts: 57
Location: The Moon

PostPosted: Mon Feb 27, 2006 3:39 am    Post subject: Reply with quote

Just read some modules. It's pretty simple.
_________________
In Soviet Russia, ISOs install you.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
sofar



Joined: 11 Aug 2005
Posts: 172

PostPosted: Mon Feb 27, 2006 8:23 am    Post subject: Reply with quote

http://wiki.lunar-linux.org/index.php/Module_Basics
Back to top
View user's profile Send private message Send e-mail
Martial



Joined: 26 Feb 2006
Posts: 23

PostPosted: Tue Feb 28, 2006 12:49 am    Post subject: Reply with quote

RedKennedy wrote:
Just read some modules. It's pretty simple.


O.K, so for example, where do I find out what default_make stands for? And what is "sedit?" "Sedit" is not a bash command, so what is it? Sorry for my ignorance, but I would be grateful for some hand-holding.
Back to top
View user's profile Send private message
engelsman



Joined: 21 Aug 2005
Posts: 131
Location: Netherlands

PostPosted: Tue Feb 28, 2006 9:18 am    Post subject: developing and submitting a module Reply with quote

I'm only a Lunar user, and not a developer, so can't help you directly. Apart from the skeleton document that sofar mentioned above, I vaguely remember seeing an article in the mailing list archives describing the process of setting up and submitting a module. Unfortunately there's no search facility in the archives, and when I skimmed the subject lines going back to the middle of last year nothing obvious leapt off the screen at me. Maybe it's older than that...

One of the regulars on #lunar recently pasted up a link to a similar article too, so maybe you could ask there and whoever it was might still have the link lying around. If you're in the same timezone that is Smile
Back to top
View user's profile Send private message
dveatch



Joined: 12 Aug 2005
Posts: 18
Location: Port Saint Lucie, Florida

PostPosted: Thu Mar 02, 2006 1:48 pm    Post subject: Reply with quote

Martial wrote:
RedKennedy wrote:
Just read some modules. It's pretty simple.


O.K, so for example, where do I find out what default_make stands for? And what is "sedit?" "Sedit" is not a bash command, so what is it? Sorry for my ignorance, but I would be grateful for some hand-holding.


default_make is a predefined variable that can be found in /var/lib/lunar/functions/build.lunar (in this case). It saves the module builder the hassle of putting; make, prepare_install and make install in the BUILD file of the module.

If you look in /var/lib/lunar/functions you will see a number of other files used by the Lunar specific commands such as "lin", "lrm", etc.

As for "sedit". Yeah that's a good one cause till I started using Lunar, had never heard of that command and like you found it's not exactly a bash command. Having said that though. It functions just like "sed" being run from cli.
_________________
You can tune a piano but you can't tuna fish.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number
sofar



Joined: 11 Aug 2005
Posts: 172

PostPosted: Fri Mar 03, 2006 5:01 am    Post subject: sedit Reply with quote

sed is basically 'sed -i':

usage:

Code:
sedit 's/pattern/pattern/g' file [file] [file] ....
Back to top
View user's profile Send private message Send e-mail
sofar



Joined: 11 Aug 2005
Posts: 172

PostPosted: Fri Mar 03, 2006 5:05 am    Post subject: more stuff Reply with quote

default_build ==

Code:
default_config &&
default_make


default_config ==

Code:
./configure --prefix=/usr etc etc etc (a whole lot of stuff here)


default_make ==

Code:
make &&
prepare_install &&
make install


You are REQUIRED to put 'prepare_install' in every BUILD file - it is needed to properly _upgrade_ a module (it actually removes the current install of the module and sets various things for the new install). On the first install it does nothing however (of course...).
Back to top
View user's profile Send private message Send e-mail
Martial



Joined: 26 Feb 2006
Posts: 23

PostPosted: Wed Mar 08, 2006 2:35 pm    Post subject: Thanks -- still, docs need improved Reply with quote

dveatch wrote:
Martial wrote:
RedKennedy wrote:
Just read some modules. It's pretty simple.


O.K, so for example, where do I find out what default_make stands for? And what is "sedit?" "Sedit" is not a bash command, so what is it? Sorry for my ignorance, but I would be grateful for some hand-holding.


default_make is a predefined variable that can be found in /var/lib/lunar/functions/build.lunar (in this case). It saves the module builder the hassle of putting; make, prepare_install and make install in the BUILD file of the module.

If you look in /var/lib/lunar/functions you will see a number of other files used by the Lunar specific commands such as "lin", "lrm", etc.

As for "sedit". Yeah that's a good one cause till I started using Lunar, had never heard of that command and like you found it's not exactly a bash command. Having said that though. It functions just like "sed" being run from cli.


That is really good advice, thanks. It does seem to show that there needs to be more documenation of how to construct modules. I don't really think it's enough to say, "just look at some modules," not if you want to encourage Lunar development, anyway.

Maybe someday, if I can ever come to understand just how it works, I'll contribute some documentation myself.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Lunar-Linux Forum Index -> Development 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


Powered by phpBB © 2001, 2005 phpBB Group