All of lore.kernel.org
 help / color / mirror / Atom feed
* newbie recipe question
@ 2010-11-12 16:49 Marc
  2010-11-12 17:52 ` Darren Hart
  2010-11-12 19:05 ` Scott Garman
  0 siblings, 2 replies; 6+ messages in thread
From: Marc @ 2010-11-12 16:49 UTC (permalink / raw)
  To: poky

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

Hello, I'm a newbie in creating recipes for poky and I'm running through a
series of problems.
I'm trying to make a recipe in order to build an ipk package containing a
series of webpages and scripts, I have them at a subversion repository.
For now it works simply by pointing at the svn repository and specifiing at
do_install every directories files to their destination. like this:
=======================================================================
SRCREV = "${AUTOREV}"
PR = "${SRCREV}"

SRC_URI = "svn://server/svn/;module=webpackage;proto=http "

S = "${WORKDIR}"

do_install(){
install -m 0755 -d ${D}/etc/
install -m 0755 -d ${D}/www/
install -m 0755 -d ${D}/www/images
install -m 0755 -d ${D}/www/cgi-bin
install -m 0755 -d ${D}/www/includes
 install -m 0755 ${S}/*.htm ${D}/www/
install -m 0755 ${S}/*.css ${D}/www/
install -m 0755 ${S}/includes/* ${D}/www/includes/
install -m 0755 ${S}/cgi-bin/* ${D}/www/cgi-bin/
install -m 0755 ${S}/images/* ${D}/www/images/

}
=================================================================

Is there any other way to do this without having to specify the whole
subdirectory structure and every file extension? ( * is not working)
Since I'm adding and deleting files to my repository pretty frequently I
don't wan't having to modify the recipe each time.

Thank's


-- 
Marc.

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

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

* Re: newbie recipe question
  2010-11-12 16:49 newbie recipe question Marc
@ 2010-11-12 17:52 ` Darren Hart
  2010-11-12 19:05 ` Scott Garman
  1 sibling, 0 replies; 6+ messages in thread
From: Darren Hart @ 2010-11-12 17:52 UTC (permalink / raw)
  To: Marc; +Cc: poky

On 11/12/2010 08:49 AM, Marc wrote:
> Hello, I'm a newbie in creating recipes for poky and I'm running through
> a series of problems.
> I'm trying to make a recipe in order to build an ipk package containing
> a series of webpages and scripts, I have them at a subversion repository.
> For now it works simply by pointing at the svn repository and specifiing
> at do_install every directories files to their destination. like this:
> =======================================================================
> SRCREV = "${AUTOREV}"
> PR = "${SRCREV}"
>
> SRC_URI = "svn://server/svn/;module=webpackage;proto=http "
>
> S = "${WORKDIR}"
>
> do_install(){
> install -m 0755 -d ${D}/etc/
> install -m 0755 -d ${D}/www/
> install -m 0755 -d ${D}/www/images
> install -m 0755 -d ${D}/www/cgi-bin
> install -m 0755 -d ${D}/www/includes
> install -m 0755 ${S}/*.htm${D}/www/
> install -m 0755 ${S}/*.css${D}/www/
> install -m 0755 ${S}/includes/* ${D}/www/includes/
> install -m 0755 ${S}/cgi-bin/* ${D}/www/cgi-bin/
> install -m 0755 ${S}/images/* ${D}/www/images/
>
> }
> =================================================================
>
> Is there any other way to do this without having to specify the whole
> subdirectory structure and every file extension? ( * is not working)
> Since I'm adding and deleting files to my repository pretty frequently I
> don't wan't having to modify the recipe each time.
>

I'm no expert on this aspect of the build, but one option would be to 
use autotools to have a "make install" target and the poky recipe could 
use that. Alternatively I don't see any reason why you couldn't write an 
install script as part of your repository and just have do_install() 
call that.

You're right, you don't want to have much in the way of install logic in 
the recipe.

-- 
Darren Hart
Yocto Linux Kernel


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

* Re: newbie recipe question
  2010-11-12 16:49 newbie recipe question Marc
  2010-11-12 17:52 ` Darren Hart
@ 2010-11-12 19:05 ` Scott Garman
  2010-11-13 16:29   ` Marc
  1 sibling, 1 reply; 6+ messages in thread
From: Scott Garman @ 2010-11-12 19:05 UTC (permalink / raw)
  To: poky

On 11/12/2010 08:49 AM, Marc wrote:
> Hello, I'm a newbie in creating recipes for poky and I'm running through
> a series of problems.
> I'm trying to make a recipe in order to build an ipk package containing
> a series of webpages and scripts, I have them at a subversion repository.
> For now it works simply by pointing at the svn repository and specifiing
> at do_install every directories files to their destination. like this:
> =======================================================================
> SRCREV = "${AUTOREV}"
> PR = "${SRCREV}"
>
> SRC_URI = "svn://server/svn/;module=webpackage;proto=http "
>
> S = "${WORKDIR}"
>
> do_install(){
> install -m 0755 -d ${D}/etc/
> install -m 0755 -d ${D}/www/
> install -m 0755 -d ${D}/www/images
> install -m 0755 -d ${D}/www/cgi-bin
> install -m 0755 -d ${D}/www/includes
> install -m 0755 ${S}/*.htm${D}/www/
> install -m 0755 ${S}/*.css${D}/www/
> install -m 0755 ${S}/includes/* ${D}/www/includes/
> install -m 0755 ${S}/cgi-bin/* ${D}/www/cgi-bin/
> install -m 0755 ${S}/images/* ${D}/www/images/
>
> }
> =================================================================
>
> Is there any other way to do this without having to specify the whole
> subdirectory structure and every file extension? ( * is not working)
> Since I'm adding and deleting files to my repository pretty frequently I
> don't wan't having to modify the recipe each time.

I haven't tested this locally, but I believe file globbing is supposed 
to work. Have you tried *.*?

Scott

-- 
Scott Garman
Embedded Linux Distro Engineer - Yocto Project


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

* Re: newbie recipe question
  2010-11-12 19:05 ` Scott Garman
@ 2010-11-13 16:29   ` Marc
  2010-11-14  0:56     ` Tian, Kevin
  0 siblings, 1 reply; 6+ messages in thread
From: Marc @ 2010-11-13 16:29 UTC (permalink / raw)
  To: Scott Garman; +Cc: poky

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

Yes it works on files but not on subdirectories

On Fri, Nov 12, 2010 at 8:05 PM, Scott Garman <scott.a.garman@intel.com>wrote:

> On 11/12/2010 08:49 AM, Marc wrote:
>
>> Hello, I'm a newbie in creating recipes for poky and I'm running through
>> a series of problems.
>> I'm trying to make a recipe in order to build an ipk package containing
>> a series of webpages and scripts, I have them at a subversion repository.
>> For now it works simply by pointing at the svn repository and specifiing
>> at do_install every directories files to their destination. like this:
>> =======================================================================
>> SRCREV = "${AUTOREV}"
>> PR = "${SRCREV}"
>>
>> SRC_URI = "svn://server/svn/;module=webpackage;proto=http "
>>
>> S = "${WORKDIR}"
>>
>> do_install(){
>> install -m 0755 -d ${D}/etc/
>> install -m 0755 -d ${D}/www/
>> install -m 0755 -d ${D}/www/images
>> install -m 0755 -d ${D}/www/cgi-bin
>> install -m 0755 -d ${D}/www/includes
>> install -m 0755 ${S}/*.htm${D}/www/
>> install -m 0755 ${S}/*.css${D}/www/
>> install -m 0755 ${S}/includes/* ${D}/www/includes/
>> install -m 0755 ${S}/cgi-bin/* ${D}/www/cgi-bin/
>> install -m 0755 ${S}/images/* ${D}/www/images/
>>
>> }
>> =================================================================
>>
>> Is there any other way to do this without having to specify the whole
>> subdirectory structure and every file extension? ( * is not working)
>> Since I'm adding and deleting files to my repository pretty frequently I
>> don't wan't having to modify the recipe each time.
>>
>
> I haven't tested this locally, but I believe file globbing is supposed to
> work. Have you tried *.*?
>
> Scott
>
> --
> Scott Garman
> Embedded Linux Distro Engineer - Yocto Project
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>



-- 
Marc.

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

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

* Re: newbie recipe question
  2010-11-13 16:29   ` Marc
@ 2010-11-14  0:56     ` Tian, Kevin
  2010-11-14 13:04       ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Tian, Kevin @ 2010-11-14  0:56 UTC (permalink / raw)
  To: Marc, Garman, Scott A; +Cc: poky

From: Marc
Sent: Sunday, November 14, 2010 12:29 AM

> Yes it works on files but not on subdirectories

Then I think Darren's suggestion is what you expect: write a install script which
contains all the tricks you want (subdirectory, *, ...), and then have do_install
invoke that script directly...

Thanks,
Kevin


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

* Re: newbie recipe question
  2010-11-14  0:56     ` Tian, Kevin
@ 2010-11-14 13:04       ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2010-11-14 13:04 UTC (permalink / raw)
  To: Tian, Kevin; +Cc: poky

On Sun, 2010-11-14 at 08:56 +0800, Tian, Kevin wrote:
> From: Marc
> Sent: Sunday, November 14, 2010 12:29 AM
> 
> > Yes it works on files but not on subdirectories
> 
> Then I think Darren's suggestion is what you expect: write a install script which
> contains all the tricks you want (subdirectory, *, ...), and then have do_install
> invoke that script directly...

Its not something I'd encourage but you could just do a cp -r (recursive
copy). You would then need to be careful about owners and permissions
though (which is why you'll see install being used most often).

Cheers,

Richard



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

end of thread, other threads:[~2010-11-14 13:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-12 16:49 newbie recipe question Marc
2010-11-12 17:52 ` Darren Hart
2010-11-12 19:05 ` Scott Garman
2010-11-13 16:29   ` Marc
2010-11-14  0:56     ` Tian, Kevin
2010-11-14 13:04       ` Richard Purdie

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.