Bug #273631 - Add docs for EAPI 4 default src_install function.
authorZac Medico <zmedico@gentoo.org>
Mon, 16 Aug 2010 07:32:50 +0000 (00:32 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 16 Aug 2010 07:32:50 +0000 (00:32 -0700)
doc/package/ebuild/eapi/4.docbook

index b2c558d5530a1bb1a477db90701166c6fa292a67..86604cf1423026b911c906277b9b96b1aba37f42 100644 (file)
@@ -157,5 +157,27 @@ Finally, please note that this new metadata key can be set by eclasses, and the
                        pkg_pretend must not write to the filesystem.
                        </para>
                </section>
+               <section id='package-ebuild-eapi-4_pre1-phases-src-install'>
+                       <title>Default src_install no longer a no-op</title>
+                       <programlisting>
+src_install() {
+       if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then
+               emake DESTDIR="${D}" install
+       fi
+
+       if [[ -z $DOCS ]] ; then
+               local d
+               for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
+                               THANKS BUGS FAQ CREDITS CHANGELOG ; do
+                       [[ -s "${d}" ]] &amp;&amp; dodoc "${d}"
+               done
+       elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then
+               dodoc "${DOCS[@]}"
+       else
+               dodoc ${DOCS}
+       fi
+}
+                       </programlisting>
+               </section>
        </section>
 </section>