Wednesday, 15 July 2015

linux - How to write ebuild for Gentoo correctly -



linux - How to write ebuild for Gentoo correctly -

could help in creating ebuild gbs? workpiece ebuild (modified ebuild osc):

# copyright 1999-2013 gentoo foundation # distributed under terms of gnu general public license v2 # $header: $ eapi=5 python_depend="2:2.7:2.7" inherit distutils description="command line tool building packages tizen platform" homepage="https://source.tizen.org/documentation/reference/git-build-system" license="gpl-2" slot="0" iuse="" keywords="amd64 x86" depend=" >=dev-util/osc-0.131 dev-vcs/git app-arch/rpm dev-util/suse-build " rdepend="${depend} app-admin/sudo dev-util/obs-service-meta " pkg_setup() { python_set_active_version 2 python_pkg_setup } src_unpack() { unpack ${pf}.tar.gz } src_compile() { distutils_src_compile } src_install() { distutils_src_install ### commented original ebuild # #dosym osc-wrapper.py /usr/bin/osc #keepdir /usr/lib/osc/source_validators #cd "${ed}"/usr/ #find . -type f -exec sed -i 's|/usr/bin/build|/usr/bin/suse-build|g' {} + #find . -type f -exec sed -i 's|/usr/lib/build|/usr/share/suse-build|g' {} + #rm -f "${ed}"/usr/share/doc/${pn}*/todo* }

overlay info:

ls /usr/local/portage/dev-util/gbs/ manifest gbs-0.13.tar.gz gbs-0.13_alpha.ebuild gbs-0.13_alpha.tar.gz cat /etc/portage/make.conf | grep distdir distdir="/usr/local/portage/distfiles" emerge -s "%@dev-util/gbs" * dev-util/gbs latest version available: 0.13_alpha latest version installed: [ not installed ] size of files: 0 kb homepage: https://source.tizen.org/documentation/reference/git-build-system description: command line tool building packages tizen platform license: gpl-2

when i'm trying compile ebuild (at to the lowest degree unpack) next error. output of unpacking source code:

ebuild /usr/local/portage/dev-util/gbs/gbs-0.13_alpha.ebuild unpack >>> existing ${t}/environment 'gbs-0.13_alpha' sourced. run >>> 'clean' start fresh environment. >>> not marked unpacked; recreating workdir... * checking ebuild checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> unpacking source... >>> unpacking gbs-0.13_alpha.tar.gz /var/tmp/portage/dev-util/gbs-0.13_alpha/work * error: dev-util/gbs-0.13_alpha failed (unpack phase): * gbs-0.13_alpha.tar.gz not exist * * phone call stack: * ebuild.sh, line 93: called src_unpack * environment, line 3719: called unpack 'gbs-0.13_alpha.tar.gz' * phase-helpers.sh, line 297: called die * specific snippet of code: * [[ ! -s ${srcdir}${x} ]] && die "${x} not exist" * * if need support, post output of `emerge --info '=dev-util/gbs-0.13_alpha'`, * finish build log , output of `emerge -pqv '=dev-util/gbs-0.13_alpha'`. * ebuild overlay named 'x-portage': '/usr/local/portage/' * finish build log located @ '/var/tmp/portage/dev-util/gbs-0.13_alpha/temp/build.log'. * ebuild environment file located @ '/var/tmp/portage/dev-util/gbs-0.13_alpha/temp/environment'. * working directory: '/var/tmp/portage/dev-util/gbs-0.13_alpha/work' * s: '/var/tmp/portage/dev-util/gbs-0.13_alpha/work/gbs-0.13_alpha'

you haven't defined src_uri. that's uses download tarball. don't include in ebuild's directory. if have downloaded beforehand, stick in /usr/portage/distfiles.

also, functions (except maybe pkg_setup, not sure) redundant. default functions work fine please remove them.

linux package gentoo

No comments:

Post a Comment