Gentoo Development: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
Line 6: Line 6:


* [http://devmanual.gentoo.org/ebuild-writing/variables/index.html A list of important variables] available when writing ebuilds:
* [http://devmanual.gentoo.org/ebuild-writing/variables/index.html A list of important variables] available when writing ebuilds:
** {$S}: Path to the temporary build directory.
** ${S}: Path to the temporary build directory.
** {$P}: Package name and version.
** ${P}: Package name and version.
** {$PV}: Package version.
** ${PV}: Package version.


* ebuild myebuild-1.0.ebuild digest will create the manifest for you. It must be able to access the distribution file. If the SRC_URI does not work yet, put the distfile in /usr/portage/distfiles directly.
* ebuild myebuild-1.0.ebuild digest will create the manifest for you. It must be able to access the distribution file. If the SRC_URI does not work yet, put the distfile in /usr/portage/distfiles directly.

Revision as of 09:21, 22 May 2007

  • If you write a simple ebuild, you still have to place it in the main Portage tree or in an overlay.
  • Apparently you don't get the auto-resume feature automatically. Nor do you get MD5 verification.

General Ebuild development guide

  • A list of important variables available when writing ebuilds:
    • ${S}: Path to the temporary build directory.
    • ${P}: Package name and version.
    • ${PV}: Package version.
  • ebuild myebuild-1.0.ebuild digest will create the manifest for you. It must be able to access the distribution file. If the SRC_URI does not work yet, put the distfile in /usr/portage/distfiles directly.
  • Patches must be kept in the files/ directory of the ebuild location if they are small. They should not be compressed.
  • Create a patch in the following way:
diff -u original-file.c modified-file.c > packagename-1.2.5-file.patch

Java Ebuild writing guide

  • ANT_TASKS can be set (and should be set) manually on the ebuild, but only in src_compile() or src_test().
  • The jar names should not contain version number, if you need to rename them, there is an eclass for that: java-pkg_newjar.
  • If a package provides differents APIs, the package should be always SLOTed based on the version of the API.
  • If you use eclasses such as java-pkg_getjars twice, the jars will be recorded twice in /etc/package.env.