maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   packaging for maemo (https://talk.maemo.org/showthread.php?t=33721)

jaeezzy 2009-10-30 12:42

packaging for maemo
 
Hi,
I'm trying to create a .deb package of my application and after going through various sources in the net, I've come to know few basic things but still there are lot of things I'm still confused about so thought I'll ask here. I could create a basic .deb package and are both installable and uninstallable but trying to make one with all my requirements, I'm having problem to make a clean uninstallable one as it does install nice. Below are my requirements:
  • I'll have a .conf file where user settings will be saved
  • I'll have icon used in the application itself and also to display icon in the application manager.

I know these are the basic things but the one I tried was even without these things ;) Here are what I tried:

For I wanted to have a directory in /home/user I created the directories: (/home/user/my_dir/config/my_config.conf and /home/user/my_dir/icons/my_icon.png) under DEBIAN folder like I made others (/etc and /usr) and also wrote postinst and prerm where prerm copies the .conf file to /home/user/.my_conf.conf before removing application so the settings can be used later if the user again installs the application and postinst moves the /home/user/.my_conf.conf back to the actual location which is (/home/user/my_dir/config) if the file exists.

With this, while uninstalling, dpkg warns me that /home/user can't be removed and uninstalling fails. Any help would be great. Thanks

mikkov 2009-10-30 12:47

Re: packaging for maemo
 
Quote:

Originally Posted by jaeezzy (Post 361555)
For I wanted to have a directory in /home/user I created the directories: (/home/user/my_dir/config/my_config.conf and /home/user/my_dir/icons/my_icon.png) under DEBIAN folder like I made others (/etc and /usr) and also wrote postinst and prerm where prerm copies the .conf file to /home/user/.my_conf.conf before removing application so the settings can be used later if the user again installs the application and postinst moves the /home/user/.my_conf.conf back to the actual location which is (/home/user/my_dir/config) if the file exists.

With this, while uninstalling, dpkg warns me that /home/user can't be removed and uninstalling fails. Any help would be great. Thanks

Don't install anything to /home/user with package. Generate default config file during runtime or save default config file somewhere in /usr and copy it in place with startup script

qgil 2009-10-30 13:40

Re: packaging for maemo
 
Hi, please help finding what is missing and what could be improved at http://wiki.maemo.org/Documentation/...d_Distributing

In principle that should be enough to get your Debian packages right.

jkq 2009-10-30 16:54

Re: packaging for maemo
 
Quote:

Originally Posted by qgil (Post 361593)
Hi, please help finding what is missing and what could be improved at http://wiki.maemo.org/Documentation/...d_Distributing

I'm still pretty new to this stuff myself, but how about a link to http://wiki.maemo.org/Py2deb as an alternate method?

-jkq

twaelti 2009-10-30 18:14

Re: packaging for maemo
 
I suggest storing user preferences in GConf.

jeremiah 2009-10-30 23:19

Re: packaging for maemo
 
Quote:

Originally Posted by jaeezzy (Post 361555)
With this, while uninstalling, dpkg warns me that /home/user can't be removed and uninstalling fails. Any help would be great. Thanks

There are standard places in Linux where one installs configuration files, binaries, etc. The place in the file system for your files is determined by something called the FHS, or File Hierarchy Standard. Not every distro follows the FHS in every detail, so Linux is not uniform, but debian follows the FHS as much as possible and maemo pretty much defaults to debian's policys (optification nothwithstanding.)

In short, if you look at the New Maintainer's Guide or Debian Policy, you'll find the best places for your config files and not run into any problems with dpkg.


All times are GMT. The time now is 00:07.

vBulletin® Version 3.8.8