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

Re: rules makefile and packaging basics



Hello, the problem is that your "install" target installs files during
the build, and not during the .deb installation.

What a source package does is preparing a .deb file, which is roughly
a tarball of files that will be installed under / (on the user's
system) by dpkg.

How it does it is through a special Makefile named debian/rules : when
you invoke 'install', it should create a hierarchy of files under
debian/packagename. Then dh_builddeb (invoked by the 'binary' target)
will properly tar this directory and make the .deb file.

With your debian/rules, the 'actual' installation will be done during
the package build :
 
> 	mkdir -m 755 -p /usr/share/gtk-link-lizard-1.4
> 	mkdir -m 777 -p ~/Documents/gtk-link-lizard-1.4
> 	install -m 755 $(CURDIR)/gtk-link-lizard.py /usr/share/gtk-link-lizard-1.4
> 	install -m 755 $(CURDIR)/link-lizard-icon.png /usr/share/gtk-link-lizard-1.4
> 	install -m 777 $(CURDIR)/links.txt ~/Documents/gtk-link-lizard-1.4
> 	install -m 755 $(CURDIR)"/GTK Link Lizard.desktop" /usr/share/applications

You can check the .deb contents (dpkg-deb --contents file.deb), those
files may not be present in it.

This probably explains why you can't uninstall the package nor install
it anywhere else.

You probably ran the build as root ('sudo debian/rules binary' or
something like that). To prevent such mistakes, you should use the
'fakeroot' command (replace sudo with fakeroot in the previous
command), or even better, do not copy files by hand and use dh_install
to copy them.

Hope that helps,

-- 
Etienne Millon

Attachment: signature.asc
Description: Digital signature


Reply to: