This solved my problem: http://bob.zoller.us/post/156269487/create-a-simple-deb-package
Although you've already got your own answer, I'll point out a couple of things.
You seem to be doing this in a very complicated manner. If you simply need to copy files into certain directories, write a debian/mypackagename.install
with the following format:
path/to/file/relative/to/source/root path/to/install/relative/to/system/root
(do not prepend a / before /usr or /opt, or whatever your target directory is. Read man dh_install
for more information)
then your debian/rules
can be:
#!/usr/bin/make -f
%:
dh $@
If you have some sort of makefile, etc in your source root, then append this to the above rules
file:
override_dh_auto_build:
override_dh_auto_install:
Don't forget put 7
in debian/compat
.
Also, you shouldn't install files into /opt/
or /usr/local/
, etc. Those are meant for files not installed by debian packages. It is better to install in /usr/share/yourcompany/
EDIT: Your mypackage.install
file, more specifically should look something like this:
src/bin/* usr/bin
src/etc/* etc/
...