Note:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Ebuild for package without sources"

From Funtoo
Jump to navigation Jump to search
(Created page with "Sometimes we need to create a package without sources - just with init-script, crontab or a config collection. == Method 1 == Just place files in {{f|files}} directory of a p...")
 
Line 21: Line 21:


src_install() {
src_install() {
   newinitd "${FILESDIR}/${PN}.initd" "${PN}"
   newinitd "${FILESDIR}/${PN}.initd" "${PN}" || die
   newconfd "${FILESDIR}/${PN}.confd" "${PN}"
   newconfd "${FILESDIR}/${PN}.confd" "${PN}" || die
}
}
}}
}}
Line 31: Line 31:


== Method 2 ==
== Method 2 ==
If files too large, you can place they in a compressed tar archive and use standard way:
{{file|name=pkg-1.0.ebuild|desc=package ebuild|body=
EAPI=7
DESCRIPTION="HERE A DESCRIPTION"
HOMEPAGE="HERE AN URI"
SRC_URI="PKG_URI"
LICENSE=""
SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE=""
DEPEND=""
RDEPEND="SOME_PACKAGES"
BDEPEND=""
src_install() {
  newinitd "${S}/${PN}.initd" "${PN}" || die
  newconfd "${S}/${PN}.confd" "${PN}" || die
}
}}

Revision as of 11:22, May 15, 2020

Sometimes we need to create a package without sources - just with init-script, crontab or a config collection.

Method 1

Just place files in files directory of a package and make ebuild like the next:

   pkg-1.0.ebuild - package ebuild
EAPI=7

DESCRIPTION="HERE A DESCRIPTION"
HOMEPAGE="HERE AN URI"

LICENSE=""
SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="SOME_PACKAGES"
BDEPEND=""

S="${WORKDIR}"

src_install() {
  newinitd "${FILESDIR}/${PN}.initd" "${PN}"

Note:

  • there is no SRC_URI
  • S is set to $WORKDIR to suppress an error on install phase due to $WORKDIR/$P absence.

Method 2

If files too large, you can place they in a compressed tar archive and use standard way:

   pkg-1.0.ebuild - package ebuild
EAPI=7

DESCRIPTION="HERE A DESCRIPTION"
HOMEPAGE="HERE AN URI"
SRC_URI="PKG_URI"

LICENSE=""
SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="SOME_PACKAGES"
BDEPEND=""

src_install() {
  newinitd "${S}/${PN}.initd" "${PN}"