All of lore.kernel.org
 help / color / mirror / Atom feed
* Multiple packages from single recipe file
@ 2015-02-09 10:51 Bipnesh, Abhinav (Abhinav)
  2015-02-09 13:16 ` Victor Rodriguez
  0 siblings, 1 reply; 6+ messages in thread
From: Bipnesh, Abhinav (Abhinav) @ 2015-02-09 10:51 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

Hi,

I was looking further into the document to find a way to define multiple packages from a single recipe file. As in current recipe I have written a do_install() function for putting files in particular directories. So it copies files from ${S} to ${D}.
But some of the documents talk about multiple package something as below

FILES_${PN} = "\
    ${bindir}/* \
    ${sbindir}/* \
    ${libexecdir}/* \
    ${libdir}/lib*.so.* \
    ${sysconfdir} \
    ${sharedstatedir} \
    ${localstatedir} \
    /bin/* \
    /sbin/* \
    /lib/*.so* \
    ${datadir}/${PN} \
    ${libdir}/${PN}/* \
    ${datadir}/pixmaps \
    ${datadir}/applications \
    ${datadir}/idl \
    ${datadir}/omf \
    ${datadir}/sounds \
    ${libdir}/bonobo/servers"


FILES_${PN}-dbg = "\

    ${bindir}/.debug \

    ${sbindir}/.debug \

    ${libexecdir}/.debug \

    ${libdir}/.debug \

    /bin/.debug \

    /sbin/.debug \

    /lib/.debug \

    ${libdir}/${PN}/.debug"

But I am not getting how the source for such file will be determine as in our project files will be present in different directories and need to be placed in some predefined paths.

So how we can achieve the same.

Thanks,
Abhinav

[-- Attachment #2: Type: text/html, Size: 6284 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple packages from single recipe file
  2015-02-09 10:51 Multiple packages from single recipe file Bipnesh, Abhinav (Abhinav)
@ 2015-02-09 13:16 ` Victor Rodriguez
  2015-02-09 13:25   ` Bipnesh, Abhinav (Abhinav)
  0 siblings, 1 reply; 6+ messages in thread
From: Victor Rodriguez @ 2015-02-09 13:16 UTC (permalink / raw)
  To: Bipnesh, Abhinav (Abhinav); +Cc: yocto

On Mon, Feb 9, 2015 at 4:51 AM, Bipnesh, Abhinav (Abhinav)
<abhinavbipnesh@avaya.com> wrote:
> Hi,
>
>
>
> I was looking further into the document to find a way to define multiple
> packages from a single recipe file. As in current recipe I have written a
> do_install() function for putting files in particular directories. So it
> copies files from ${S} to ${D}.
>
> But some of the documents talk about multiple package something as below
>
>
>
> FILES_${PN} = "\
>
>     ${bindir}/* \
>
>     ${sbindir}/* \
>
>     ${libexecdir}/* \
>
>     ${libdir}/lib*.so.* \
>
>     ${sysconfdir} \
>
>     ${sharedstatedir} \
>
>     ${localstatedir} \
>
>     /bin/* \
>
>     /sbin/* \
>
>     /lib/*.so* \
>
>     ${datadir}/${PN} \
>
>     ${libdir}/${PN}/* \
>
>     ${datadir}/pixmaps \
>
>     ${datadir}/applications \
>
>     ${datadir}/idl \
>
>     ${datadir}/omf \
>
>     ${datadir}/sounds \
>
>     ${libdir}/bonobo/servers"
>
>
>
> FILES_${PN}-dbg = "\
>
>     ${bindir}/.debug \
>
>     ${sbindir}/.debug \
>
>     ${libexecdir}/.debug \
>
>     ${libdir}/.debug \
>
>     /bin/.debug \
>
>     /sbin/.debug \
>
>     /lib/.debug \
>
>     ${libdir}/${PN}/.debug"
>
>
>
> But I am not getting how the source for such file will be determine as in
> our project files will be present in different directories and need to be
> placed in some predefined paths.
>
>
>
> So how we can achieve the same.
>
>
>
> Thanks,
>
> Abhinav
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


Hi , basically the yocto recepeis work exactly as an spec file:

www.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html

The scenario you mention is possible:

rpm5.org/docs/rpm-guide.html

Hope it helps

Victor Rodriguez


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple packages from single recipe file
  2015-02-09 13:16 ` Victor Rodriguez
@ 2015-02-09 13:25   ` Bipnesh, Abhinav (Abhinav)
  2015-02-09 14:13     ` Anders Darander
  0 siblings, 1 reply; 6+ messages in thread
From: Bipnesh, Abhinav (Abhinav) @ 2015-02-09 13:25 UTC (permalink / raw)
  To: Victor Rodriguez; +Cc: yocto

Hi,

In case of writing the spec file for RPM we need to create first the directory layout and then putting the files using cp or other commands and then perform %file etc. stuff. But when I take a look to some of the recipe file present under poky sometime I see FILES_${PN} and it didn’t specify from where to pick the files.
May be the case is that these project use Auto tools for building. But in our case we have plain Makefile for building and then collecting files from different location and putting in package.
So I was thinking can be use such shortcut method for such job.

-Abhinav

-----Original Message-----
From: Victor Rodriguez [mailto:vm.rod25@gmail.com] 
Sent: Monday, February 09, 2015 18:46
To: Bipnesh, Abhinav (Abhinav)
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Multiple packages from single recipe file

On Mon, Feb 9, 2015 at 4:51 AM, Bipnesh, Abhinav (Abhinav) <abhinavbipnesh@avaya.com> wrote:
> Hi,
>
>
>
> I was looking further into the document to find a way to define 
> multiple packages from a single recipe file. As in current recipe I 
> have written a
> do_install() function for putting files in particular directories. So 
> it copies files from ${S} to ${D}.
>
> But some of the documents talk about multiple package something as 
> below
>
>
>
> FILES_${PN} = "\
>
>     ${bindir}/* \
>
>     ${sbindir}/* \
>
>     ${libexecdir}/* \
>
>     ${libdir}/lib*.so.* \
>
>     ${sysconfdir} \
>
>     ${sharedstatedir} \
>
>     ${localstatedir} \
>
>     /bin/* \
>
>     /sbin/* \
>
>     /lib/*.so* \
>
>     ${datadir}/${PN} \
>
>     ${libdir}/${PN}/* \
>
>     ${datadir}/pixmaps \
>
>     ${datadir}/applications \
>
>     ${datadir}/idl \
>
>     ${datadir}/omf \
>
>     ${datadir}/sounds \
>
>     ${libdir}/bonobo/servers"
>
>
>
> FILES_${PN}-dbg = "\
>
>     ${bindir}/.debug \
>
>     ${sbindir}/.debug \
>
>     ${libexecdir}/.debug \
>
>     ${libdir}/.debug \
>
>     /bin/.debug \
>
>     /sbin/.debug \
>
>     /lib/.debug \
>
>     ${libdir}/${PN}/.debug"
>
>
>
> But I am not getting how the source for such file will be determine as 
> in our project files will be present in different directories and need 
> to be placed in some predefined paths.
>
>
>
> So how we can achieve the same.
>
>
>
> Thanks,
>
> Abhinav
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoprojec
> t.org_listinfo_yocto&d=AwIBaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=geJ1wB7xRIMmt
> eYB2Fo8esL32BOWvwP1HmY0YuLEB4E&m=Le2EtCjj9AW08t4Lrx7TNDzfZB3qnUINViKNg
> ly8NfY&s=4rO6-qcX4Lhvfc0WXO7Z7njj_OXkMHo3K_ITC2P5cmg&e=
>


Hi , basically the yocto recepeis work exactly as an spec file:

www.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html

The scenario you mention is possible:

rpm5.org/docs/rpm-guide.html

Hope it helps

Victor Rodriguez

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple packages from single recipe file
  2015-02-09 13:25   ` Bipnesh, Abhinav (Abhinav)
@ 2015-02-09 14:13     ` Anders Darander
  2015-02-09 16:43       ` Bipnesh, Abhinav (Abhinav)
  0 siblings, 1 reply; 6+ messages in thread
From: Anders Darander @ 2015-02-09 14:13 UTC (permalink / raw)
  To: Bipnesh, Abhinav (Abhinav); +Cc: yocto

* Bipnesh, Abhinav (Abhinav) <abhinavbipnesh@avaya.com> [150209 14:26]:
> In case of writing the spec file for RPM we need to create first the
> directory layout and then putting the files using cp or other commands
> and then perform %file etc. stuff. But when I take a look to some of
> the recipe file present under poky sometime I see FILES_${PN} and it
> didn’t specify from where to pick the files.

> May be the case is that these project use Auto tools for building. But
> in our case we have plain Makefile for building and then collecting
> files from different location and putting in package.  So I was
> thinking can be use such shortcut method for such job.

In your case, add a do_install() function and make install all your
files into ${D}. See e.g. the setserial recipe:
http://git.openembedded.org/openembedded-core/tree/meta/recipes-bsp/setserial/setserial_2.17.bb

Cheers,
Anders


> -----Original Message-----
> From: Victor Rodriguez [mailto:vm.rod25@gmail.com] 
> Sent: Monday, February 09, 2015 18:46
> To: Bipnesh, Abhinav (Abhinav)
> Cc: yocto@yoctoproject.org
> Subject: Re: [yocto] Multiple packages from single recipe file

> On Mon, Feb 9, 2015 at 4:51 AM, Bipnesh, Abhinav (Abhinav) <abhinavbipnesh@avaya.com> wrote:
> > Hi,



> > I was looking further into the document to find a way to define 
> > multiple packages from a single recipe file. As in current recipe I 
> > have written a
> > do_install() function for putting files in particular directories. So 
> > it copies files from ${S} to ${D}.

> > But some of the documents talk about multiple package something as 
> > below



> > FILES_${PN} = "\

> >     ${bindir}/* \

> >     ${sbindir}/* \

> >     ${libexecdir}/* \

> >     ${libdir}/lib*.so.* \

> >     ${sysconfdir} \

> >     ${sharedstatedir} \

> >     ${localstatedir} \

> >     /bin/* \

> >     /sbin/* \

> >     /lib/*.so* \

> >     ${datadir}/${PN} \

> >     ${libdir}/${PN}/* \

> >     ${datadir}/pixmaps \

> >     ${datadir}/applications \

> >     ${datadir}/idl \

> >     ${datadir}/omf \

> >     ${datadir}/sounds \

> >     ${libdir}/bonobo/servers"



> > FILES_${PN}-dbg = "\

> >     ${bindir}/.debug \

> >     ${sbindir}/.debug \

> >     ${libexecdir}/.debug \

> >     ${libdir}/.debug \

> >     /bin/.debug \

> >     /sbin/.debug \

> >     /lib/.debug \

> >     ${libdir}/${PN}/.debug"



> > But I am not getting how the source for such file will be determine as 
> > in our project files will be present in different directories and need 
> > to be placed in some predefined paths.



> > So how we can achieve the same.



> > Thanks,

> > Abhinav
-- 
Anders Darander
ChargeStorm AB / eStorm AB


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple packages from single recipe file
  2015-02-09 14:13     ` Anders Darander
@ 2015-02-09 16:43       ` Bipnesh, Abhinav (Abhinav)
  2015-02-10  9:14         ` Anders Darander
  0 siblings, 1 reply; 6+ messages in thread
From: Bipnesh, Abhinav (Abhinav) @ 2015-02-09 16:43 UTC (permalink / raw)
  To: Anders Darander; +Cc: yocto

Hi,

We have done on similar line for one of the package. We have to write another recipe for a package in which we need to just create packages and delivery it.
But we need to do it for couple of directories i.e. let say 10 directories.
Previously we have an script which perform some conversion and then create package in loop i.e. creating RPM in loop for such package.
Now we want to achieve the same using a recipe.
One of the solution is to write 10 such recipe and creating a package, But it means we need to check-out 10 times the code and then create the package.
But we are looking for some optimize way to do so as below
1. Check out all 10 directories in one shot.
2. Write small shell script code and call do_install() passing ${S} and ${D} as argument to create the package. Here we are also looking for package name for each such call different say package-1-ro.rpm package-2.r0.rpm etc.
3. Also avoid calling do_compile() as there is no makefile its plain file repo which need to be packaged.

So any thoughts how to do such job.

Thanks,
Abhinav
________________________________________
From: Anders Darander [anders@chargestorm.se]
Sent: Monday, February 09, 2015 7:43 PM
To: Bipnesh, Abhinav (Abhinav)
Cc: Victor Rodriguez; yocto@yoctoproject.org
Subject: Re: [yocto] Multiple packages from single recipe file

* Bipnesh, Abhinav (Abhinav) <abhinavbipnesh@avaya.com> [150209 14:26]:
> In case of writing the spec file for RPM we need to create first the
> directory layout and then putting the files using cp or other commands
> and then perform %file etc. stuff. But when I take a look to some of
> the recipe file present under poky sometime I see FILES_${PN} and it
> didn’t specify from where to pick the files.

> May be the case is that these project use Auto tools for building. But
> in our case we have plain Makefile for building and then collecting
> files from different location and putting in package.  So I was
> thinking can be use such shortcut method for such job.

In your case, add a do_install() function and make install all your
files into ${D}. See e.g. the setserial recipe:
https://urldefense.proofpoint.com/v2/url?u=http-3A__git.openembedded.org_openembedded-2Dcore_tree_meta_recipes-2Dbsp_setserial_setserial-5F2.17.bb&d=AwIFaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=geJ1wB7xRIMmteYB2Fo8esL32BOWvwP1HmY0YuLEB4E&m=aZjRWREP73CkvukWYDIq6EBYm-V9PXDui-fbP3IIRjI&s=jDlPZCpV9O0A6xPnqSw-Ee2XPHnFTU1O_vV-YNexwKk&e=

Cheers,
Anders


> -----Original Message-----
> From: Victor Rodriguez [mailto:vm.rod25@gmail.com]
> Sent: Monday, February 09, 2015 18:46
> To: Bipnesh, Abhinav (Abhinav)
> Cc: yocto@yoctoproject.org
> Subject: Re: [yocto] Multiple packages from single recipe file

> On Mon, Feb 9, 2015 at 4:51 AM, Bipnesh, Abhinav (Abhinav) <abhinavbipnesh@avaya.com> wrote:
> > Hi,



> > I was looking further into the document to find a way to define
> > multiple packages from a single recipe file. As in current recipe I
> > have written a
> > do_install() function for putting files in particular directories. So
> > it copies files from ${S} to ${D}.

> > But some of the documents talk about multiple package something as
> > below



> > FILES_${PN} = "\

> >     ${bindir}/* \

> >     ${sbindir}/* \

> >     ${libexecdir}/* \

> >     ${libdir}/lib*.so.* \

> >     ${sysconfdir} \

> >     ${sharedstatedir} \

> >     ${localstatedir} \

> >     /bin/* \

> >     /sbin/* \

> >     /lib/*.so* \

> >     ${datadir}/${PN} \

> >     ${libdir}/${PN}/* \

> >     ${datadir}/pixmaps \

> >     ${datadir}/applications \

> >     ${datadir}/idl \

> >     ${datadir}/omf \

> >     ${datadir}/sounds \

> >     ${libdir}/bonobo/servers"



> > FILES_${PN}-dbg = "\

> >     ${bindir}/.debug \

> >     ${sbindir}/.debug \

> >     ${libexecdir}/.debug \

> >     ${libdir}/.debug \

> >     /bin/.debug \

> >     /sbin/.debug \

> >     /lib/.debug \

> >     ${libdir}/${PN}/.debug"



> > But I am not getting how the source for such file will be determine as
> > in our project files will be present in different directories and need
> > to be placed in some predefined paths.



> > So how we can achieve the same.



> > Thanks,

> > Abhinav
--
Anders Darander
ChargeStorm AB / eStorm AB


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multiple packages from single recipe file
  2015-02-09 16:43       ` Bipnesh, Abhinav (Abhinav)
@ 2015-02-10  9:14         ` Anders Darander
  0 siblings, 0 replies; 6+ messages in thread
From: Anders Darander @ 2015-02-10  9:14 UTC (permalink / raw)
  To: Bipnesh, Abhinav (Abhinav); +Cc: yocto

Hi,

I'm not really following what you'd like to learn...

* Bipnesh, Abhinav (Abhinav) <abhinavbipnesh@avaya.com> [150209 17:43]:
> We have done on similar line for one of the package. We have to write
> another recipe for a package in which we need to just create packages
> and delivery it.  But we need to do it for couple of directories i.e.
> let say 10 directories.  Previously we have an script which perform
> some conversion and then create package in loop i.e. creating RPM in
> loop for such package.  Now we want to achieve the same using a
> recipe.  One of the solution is to write 10 such recipe and creating a
> package, But it means we need to check-out 10 times the code and then
> create the package.  But we are looking for some optimize way to do so
> as below

> 1. Check out all 10 directories in one shot.

Are these in different repositories or tarball? Or what do you mean with
"check out"?

> 2. Write small shell script code and call do_install() passing ${S}
> and ${D} as argument to create the package. Here we are also looking
> for package name for each such call different say package-1-ro.rpm
> package-2.r0.rpm etc.

Just write a do_install(), that installs all the files from your above
list in it's correct place.

Make sure that FILES_${PN} includes all the locations where you want to
pick-up files.

If you're creating multiple packages, just ensure that
FILES_${PN}-pkg1 = "..."
FILES_${PN}-pkg2 = "..."
etc
points to which files you want packaged in which package. 

> 3. Also avoid calling do_compile() as there is no makefile its plain
> file repo which need to be packaged.

Just create an empty do_compile(). Or you could remove do_package() from
the task list for this recipe, though, it's slightly easier to just
provide an empty do_compile().

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-10  9:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09 10:51 Multiple packages from single recipe file Bipnesh, Abhinav (Abhinav)
2015-02-09 13:16 ` Victor Rodriguez
2015-02-09 13:25   ` Bipnesh, Abhinav (Abhinav)
2015-02-09 14:13     ` Anders Darander
2015-02-09 16:43       ` Bipnesh, Abhinav (Abhinav)
2015-02-10  9:14         ` Anders Darander

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.