I used dh_make to create a basic Debian package install. I added a dependency which is the actual program I want. All I want to do is overwrite the conf file this package installed, with a new file with bunch of custom parameters.
I tried to use the install file which looks like this:
file.conf /etc/destination/file.conf
but repeatedly got an error saying:
dh_install: cp -a debian/tmp/file.conf debian/custom-package//etc/package// returned exit code 1
I can't figure out why it won't find the file. I know debian/tmp is created by the builder, but I don't know why it won't find my file, then it tries to copy not to the directory I want, but it prepends debian/custom-package/.
I also tried to use a Makefile but while it builds and runs, the file isn't copying to the directory. I'm not sure the Makefile is right or is even getting called (dh_make didn't originally include a Makefile, I'm not sure where to call it if it doesn't get called).
The make file just has the install directive and looks like this:
install:
cp file.conf /etc/destination/
The rules file is the basic file that was built with dh, and as recommended from the Debian guide:
%:
dh $@
file.conf /etc/destination/file.conf, what is destination? And what is the exact name of your install file? pkgname.install will try to install indebian/tmp/pkgname/etc/destination/, I think. You don't want both an install file as well as an install rule in make. They both do the same thing - copy stuff to the files underdebian/tmpwhich packages are made from. You probably just want a line in an install file.dh.