From owner-freebsd-ports@FreeBSD.ORG Sat May 24 17:35:55 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87BDD106566C; Sat, 24 May 2008 17:35:55 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 5480C8FC1F; Sat, 24 May 2008 17:35:55 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A577B6.dip.t-dialin.net [84.165.119.182]) by redbull.bpaserver.net (Postfix) with ESMTP id E37E62E0D7; Sat, 24 May 2008 19:35:48 +0200 (CEST) Received: from deskjail (unknown [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 3085C109695; Sat, 24 May 2008 19:35:46 +0200 (CEST) Date: Sat, 24 May 2008 19:35:45 +0200 From: Alexander Leidinger To: Boris Samorodov Message-ID: <20080524193545.0167e8a4@deskjail> In-Reply-To: <15111974@ipt.ru> References: <20080524073145.M76509@martymac.com> <07923414@ipt.ru> <20080524150909.M12444@martymac.com> <20080524160433.M17651@martymac.com> <15111974@ipt.ru> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.8; i686-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-13.4, required 6, BAYES_00 -15.00, MR_STRANGE_QUESTION 1.50, NO_RDNS 0.50, RDNS_DYNAMIC 0.10, SMILEY -0.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: ports@freebsd.org, emulation@FreeBSD.org, Ganael LAPLANCHE Subject: Re: USE_LINUX_RPM and PORTDOCS X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2008 17:35:55 -0000 Quoting Boris Samorodov (Sat, 24 May 2008 20:49:29 +0400): > On Sat, 24 May 2008 18:05:42 +0200 (CEST) Ganael LAPLANCHE wrote: > > On Sat, 24 May 2008 17:27:04 +0200 (CEST), Ganael LAPLANCHE wrote > > > On Sat, 24 May 2008 13:04:57 +0400, Boris Samorodov wrote > > > > > > > I'd suggest another option. What about fixing bsd.linux-rpm.mk? Ex., > > > > one may introduce, say, a pre-install target (or even do it at the > > > > very beginning of a do-install stage) and conditionally delete > > > > unneeded files from WRKDIR (so they won't get installed at do-install > > > > stage). > > > > > > Thanks for your answer :) > > > > > > Of course, fixing bsd.linux-rpm.mk would be the best option ! > > > > > > Your idea is good, but PORTDOCS would not be useable for that purpose. > > > It cannot be used to identify files to delete because it is relative > > > to the destination target (DOCSDIR), not to WRKDIR or WRKSRC. > > > Wait... DOCSDIR_REL (relative to PREFIX) is derived from DOCSDIR and *may* be > > also always relative to WRKDIR for linux RPMs, since RPM installation is just a > > copy of a tree structure which is relative to PREFIX. So maybe I was wrong here. > > Anyway, if I add that to my archivers/linux-par2cmdline port's Makefile : > > > .if defined(NOPORTDOCS) > > post-extract: > > .for x in ${PORTDOCS} > > @${RM} ${WRKDIR}/${DOCSDIR_REL}/${x} > > .endfor > > @${RMDIR} ${WRKDIR}/${DOCSDIR_REL}/ > > .endif > > > It works :) So I think I'll stick to that solution at the moment. > > Great, but I'd say that it should be done a little bit later (may be > at pre-install stage). "Extract" stage according to bsd.ports.mk > "Unpacks ${DISTFILES} into ${WRKDIR}". Removing unwanted stuff in post-extract is not uncommon. I don't think a patch for linux-rpm.mk with something like this would be a bad solution. Bye, Alexander. -- Cats, no less liquid than their shadows, offer no angles to the wind. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137