Example: <stage>

Lee Saferite dsaferite at internet.lu
Mon Apr 1 13:40:47 PST 2002


This is a short example of a fairly direct translation to the use of a
<stage> element.

I took the grep package from the LFS-3.2 profiles.

I also used the suggested <environment> syntax from Neven. And
added/changes a few other things.  Even if you don't like everything, it
should give you a better idea of what you can do.

I'll do an example changing <chroot> over to use <stage> later.

---

<package>
   <packageinfo>
      <name>grep</name>
      <version>&grep-version;</version>
   </packageinfo>

   <!-- This would replace the old <prebuild> -->
   <stage>
      <stageinfo>
         <name>Prebuild</name>
         <environment mode="add">
         <!-- this env would go away when you left the <stage> element
-->            <variable mode="set">
               <name>CPPFLAGS</name>
               <value>-Dre_max_failures=re_max_failures2</value>
            </variable>
         </environment>
         <user>lfs</user>
      </stageinfo>
      
      <unarchive>
         <name>&LFS;&packages_dir;/&grep-package;</name>
         <destination>&LFS;&build_dir;</destination>
      </unarchive>

      <configure>
         <base>&LFS;&build_dir;/&grep-directory;</base>
         <option>--prefix=&LFS;/usr</option>
         <option>--disable-nls</option>
         <option>--bindir=&LFS;/bin</option>
      </configure>

   </stage>

   <!-- This would replace the old <build> -->
   <stage>
      <stageinfo>
         <name>Build</name>
         <user>lfs</user>
      </stageinfo>

      <make>
         <base>&LFS;&build_dir;/&grep-directory;</base>
         <option>LDFLAGS=-static</option>
      </make>

   </stage>

   <!-- This would replace the old <postbuild> -->
   <stage>
      <stageinfo>
         <name>PostBuild</name>
         <user>lfs</user>
      </stageinfo>

      <make>
         <base>&LFS;&build_dir;/&grep-directory;</base>
         <option>install</option>
      </make>

      <remove>&LFS;&build_dir;/&grep-directory;</remove>

   </stage>

</package>
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list