[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to build proper "user" emdebian packages



On Fri, 17 Apr 2009 09:51:43 +0200
Hector Oron <hector.oron@gmail.com> wrote:

> > My question is now how to generate a proper emdebian package.

>From a Debian package.

For both Grip and Crush, the starting point for any new package in
Emdebian is a Debian package that is fully compliant with Debian
Policy. Therefore, the documentation for building a completely new
package for Emdebian is the documentation for building a new Debian
package:

http://www.uk.debian.org/devel/
http://www.uk.debian.org/doc/debian-policy/
http://www.uk.debian.org/doc/developers-reference/
http://www.uk.debian.org/doc/maint-guide/

Ask for assistance on these topics via debian-mentors@lists.debian.org

Note that there is explicitly no support for building packages on a
device running Emdebian Crush, only Grip.

> I
> > successfully compiled a simple hello world app and it worked on the
> > target device.
> 
> A package is generated by emsource, but things are little stalled at
> the moment and Neil, doing most part of this work wants to do the code
> audit and change the way crush builds, more towards to what grip does.
> See
> http://wiki.debian.org/EmdebianQuickStart
> http://wiki.debian.org/EmdebianCodeAudit

emsource requires a Debian package that it can download. A private
package is more similar to already being the Debian maintainer for the
package and being able to put all the cross-building meta-data directly
into the Debian package. (Take a look at some of my GPE packages for
examples.) This is why (most) GPE packages go through the current Code
Audit without problems.

> >The header <stdio.h> is used there and the c file is
> > simply compiled with arm-linux-gnu. I guess the default stdio.h header
> > from the development system is used then instead of the emdebian
> > specific one?
> 
> The header files are under /usr/$triplet/include, using apt-cross or
> dpkg-cross you can get lots of headers. See
> http://wiki.debian.org/EmdebianToolchain

Yes, you install the packages that provide the headers as cross
packages, to cover situations where the headers can change between
architectures but mainly because the packages containing the .h files
also contain the .so symlinks that allow the executable to be linked.
If you link against /usr/lib/libfoo.so.0.0.0 using -lfoo, the link will
fail - you need to link against /usr/$triplet/libfoo.so.0.0.0 (although
the precise path will change when multiarch is implemented). Installing
the -dev package as a cross-dependency also brings in the lib package
that contains the target of the symlink.

> > Is there a makefile template for building apps for emdebian crush?
> 
> I do not think we have one. I might be wrong.

There is no need for one - all that is needed are a few examples of how
to modify standard Debian packages to follow existing guidelines to
support cross-building. Those guidelines are actually in the
autotools-dev package for packages that use automake etc. and are
reproduced on the Emdebian Wiki.
 
> > After having a executable how do I generate en emdebian .deb package?
> 
> You need to package your software Debian like
> 
> > Can I just manually create the control.tar.gz, data.tar.gz files and
> > move them into test.deb file?
> 
> That's not the approach we are looking for, but as a workarround that
> could work for you.
> 
> Please visit wiki pages on EmdebianGuide and EmdebianPolicy

.... and get whatever Debian packaging help you need from
mentors.debian.net

A "proper" Emdebian package must also be a Debian package - to be sure
that it will build, it should also be a package that has been accepted
into Debian itself.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpun55oJI9xl.pgp
Description: PGP signature


Reply to: