1 |
Ernst de Haan wrote: |
2 |
> Hi all, |
3 |
> |
4 |
> |
5 |
> While new to writing Ebuilds, I'm creating one for 'xmlenc', a |
6 |
> Java-based XML output library. I'm using the information I find in the |
7 |
> Gentoo Java Developer Guide ( |
8 |
> http://www.gentoo.org/proj/en/java/java-devel.xml ) |
9 |
> |
10 |
> In the section "Directory Names" it says: |
11 |
> "Javadoc documentation is installed in /usr/share/doc/${PF}/html/api/" |
12 |
> |
13 |
> Then further down it says: |
14 |
> "If the program provides documentation, in particular API |
15 |
> documentation, make certain your ebuild runs javadoc and installs the |
16 |
> documentation using java-pkg_dohtml." |
17 |
> |
18 |
> However, I find that java-pkg_dohtml rather installs in |
19 |
> /usr/share/doc/${PF}/html/ without the "api/" suffix. |
20 |
> |
21 |
> Is this correct behaviour? Is there a flag that will install the |
22 |
> Javadoc in a subdirectory of the "html" directory? |
23 |
> |
24 |
> |
25 |
As you have pointed out, currently java-pkg_dohtml does not |
26 |
automatically put the javadocs into the api/ directory. |
27 |
|
28 |
Instead, what you need to do is make sure that the javadocs somehow get |
29 |
into a directory named 'api', and then call 'java-pkg_dohtml -r ' on |
30 |
that directory. If the package uses ant, sometimes the destination of |
31 |
javadocs is controlled by a property, so you could redefine that to be |
32 |
'api'. But the simplest way would be to simply rename the directory |
33 |
where the javadocs live to 'api'. |
34 |
|
35 |
I've mentioned this before somewhere, but maybe we should have a |
36 |
dojavadoc function in the eclass, or more generically doapidoc? |
37 |
|
38 |
It could be something like: |
39 |
doapidoc() { |
40 |
local orig_dir=${1} |
41 |
local api_dir=${orig_dir} |
42 |
if [[ $(basename ${orig_dir}) != api ]]; then |
43 |
api_dir=${T}/api |
44 |
cp -r ${orig_dir} ${api_dir} |
45 |
fi |
46 |
dohtml -r ${api_dir} |
47 |
} |
48 |
(Sorry if its a little rough, just wanted to get the idea out). |
49 |
|
50 |
> Note that I plan to write another Ebuild for a Java-based framework |
51 |
> (XINS) that would come with both Javadoc API documentation and log |
52 |
> documentation, so in that case I wonder which function I should use |
53 |
> for the latter. Should it be java-pkg_dohtml or just dohtml ? |
54 |
> |
55 |
It probably doesn't matter which you use for installing the log |
56 |
documentation, although I would personally use java-pkg_dohtml to be on |
57 |
the safe side. |
58 |
|
59 |
I also suggest you create a new bug over at bugs.gentoo.org, so that |
60 |
others can contribute, provide feedback, and monitor the progress. |
61 |
Additionally, you may want to lurk around #gentoo-java on |
62 |
irc.freenode.net for ebuild pointers. |
63 |
|
64 |
-- |
65 |
|
66 |
Josh |
67 |
-- |
68 |
gentoo-java@g.o mailing list |