rules

Leslie Viljoen leslie at camary.co.za
Thu Jun 23 04:20:59 CDT 2005


Søren Hansen wrote:

>tor, 23 06 2005 kl. 09:32 +0200, skrev Leslie Viljoen:
>  
>
>>I don't properly understand how the "rules" file gets used. It get's written
>>with the aim of installing the package in <whatever build 
>>dir>/debian/<package name> -
>>but then when the package is built and installed, everything under 
>><package name>
>>goes into the filesystem root.
>>    
>>
>
>Let's just imagine a package with just one file in it (forget about the
>stuff in /usr/share/doc for a while). Let's call it foo and imagine it
>belongs in /usr/bin.
>In your source package directory, you have your foo file.
>The rules file will install this into $(CURDIR)/debian/foo/usr/bin/foo
>That's just the first step! The debian/foo directory is used to build
>the actual package file. debian/foo is treated as the root, and
>everything beneath it is put into the package without
>the /home/....../debian/foo part. So when the package is in the archive
>and you fetch it, it has NO idea that it was ever
>in /home/blah/foo-0.1/debian/foo.
>
>Did that help?
>
>  
>
That makes perfect sense. Thanks for the advice.

Now is there a variable in the rules file that will give me the
final /usr/share directory, like $(SHAREDIR), or can I hardcode that to 
/usr/share?

The package requires that the binary be executed from the
/usr/share/tesseracttrainer/system directory, so on install I need to 
create a
script to change to that directory and then run the binary.

It seems a bit unorthodox - if this is not the right way(tm), what do you do
in a situation like this? I know a program can access configure script
variables by using #include config.h, but installation path info is not 
in there.
Is it somewhere else?

Les

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ubuntu.com/archives/ubuntu-devel/attachments/20050623/e2c71360/attachment.htm


More information about the ubuntu-devel mailing list