maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   How to make a .deb package .. (https://talk.maemo.org/showthread.php?t=43575)

Cpasjuste 2010-02-06 13:58

How to make a .deb package ..
 
Hi, i'm sorry, there is probably a a lot of informations about how to make a debian .deb package to release, but i can't find it. I did port wesnoth 1.6.5 to the n900, and i'd like to package it, so if someone can point me to the right direction !

Thanks in advance,
David.

harriva 2010-02-06 14:12

Re: How to make a .deb package ..
 
Packaging, Deploying and Distributing

And when time comes to push app to repository.
Maemo Extras Assistant

Cpasjuste 2010-02-06 14:39

Re: How to make a .deb package ..
 
Thanks harriva.

jebba 2010-02-06 20:44

Re: How to make a .deb package ..
 
http://wiki.maemo.org/User:Jebba/Package_Building_HOWTO

fatalsaint 2010-02-07 07:59

Re: How to make a .deb package ..
 
Some more info:

Manual Method

Super Easy Method

hopbeat 2010-02-07 08:22

Re: How to make a .deb package ..
 
@Cpasjuste, it may be helpful to get a source of already existing project (e.g. from garage.maemo.org) to see the structure of the catalogs and scripts used.

Cpasjuste 2010-02-07 09:54

Re: How to make a .deb package ..
 
Thanks for the help :)

I'm currently trying this page : http://wiki.maemo.org/Py2deb

I didnt built the package yet with py2deb, but i'm trying to get the proper layout and files on the device. But i have a question : is the dbus "*.service " file really needed even if my application as nothing to do with services ? I'm asking because without it i can see my application under the applications menu, but when i try to launch it, it return to the desktop .. hum hum !

fatalsaint 2010-02-07 17:27

Re: How to make a .deb package ..
 
Quote:

Originally Posted by Cpasjuste (Post 514133)
Thanks for the help :)

I'm currently trying this page : http://wiki.maemo.org/Py2deb

I didnt built the package yet with py2deb, but i'm trying to get the proper layout and files on the device. But i have a question : is the dbus "*.service " file really needed even if my application as nothing to do with services ? I'm asking because without it i can see my application under the applications menu, but when i try to launch it, it return to the desktop .. hum hum !

No.. if your app is not registering as a dbus service you don't need it. Your problem sounds related to your .desktop file.. i'd pay close attention to that. Also running from the command line is always a good idea when testing.

Cpasjuste 2010-02-07 18:12

Re: How to make a .deb package ..
 
Thanks fatalsaint.
I think i will need some help, i did try every think i tought. Here is a summary :

So the sdl application (script to launch the binary) is not launching from application menu. I added (i think) correct .desktop, the exec path is right, and the application launch correctly from terminal under the "user" account. i did replace my wesnoth launching script with a script that echo to a file, and nothing is echo"ed" so i guess the script isn't executed at all when launching my application from the application menu.

Here is a copy of my desktop file :

Code:

Nokia-N900-51-1:/home/opt# cat  /usr/share/applications/hildon/wesnoth.desktop
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Battle For Wesnoth
Comment=A fantasy turn-based strategy game
Exec=/opt/wesnoth/bin/wesnoth_n900
Icon=wesnoth
X-Icon-path=/usr/share/icons
X-Window-Icon=wesnoth
Type=Application
X-Osso-Service=com.nokia.wesnoth
X-Osso-Type=application/x-executable
Categories=Games
MimeType=application/game
Terminal=false

Code:

Nokia-N900-51-1:/home/opt# ls -laih /opt/wesnoth/bin/
  98317 drwxrwxrwx    2 root    root        4.0k Feb  7 19:11 .
  98316 drwxr-xr-x    4 root    root        4.0k Feb  7 12:00 ..
  98318 -rwxrwxrwx    1 root    root        16.8M Feb  7 12:00 wesnoth
  98327 -rwxrwxrwx    1 root    root          213 Feb  7 12:07 wesnoth_n900
  98325 -rwxrwxrwx    1 root    root        2.2M Feb  7 12:00 wesnothd
  98330 -rwxrwxrwx    1 root    root          214 Feb  7 12:20 wesnothd_n900

Code:

Nokia-N900-51-1:/home/opt# cat /opt/wesnoth/bin/wesnoth_n900
LD_PRELOAD="/opt/wesnoth/lib/libSDL_mixer-1.2.so.0.10.1" LD_LIBRARY_PATH="/opt/wesnoth/lib/" /opt/wesnoth/bin/wesnoth --smallgui -f --bpp 16 -r 800x480 /home/user/MyDocs/games/wesnoth_data/ &>/opt/wesnoth/bin/log

I really don't understand :'(

qwerty12 2010-02-07 18:16

Re: How to make a .deb package ..
 
Quote:

Originally Posted by Cpasjuste (Post 514618)
Here is a copy of my desktop file :

If you don't have a service file, then having a X-Osso-Service entry in your desktop file really doesn't make any sense.

Cpasjuste 2010-02-07 18:28

Re: How to make a .deb package ..
 
Woot it worked, i had to remove "X-Osso-Service" line from the .desktop file !
Thanks :)

Edit : Thanks qwerty12, didn't see your comment before posting but you where right :)

Cpasjuste 2010-02-09 08:35

Re: How to make a .deb package ..
 
I'm sorry to be so stupid, but i did follow this "howto" : http://wiki.maemo.org/Documentation/...d_Distributing .

The problem is i do not want to package the sources ( all is really messy, with makefile edited by hand etc .. ) i just want to package the actual release. But this howto assume we are making a packages with sources :

Code:

[sbox-FREMANTLE_ARMEL: ~/wesnoth-1.6.5/wesnoth-1.6.5-1] > dh_make -e cpasjuste@gmail.com

Type of package: single binary, multiple binary, library, kernel module or cdbs?
 [s/m/l/k/b] s

Maintainer name : unknown
Email-Address  : cpasjuste@gmail.com
Date            : Tue,  9 Feb 2010 09:33:27 +0100
Package Name    : wesnoth-1.6.5
Version        : 1
License        : blank
Type of Package : Single
Hit <enter> to confirm:
Could not find wesnoth-1.6.5_1.orig.tar.gz
Either specify an alternate file to use with -f,
or add --createorig to create one.
[sbox-FREMANTLE_ARMEL: ~/wesnoth-1.6.5/wesnoth-1.6.5-1] >

Code:

[sbox-FREMANTLE_ARMEL: ~/wesnoth-1.6.5/wesnoth-1.6.5-1] > dh_make -e cpasjuste@gmail.com --createorig

Type of package: single binary, multiple binary, library, kernel module or cdbs?
 [s/m/l/k/b] s

Maintainer name : unknown
Email-Address  : cpasjuste@gmail.com
Date            : Tue,  9 Feb 2010 09:36:10 +0100
Package Name    : wesnoth-1.6.5
Version        : 1
License        : blank
Type of Package : Single
Hit <enter> to confirm:
Currently there is no top level Makefile. This may require additional tuning.
Done. Please edit the files in the debian/ subdirectory now. You should also
check that the wesnoth-1.6.5 Makefiles install into $DESTDIR and not in / .
[sbox-FREMANTLE_ARMEL: ~/wesnoth-1.6.5/wesnoth-1.6.5-1] >

I'm a little lazy about that stuff :( Some help to make a simple .deb for a release would be great since i can't find something like that in the docs ..

TNiga 2010-02-09 08:56

Re: How to make a .deb package ..
 
I wrote here some time ago a quick guide to make .deb http://talk.maemo.org/showpost.php?p=460952&postcount=2

But if you want to upload your project to extras you have to do the source packaging thing.

Cpasjuste 2010-02-09 10:08

Re: How to make a .deb package ..
 
This means that we can't release closed sources applications on the n900 ?!

I sucessfully created a deb TNiga, but i have a little problem when trying to uninstall it, i don't understand why it try to remove the "/home/user" directory ( i did put data files in the MyDoc folder since it's around 300mb ) :

Code:

[sbox-FREMANTLE_ARMEL: ~/wesnoth-1.6.5] > apt-get remove wesnoth
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  wesnoth
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 45379 files and directories currently installed.)
Removing wesnoth ...
dpkg - warning: cannot remove `/home/user'
dpkg - warning: while removing wesnoth, directory `/home/user/MyDocs' not empty so not removed.
dpkg: error processing wesnoth (--remove):
 cannot remove `/home/user': Permission denied
Errors were encountered while processing:
 wesnoth
E: Sub-process /scratchbox/devkits/debian-etch/bin/dpkg returned an error code (1)


TNiga 2010-02-09 10:40

Re: How to make a .deb package ..
 
I suppose you could put the files in /opt first and then in postinst script move them to MyDocs and in prerm script move them back to /opt, then it shouldn't try to remove /home/user.

Cpasjuste 2010-02-09 10:52

Re: How to make a .deb package ..
 
Ok, tricky but it's what i was thinking :)

Else if i understand correctly to release something on the application manager ( extra devel ) :

We need a full sources layout, build the package with db_make, and upload it to autobuilder. This one will compile it again for arm then make a deb out of it ?

There is really no other way to go on extra-devel ? I do use a few libary that are statically linked, but are not available on the normal distro (neither in repo) so the build will fail ?

This is a totally crap process to me ..

TNiga 2010-02-09 11:40

Re: How to make a .deb package ..
 
If you use libraries which are not in repos then you have to first upload them to extras-devel (or ask nicely if the library maintainer could do it for you) for your app to build succesfully with autobuilder.

chealyte 2010-02-09 14:57

Re: How to make a .deb package ..
 
Hi, i am really new to this linux, i only have some basic programing language.

my question is how do i build .deb package that just to install a .ttf font ? Do i need to do it from my N900 or PC ( windows or Linux ) ? .. sorry i am totally clueless on this

mikkov 2010-02-09 16:01

Re: How to make a .deb package ..
 
for the original poster: please take the packaging from debian or from earlier wesnoth for maemo port.

torpedo48 2010-02-09 17:03

Re: How to make a .deb package ..
 
Hi everyone.
I've some problems in creating a .deb using TNIGa's nice guide.

First of all, X-Term gave me some errors regarding bad permissions, but I've solved it manually changing permissions to some files.
Now it's giving me another error.
It says:

tar: unrecognized option "--format=gnu"

and then, after explaining the correct usage of tar, it says

dpkg-deb: subprocess tar -cf returned error exit status 1

What can I do?

calvin_42 2010-02-17 22:32

Re: How to make a .deb package ..
 
I've got exactly the same error when trying to build my package with dpkg-build.

Anyone ? :)

torpedo48 2010-02-18 07:34

Re: How to make a .deb package ..
 
Quote:

Originally Posted by calvin_42 (Post 533186)
I've got exactly the same error when trying to build my package with dpkg-build.

Anyone ? :)

You can't do that on your N900, it has to be done in your scratchbox :)

calvin_42 2010-02-18 13:07

Re: How to make a .deb package ..
 
Quote:

Originally Posted by torpedo48 (Post 533740)
You can't do that on your N900, it has to be done in your scratchbox :)

OK that's what I figured. Thanks!

Khertan 2010-03-04 19:50

Re: How to make a .deb package ..
 
Quote:

Originally Posted by torpedo48 (Post 533740)
You can't do that on your N900, it has to be done in your scratchbox :)

False ... you can create package on your n900 with pypackager ... this is one the main purpose of this tools.

torpedo48 2010-03-04 20:16

Re: How to make a .deb package ..
 
Quote:

Originally Posted by Khertan (Post 556004)
False ... you can create package on your n900 with pypackager ... this is one the main purpose of this tools.

I was talking about the out-of-the-box N900 ;)

Does pypackager adds the dpkg -b command to the N900 X-Term?

carbonjha 2012-07-22 16:53

Re: How to make a .deb package ..
 
Quote:

Originally Posted by torpedo48 (Post 517964)
Hi everyone.
I've some problems in creating a .deb using TNIGa's nice guide.

First of all, X-Term gave me some errors regarding bad permissions, but I've solved it manually changing permissions to some files.
Now it's giving me another error.
It says:

tar: unrecognized option "--format=gnu"

and then, after explaining the correct usage of tar, it says

dpkg-deb: subprocess tar -cf returned error exit status 1

What can I do?

this code helped me
Code:

apt-get update
apt-get install tar-gnu
cp /usr/bin/gnu/tar /bin/

checkout this post
http://talk.maemo.org/showpost.php?p...97&postcount=1


All times are GMT. The time now is 19:03.

vBulletin® Version 3.8.8