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

Re: include desktop file and icon



Grammostola Rosea wrote:
Dmitrijs Ledkovs wrote:
2009/5/9 Grammostola Rosea <rosea.grammostola@gmail.com>:
Neil Williams wrote:
On Sat, 09 May 2009 21:11:25 +0200
Grammostola Rosea <rosea.grammostola@gmail.com> wrote:


After you build the package, check the contents of debian/tmp

Use the matching paths in your own files.


I can't find an debian/tmp folder...

\r

You've probably only got a single package, so check the contents of
debian/$package


Doesn't have that either..


A quick tutorial about debian packaging "states". When you build your
package everything that needs to be compiled gets compiled. Then
everything is installed into a temporary directory inside debian/ then
various dh_ commands are run to change/make the temporary directories
fit for actual binary .deb. At the the end metadata, maintainer
scripts and those temp directories are compressed into an archive with
name ending in deb.

To get better understanding let's do this:

1) Change into the directory of your package, eg. cd foo-1.0/
2) Run this command
debuild binary
3) Now go into debian/ and look what you have in there. A good way to
see what's there is to run this:

du -a

This should show all the files in all subdirectrories. One particular
directory you want to look at is the one named after your package
(hope you are still following, I'm talking about foo-1.0/debian/foo).
It has all the files that will end up in the final deb. Sometimes (if
you are building more than one package) you will have 3 folders e.g.:
tmp/ foo/ foo-data/

Sometimes you will notice that upstream compilation doesn't install
everything you want. In that case you create the debian/$foo.install
files.

Case 1 Single package (you are only creating ONE deb)
Step 1) create debian/install
Step 2) For each missing file/directory write one line:
source destination-dir

Where source is path relative the toplevel source directory (foo-1.0),
and destination-dir is where you want the files to end up when your
package is installed on the system eg. (usr/share/lib/)

Case 2 Multiple deb package (youare creating MORE THAN ONE deb)
Step 1) create debian/$(package).install eg. if you want to install
something additionally into a package called supercow-data you create
a file debian/supercow-data.intall
Step 2) Same as in case 1.

I have package.install

with:

debian/tmp/usr/share/applications/* usr/share/applications/

Most likely you want to simply write

upstream/location/of/desktop/files usr/share/applications

And rename "package.install" into simply "install".

"upstream/location/of/desktop/files" is the path to the .desktop
file/files in the tarball

eg. one of my upstreams has desktop files in
vitables-2.0/unixapp/vitables.desktop so in my debian/install I have
this line:

unixapp/vitables.desktop usr/share/applications


Hope this helps. please take a little bit of time and play around with
it to understand which paths you need to be using when. It's something
I had to spend a little while to get the hang of.

If you have anyquestions please ask.


I got:

dh_install -pphasex
cp: cannot stat `debian/tmp/phasex-0.11.1/phasex.desktop': No such file or directory
dh_install: cp returned exit code 1
make: *** [binary-install/phasex] Error 1
debuild: fatal error at line 1306:
couldn't exec fakeroot debian/rules:



my install file looks like:

phasex-0.11.1/phasex.desktop  usr/share/applications
phasex-0.11.1/pixmaps/* usr/share/pixmaps


Comments, suggestions to solve this?

Thanks in advance,

\r


Reply to: