I have a large project where we have the following files:
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 /
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. Debian recommends installing in /usr/share/yourcompany/
. As juzzlin points out below, the Ubuntu Software Center may have different requirements.
More specifically, your mypackage.install
file should look like this:
src/bin/* usr/bin
src/etc/* etc/
You can install cdbs and change the rules file like this
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
binary-install/package_name::
mkdir debian/$(cdbs_curpkg)/destination_path
cp path_of_your_files debian/$(cdbs_curpkg)/destination_path