Part 7 Testing & Fixing Installation

WARNING:
THESE ARE MY PERSONAL NOTES ON MY FIRST EBUILD.
THIS IS BY NO MEANS A USEFUL GUIDE OR ANYTHING SIMILAR TO ANYONE.
RTFM

I’ll try to write an ebuild from scratch and document the progress here.

Ebuild from scratch: Part 7 Testing & Fixing Installation

In a second terminal – as normal user – play through the examples at MultiMarkdown – Use.
I got down to the “convenience scripts”, these are still missing.

Adding extra scripts

Cleanup, compile and look for these scripts …
/usr/local/portage/dev-lang/peg-multimarkdown
ebuild peg-multimarkdown-9999.ebuild clean
ebuild peg-multimarkdown-9999.ebuild compile
ls -al /var/tmp/portage/dev-lang/peg-multimarkdown-9999/work/peg-multimarkdown-9999/scripts/

here they are, now where to put them?

They are executable shell-scripts, so this modification of the ebuild file seems appropriate:

src_install() {
	insinto /usr/bin
	dobin multimarkdown || die "Install failed"
	exeinto /usr/bin
	doexe scripts/mmd || die "Scripts install failed"
	doexe scripts/mmd2tex || die "Scripts install failed"
	doexe scripts/mmd2opml || die "Scripts install failed"
	doexe scripts/mmd2odf || die "Scripts install failed"
	# additional scripts: mmd2all  mmd2pdf
}

Note: There are 2 more scripts, but they provoked errors when testing. The 4 scripts are the ones mentioned in the usage guide, so it’s fine for the moment.

Note 2: I included these extra scripts in early tests. They were auto-removed from /usr/bin upon “emerge pkg” once they were no longer in the ebuild.
==> Portage does keep track of what got installed, probably due to using insinto, exeinto, dobin, ...

Testing

Again, open a terminal as normal user and test through the usage guide.

==> Everything works fine.

Todo from here

Now this gives basic functionality on my system, but is nowhere from an ebuild for the public.
An incomplete list of to-do:

  • Dependencies: We did not consider these at all!
  • Advanced installation mentions "if you have perl installed you can use sub-modules" … try including these.
  • Documentation : Not much except one line yet
  • Flags: The sub-modules might be a place to play with package-USE flags.
  • Testing: An ebuild can perform tests and MultiMarkdown has tests. Try it out!

Home: Ebuild From Scratch
Previous chapter: Part 6 Basic Installation
Next chapter: Part 8 Informative ebuild

Advertisements

One comment

  1. José Fournier · · Reply

    Thank you for this. For the first time since I try to understang ebuild creation, it seems to me that Chinese isn’t all that difficult but I am still far from speaking the language.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: