rules

Leslie Viljoen leslie at camary.co.za
Thu Jun 23 02:32:35 CDT 2005


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.

I have the following under my "install" target:

install: build
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs

        # Add here commands to install the package into 
debian/tesseracttrainer.
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tesseracttrainer

        install -p -D -m644 x11/icons/tesseracttrainer.32.png 
/$(CURDIR)/debian/tesseracttrainer/usr/share/pixmaps/tesseracttrainer.32.png
        install -p -D -m644 debian/tesseracttrainer.desktop 
$(CURDIR)/debian/tesseracttrainer/usr/share/applications/tesseracttrainer.desktop
        install -p -D -m644 
data-tesseracttrainer/About_Tesseract_Trainer.pdf 
$(CURDIR)/debian/tesseracttrainer/usr/share/doc/tesseracttrainer/About_Tesseract_Trainer.pdf

        echo "cd 
$(CURDIR)/debian/tesseracttrainer/usr/share/tesseracttrainer/system" > 
/$(CURDIR)/debian/tesseracttrainer/usr/bin/tesseracttrainer
        echo 
"$(CURDIR)/debian/tesseracttrainer/usr/bin/tesseracttrainerbinary" >> 
/$(CURDIR)/debian/tesseracttrainer/usr/bin/tesseracttrainer

...the three "install" commands seem to work fine, somehow replacing
$(CURDIR)/debian/tesseracttrainer/usr/share/applications/tesseracttrainer.desktop

with

/usr/share/applications/tesseracttrainer.desktop

at install time.


The two echo commands don't work though, replacing
cd $(CURDIR)/debian/tesseracttrainer/usr/share/tesseracttrainer/system

with

cd 
/home/lesliev/packages/tesseracttrainer/tesseracttrainer-0.1.4/debian/tesseracttrainer/usr/share/tesseracttrainer/system


How does the path replacement work? I can understand how $(CURDIR) might 
change, but there is /debian/tesseracttrainer after it which seems 
static, yet it disappears at install time.

Les



More information about the ubuntu-devel mailing list