Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 2008 20:49:29 +0400
From:      Boris Samorodov <bsam@ipt.ru>
To:        "Ganael LAPLANCHE" <ganael.laplanche@martymac.com>
Cc:        ports@freebsd.org, emulation@FreeBSD.org
Subject:   Re: USE_LINUX_RPM and PORTDOCS
Message-ID:  <15111974@ipt.ru>
In-Reply-To: <20080524160433.M17651@martymac.com> (Ganael LAPLANCHE's message of "Sat\, 24 May 2008 18\:05\:42 %2B0200 \(CEST\)")
References:  <20080524073145.M76509@martymac.com> <07923414@ipt.ru> <20080524150909.M12444@martymac.com> <20080524160433.M17651@martymac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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}".

> Note that two
> other linux ports are subject to the same problem as mine :
> /usr/ports/graphics/linux-png and /usr/ports/graphics/linux-png10.

Yes, that's why I said that fixing bsd.linux-rpm.mk is a better idea.
If you can suggest a patch and send-pr it, that would be great!


-- 
WBR, bsam



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15111974>