View previous topic :: View next topic |
Author |
Message |
Martial
Joined: 26 Feb 2006 Posts: 23
|
Posted: Sun Feb 26, 2006 8:29 pm Post subject: module howto?? |
|
|
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 |
|
 |
RedKennedy
Joined: 22 Aug 2005 Posts: 57 Location: The Moon
|
Posted: Mon Feb 27, 2006 3:39 am Post subject: |
|
|
Just read some modules. It's pretty simple. _________________ In Soviet Russia, ISOs install you. |
|
Back to top |
|
 |
sofar

Joined: 11 Aug 2005 Posts: 172
|
|
Back to top |
|
 |
Martial
Joined: 26 Feb 2006 Posts: 23
|
Posted: Tue Feb 28, 2006 12:49 am Post subject: |
|
|
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 |
|
 |
engelsman
Joined: 21 Aug 2005 Posts: 131 Location: Netherlands
|
Posted: Tue Feb 28, 2006 9:18 am Post subject: developing and submitting a module |
|
|
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  |
|
Back to top |
|
 |
dveatch
Joined: 12 Aug 2005 Posts: 18 Location: Port Saint Lucie, Florida
|
Posted: Thu Mar 02, 2006 1:48 pm Post subject: |
|
|
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 |
|
 |
sofar

Joined: 11 Aug 2005 Posts: 172
|
Posted: Fri Mar 03, 2006 5:01 am Post subject: sedit |
|
|
sed is basically 'sed -i':
usage:
Code: | sedit 's/pattern/pattern/g' file [file] [file] .... |
|
|
Back to top |
|
 |
sofar

Joined: 11 Aug 2005 Posts: 172
|
Posted: Fri Mar 03, 2006 5:05 am Post subject: more stuff |
|
|
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 |
|
 |
Martial
Joined: 26 Feb 2006 Posts: 23
|
Posted: Wed Mar 08, 2006 2:35 pm Post subject: Thanks -- still, docs need improved |
|
|
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 |
|
 |
|