Active Topics

 


Reply
Thread Tools
Posts: 245 | Thanked: 25 times | Joined on Apr 2007
#1
I've successfully cross-compiled my first program, p7zip for arm. I manually copied the arm binary to my N800, and it correctly compresses and decompresses some example files.

I'm now at the stage where I'm trying to create a .deb, and have the control file and changelog, but the Maemo Tutorial isn't real clear about what needs to be in the "rules file". I've read through the debian new maintainers manual, but the example there seems pretty convoluted for my needs. Could someone post or point me to a fairly simple rules file? p7zip compiles to a single binary, plus the associated man files. I'm just not sure how much needs to be included for a CLI app on Maemo.
 
ArnimS's Avatar
Posts: 1,107 | Thanked: 720 times | Joined on Mar 2007 @ Germany
#2
Originally Posted by gsagers View Post
I've successfully cross-compiled my first program, p7zip for arm. I manually copied the arm binary to my N800, and it correctly compresses and decompresses some example files.

I'm now at the stage where I'm trying to create a .deb, and have the control file and changelog, but the Maemo Tutorial isn't real clear about what needs to be in the "rules file". I've read through the debian new maintainers manual, but the example there seems pretty convoluted for my needs. Could someone post or point me to a fairly simple rules file? p7zip compiles to a single binary, plus the associated man files. I'm just not sure how much
needs to be included for a CLI app on Maemo.
Hi, you should be able to "apt-get source p7zip" from a debian host.

This will give you something like
>ls -s p7

total 1608
4 p7zip-4.44~dfsg.1 4 p7zip_4.44~dfsg.1-2.dsc
12 p7zip_4.44~dfsg.1-2.diff.gz 1588 p7zip_4.44~dfsg.1.orig.tar.

in the p7zip-4.44~dfsg.1 directory you'll find a debian directory with a rules file.

In general it's a good idea to start with debian sources, then work from there.

For simple programs needing only a few source files, you can try 'maemo wizard' written by neostrider. I can't find his site right now so here's a link.
http://ln-s.net/K2U

Disclaimer: I don't know what i'm talking about.
 
Posts: 245 | Thanked: 25 times | Joined on Apr 2007
#3
Thanks, I'll look at that. I did download the debian sources, but the debian/rules file wasn't in the source tarball, in fact, there was no debian/ directory at all. (I ended up downloading manually, apt couldn't find the source for some odd reason, but it was from a debian mirror).
 
ArnimS's Avatar
Posts: 1,107 | Thanked: 720 times | Joined on Mar 2007 @ Germany
#4
Originally Posted by gsagers View Post
Thanks, I'll look at that. I did download the debian sources, but the debian/rules file wasn't in the source tarball, in fact, there was no debian/ directory at all. (I ended up downloading manually, apt couldn't find the source for some odd reason, but it was from a debian mirror).
I do the downloading from the host OS (not in scratchbox) and i use these repos in /etc/apt/sources.list

deb-src http://ftp2.de.debian.org/debian/ sid main contrib non-free
deb-src http://ftp2.de.debian.org/debian/ stable main contrib non-free

you'll probabry want to change the repo country to match your own. A lot of sources from the stable branch give me less problems, since they use older tools and libraries.
 
Posts: 245 | Thanked: 25 times | Joined on Apr 2007
#5
I did find that I'd originally downloaded the unstable version, and that it did not have the debian folder in it. I grabbed the stable source, and the debian folder and files are present, but I haven't had time to make up the package. Thanks for the note on the sources.
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#6
mud-builder is designed to make this kind of port much easier, by handling most/all of the Debianisation for you.

HTH,

Andrew
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
Now known as
Jaffa
 
Posts: 245 | Thanked: 25 times | Joined on Apr 2007
#7
Thanks, I'll give that a try, too. Just need some time to work on it now....
 
ArnimS's Avatar
Posts: 1,107 | Thanked: 720 times | Joined on Mar 2007 @ Germany
#8
The mud-builder idea sounds great but docu is rather sparse.

It should be explained up front in the documentation that 'handle the debianisation for you' doesn't mean you can download a non-debian source package and use mud-builder to make a maemo .deb out of it.

cheers
 
Posts: 474 | Thanked: 30 times | Joined on Jan 2006
#9
Quick debian crash course:

dh_make (note that you'll need to pass it some options: single binary mode works well enough for 95% of all packages) will create that debian/ folder for you and a rules file that will work with "./configure && make && make install" source packages. The rules file contains what options are passed to configure and so forth --- just find the reference to "configure" and add the options you need.

Afterwards,"dpkg-buildpackage -rfakeroot" and voila! Packaged.
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#10
Originally Posted by ArnimS View Post
The mud-builder idea sounds great but docu is rather sparse.
Unfortunately my time is limited, help is always appreciated.

It should be explained up front in the documentation that 'handle the debianisation for you' doesn't mean you can download a non-debian source package and use mud-builder to make a maemo .deb out of it.
That's exactly what it allows you to do. How far it can get is a question of the complexity of the app.

One random example from the current set of packages in Subversion is netcat, the upstream tarball is pointed to, plus some additional meta-data for a well-behaved package, and that's it.

Suggestions for specific improvements to the documentation to make this clearer would be welcome. "More documentation" doesn't help with the prioritisation, unfortunately (it's also well known ;-)). Even better is more contributed documentation (e.g. tutorials) etc.

Thanks in advance,

Andrew
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
Now known as
Jaffa
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:51.