Debian packaging: .install files ignored

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1484
Joined: Fri Aug 29, 2003 8:39 pm

Debian packaging: .install files ignored

Post by ^rooker »

[PROBLEM]
While trying to make .deb packages for "rubberband", my <packagename>.install files were simply ignored and I ended up with empty packages.

[SOLUTION]
By default, "dh_install" is disabled (commented out) in the debian/rules file.

Originally it looked like this:

Code: Select all

# Build architecture-dependent files here.
binary-arch: build install
        dh_testdir
        dh_testroot
        dh_installchangelogs
        dh_installdocs
        dh_installexamples
#       dh_install
#       dh_installmenu
#       dh_installdebconf
You have to uncomment the "dh_install" line in order ".install" files to become effective:

Code: Select all

# Build architecture-dependent files here.
binary-arch: build install
        dh_testdir
        dh_testroot
        dh_installchangelogs
        dh_installdocs
        dh_installexamples
        dh_install --sourcedir=debian/tmp
#       dh_installmenu
#       dh_installdebconf
The "--sourcedir" argument is necessary if you're building multiple packages from a single source. That hint came from "man dh_install".


Unfortunately, most official docs about Debian packaging don't really go into .install files.

Here are my ressources:
Ubuntu PackagingGuide - Complete
Debian New Maintainer's Guide
Pierre's thoughts about packaging
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1484
Joined: Fri Aug 29, 2003 8:39 pm

dh_install: missing files, aborting

Post by ^rooker »

[PROBLEM]
After finally convincing debuild to use my .install files, I ran into errors like this:
dh_install: librubberband-dev missing files (usr/lib/*.la), aborting
[SOLUTION]
Since some .install files (at least for libraries) are automatically created by "dh_make", they may contain references to files that don't exist in the source you're packaging.

After running "debuild" and having such an error, check within the subfolders of "debian/tmp" if there are any files matching the rule in the .install file. Adjust or delete the rule as necessary.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply