From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DMARC_MISSING, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=4.0.0 Received: from q.math.fu-berlin.de (q.math.fu-berlin.de [160.45.44.194]) by chiba.3jane.net (Postfix) with ESMTP id 4DEF5ABD54 for ; Fri, 14 Jun 2002 01:42:46 -0500 (CDT) Received: (qmail 24868 invoked by uid 10062); 14 Jun 2002 06:42:40 -0000 Date: Fri, 14 Jun 2002 08:42:40 +0200 From: Markus Brischke To: gentoo-dev@gentoo.org Subject: Re: [gentoo-dev] Ebuild Help... Message-ID: <20020614064240.GA24834@Q.math.fu-berlin.de> References: <33782.216.190.203.135.1024027370.squirrel@adamantium.mthmarketing.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33782.216.190.203.135.1024027370.squirrel@adamantium.mthmarketing.com> User-Agent: Mutt/1.3.28i X-Mailer-Info: http://www.zoke.de Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: gentoo-dev@gentoo.org X-Reply-To: zoke-gentoo@zoke.de List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux developer list List-Unsubscribe: , List-Archive: X-Archives-Salt: 66561a6a-99e2-4b4e-9443-40e0518f2740 X-Archives-Hash: de71616578637acf5089fb39e8eb584a Quoting Matthew Walker (mwalker@kydance.net): > I'm writing my first ebuild, and I'm having a hard time figuring out how > to get it to install all the files properly once they've been created in > the image directory. I've included my ebuild file. Any help would be > greatly appreciated. ... > src_install () { > make DESTDIR=${D} install || die > > dodir /usr/bin > dodir /usr/share/doc/${PN}-${PV} > dodir /usr/share/${PN} > dodir /usr/share/${PN}/images > dodir /usr/share/${PN}/sounds > > dobin ${D}/usr/bin/xscorch > dobin ${D}/usr/bin/xscorch-server > > insinto /usr/share/man/man6 > doins ${D}/usr/share/man/man6/${PN}.6.gz > > dodoc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO > } Hi, i have written yesterday my first too ;) If i read all the stuff right the ${D} in the do helperapps is unnecessary. This is hardly ;) explained in the table in http://www.gentoo.org/doc/gentoo-howto.html I read many of the ebuildfiles to get here and there a picture :) There is a usefull manpage (man 5 ebuild) and a usefull skeleton and last but not least the documentation and mailinglistarchive (is there a search mechanism anywhere?). If you are not sure if your installscript puts the thing into right directories (meaning outside PORTAGE_TMPDIR) then use FEATURES="sandbox". If i have read right this will protect you from overwriting you system :) But (!) watch carefully imho not everything is logged. e.g. the bernstein setup mechanism fails using mkdir(), but there is no logwarning because no "new" file|dir created. Another thing is the way how to install things. Imho it is a better style to patch the Makefiles(.in) to improve or correct the ${D} installation than to dodir/dobin/insinto,... doing yourself. The reason for this the potential difference between a "make install" and doing the "same" yourself. I found it maddening in some distros that the packagemaintainers forgot these and that in the package that a "make install" would have installed. Another adavantage would be if the author of the package change the installation your patch won't properly apply (in most cases not in all!). The Request for controlling the makefiles is so right, but in these concepts even the controller make mistakes and every hinting mechanism like sandox and (failed) patching should be used but must not be relied on. I hope this will help you and that i don't say anything wrong :) Markus Brischke aka Zoke